func_audio_allocchannel.rst 683 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .. _func_audio_allocchannel:
  2. ============
  3. AllocChannel
  4. ============
  5. AllocChannel -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. AllocChannel:TChannel()
  10. Allocate audio channel
  11. Allocates an audio channel for use with #PlaySound and #CueSound.
  12. Once you are finished with an audio channel, you should use #StopChannel.
  13. Parameters
  14. ==========
  15. Return Values
  16. =============
  17. An audio channel object
  18. Examples
  19. ========
  20. .. code-block:: blitzmax
  21. 'AllocChannel.bmx
  22. timer=createtimer(20)
  23. sound=LoadSound ("shoot.wav")
  24. channel=AllocChannel()
  25. for i=1 to 20
  26. waittimer timer
  27. playsound sound,channel
  28. next
  29. See Also
  30. ========