Professional Documents
Culture Documents
Audio
Audio
0
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \
\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/
Facts:
-Plays .wav, .mp3, .mid and some other formats
-Can play a sound using only one command
-Can play sounds simultaneously
-Can track, pause, loop, volume change, time limit and 3D position sounds
-Uses handles to identify loaded sounds
-Has strict specifications of what should happen in any given situation
(eg. what happens if you try to pause an already paused sound)
-Doesn't create QB-type errors unless called/used incorrectly
-Checks for required functional capabilities when a file is opened so
all error checking can be performed at this point
-Ignores handles of value 0, so even if opening failed on a particular
computer and this wasn't checked the program simply continues with no sound
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \
\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/
Limitations:
QB64 Audio uses third-party libraries which imposes some limitations. These
third-party libraries may change in the future. For this reason when opening
a sound the required capabilities MUST be specified. To make it possible for
a QB64 program using QB64 Audio to be compatible with all future changes a
list of minimum capabilities which can be relied upon for certain formats has
been created for 3 file types:
WAVE "SYNC,VOL,LEN"
MP3 "VOL"
MIDI "VOL"
However, the current library actually supports the following:
WAVE,OGG,AIFF,RIFF,VOC "SYNC,VOL,LEN,PAUSE"
MP3 "VOL,PAUSE,SETPOS"
MOD "VOL,PAUSE"
MIDI "VOL"
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \
\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/
Sub/Function Overview:
_SNDPLAYFILE Simple command to play a sound file (with limited options)
_SNDOPEN Returns a handle to a sound file
_SNDCLOSE Unloads a sound file (waits until after it has finished playing)
_SNDPLAY Plays a sound
_SNDSTOP Stops a playing (or paused) sound
_SNDPLAYING Returns whether a sound is being played
_SNDLOOP Like _SNDPLAY but sound is looped
_SNDLIMIT Stops playing a sound after it has been playing for a set number
of seconds
_SNDGETPOS Returns to current playing position in seconds
Sub/Function Details: