1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-05 22:50:23 +00:00
QB64-PE/internal/help/_SNDCOPY.txt
2016-03-18 08:36:04 -03:00

40 lines
1.7 KiB
Plaintext

{{DISPLAYTITLE:_SNDCOPY}}
The [[_SNDCOPY]] function copies a sound to a new handle so that two or more of the same sound can be played at once. The passed handle parameter is from the [[_SNDOPEN]] function.
{{PageSyntax}}
::: copy_handle& = '''_SNDCOPY('''{{Parameter|handle&}}''')'''
{{PageDescription}}
* Opened sound files must have the "SYNC" capability to use this function. (Currently WAV, OGG, AIF, RIF and VOC)
* Returns a new handle to the same sound data referred to by the source handle.
* No changes to the source handle (such as a volume change) are inherited.
* The sound data referred to by the handle and its copies are not freed until all of them are closed.
{{TextStart}} QB64 supports the following sound file formats ('''Bold is a guaranteed capability'''):
WAV = "'''VOL,SYNC,LEN''',PAUSE" [http://www.rarewares.org/ogg-oggdropxpd.php Free WAV to OGG GUI converter]
OGG = "VOL,SYNC,LEN,PAUSE" [http://www.rarewares.org/ogg-oggenc.php Free WAV to OGG converter]
AIF = "VOL,SYNC,LEN,PAUSE"
RIF = "VOL,SYNC,LEN,PAUSE"
VOC = "VOL,SYNC,LEN,PAUSE"
MID = "'''VOL'''"
MOD = "VOL,PAUSE"
MP3 = "'''VOL''',PAUSE,SETPOS" [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}} '' ''
h2& = {{Cl|_SNDCOPY}}(h&) '' ''
{{CodeEnd}}
{{PageSeeAlso}}
* [[_SNDPLAYCOPY]]
* [[_SNDOPEN]]
{{PageNavigation}}