{{DISPLAYTITLE:_SNDLEN}}
The [[_SNDLEN]] Function returns the length of a sound in seconds using a handle from the [[_SNDOPEN]] Function.



{{PageSyntax}}
::: soundlength = '''_SNDLEN ('''{{Parameter|handle&amp;}}''')'''


{{PageDescription}}
*Returns the length of a sound in seconds.
*The opened file must include the &quot;LEN&quot; capability to use this function.
{{TextStart}}    QB64 supports the following sound file formats ('''Bold is a guaranteed capability'''):

             WAV = &quot;'''VOL,SYNC,LEN''',PAUSE&quot;      [http://www.rarewares.org/ogg-oggdropxpd.php Free WAV to OGG GUI converter]
             OGG = &quot;VOL,SYNC,LEN,PAUSE&quot;      [http://www.rarewares.org/ogg-oggenc.php Free WAV to OGG converter]
             AIF = &quot;VOL,SYNC,LEN,PAUSE&quot;
             RIF = &quot;VOL,SYNC,LEN,PAUSE&quot;
             VOC = &quot;VOL,SYNC,LEN,PAUSE&quot;
             MID = &quot;'''VOL'''&quot;
             MOD = &quot;VOL,PAUSE&quot;
             MP3 = &quot;'''VOL''',PAUSE,SETPOS&quot;        [http://www.freemp3wmaconverter.com/index.html Free WMA, MP3 and OGG converter]

        ''Note:'' {{Cb|_SNDBAL}} only affects MP3 volume. Sound will reside in main channel.
{{TextEnd}}


''Example:''
{{CodeStart}} '' ''
{{Cl|PRINT}} {{Cl|_SNDLEN}}(h&amp;) '' ''
{{CodeEnd}}


{{PageSeeAlso}}
* [[_SNDCOPY]], [[_SNDLIMIT]]


{{PageNavigation}}