func_audio_playsound.rst 670 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .. _func_audio_playsound:
  2. =========
  3. PlaySound
  4. =========
  5. PlaySound -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. PlaySound:TChannel( sound:TSound,channel:TChannel=Null )
  10. Play a sound
  11. #PlaySound starts a sound playing through an audio channel.
  12. If no @channel is specified, #PlaySound automatically allocates a channel for you.
  13. Parameters
  14. ==========
  15. Return Values
  16. =============
  17. An audio channel object
  18. Examples
  19. ========
  20. .. code-block:: blitzmax
  21. Rem
  22. Load and Play a small example wav file with looping.
  23. End Rem
  24. sound=LoadSound("shoot.wav",true)
  25. PlaySound sound
  26. Input "Press any key to continue"
  27. See Also
  28. ========