func_audio_loadsound.rst 885 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. .. _func_audio_loadsound:
  2. =========
  3. LoadSound
  4. =========
  5. LoadSound -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. LoadSound:TSound( url:Object,flags=0 )
  10. Load a sound
  11. @url can be either a string, a stream or a #TAudioSample object.
  12. The returned sound can be played using #PlaySound or #CueSound.
  13. The @flags parameter can be any combination of:
  14. [ @{Flag value} | @Effect
  15. * SOUND_LOOP | The sound should loop when played back.
  16. * SOUND_HARDWARE | The sound should be placed in onboard soundcard memory if possible.
  17. ]
  18. To combine flags, use the binary 'or' operator: '|'.
  19. Parameters
  20. ==========
  21. Return Values
  22. =============
  23. A sound object
  24. Examples
  25. ========
  26. .. code-block:: blitzmax
  27. Rem
  28. Load and Play a small example wav file.
  29. End Rem
  30. sound=LoadSound("shoot.wav")
  31. PlaySound sound
  32. Input "Press any key to continue"
  33. See Also
  34. ========