func_audio_cuesound.rst 902 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. .. _func_audio_cuesound:
  2. ========
  3. CueSound
  4. ========
  5. CueSound -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. CueSound:TChannel( sound:TSound,channel:TChannel=Null )
  10. Cue a sound
  11. Prepares a sound for playback through an audio channel.
  12. To actually start the sound, you must use #ResumeChannel.
  13. If no @channel is specified, #CueSound automatically allocates a channel for you.
  14. #CueSound allows you to setup various audio channel states such as volume, pan, depth
  15. and rate before a sound actually starts playing.
  16. Parameters
  17. ==========
  18. Return Values
  19. =============
  20. An audio channel object
  21. Examples
  22. ========
  23. .. code-block:: blitzmax
  24. Rem
  25. CueSound example
  26. End Rem
  27. sound=LoadSound("shoot.wav")
  28. channel=CueSound(sound)
  29. Input "Press return key to play cued sound"
  30. ResumeChannel channel
  31. Input "Press return key to quit"
  32. See Also
  33. ========