_SNDOPENRAW

From QB64 Phoenix Edition Wiki
Revision as of 02:42, 23 January 2023 by RhoSigma (talk | contribs)
Jump to navigation Jump to search

The _SNDOPENRAW function opens a new channel to fill with _SNDRAW content to manage multiple dynamically generated sounds.


Syntax

pipeHandle& = _SNDOPENRAW


Description

  • You can manage multiple dynamically generated sounds at once without having to worry about mixing.
  • Use _SNDCLOSE to remove the pipe sound handles from memory.


Examples

Example: Combining 2 sounds without worrying about mixing:

a = _SNDOPENRAW
b = _SNDOPENRAW

FOR x = 1 TO 100000
    _SNDRAW SIN(x / 10), , a 'fill with a tone
    _SNDRAW RND * 1 - 0.5, , b 'fill with static
NEXT

_SNDCLOSE a
_SNDCLOSE b
Code by Galleon


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link