Load at least two prerecorded sounds, and demonstrate as many of these features as you can:

 playing them individually and simultaneously
 stopping before the end of the sound
 looping (preferably glitch-free)
 setting the volume of each sound
 stereo or 3D positional mixing
 performing other actions when marked times in the sound arrive
Describe:

 The supported audio formats, briefly.
 Whether it is suitable for game sound effects (low-latency start, resource efficiency, supports many simultaneous sounds, etc.)
 Whether it is suitable for playing music (long duration ).
[Note: If it seems to be a good idea, this task may be revised to specify a particular timeline rather than just 'demonstrate these features'.]

Where applicable, please categorize examples primarily by the audio facility used (library/API/program/platform) rather than the language if the language is incidental (e.g. "Mac OS X CoreAudio" or "mplayer" rather than "C" or "bash").

'Supports .mid and .wav natively
'Midi may be played simultaneously
'with .wav but only one .wav voice
'is supported. Multiple voices can
'be achieved via API or Dlls such
'as FMOD or Wavemix
 
'to play a .mid and return its length
playmidi "my.mid", midiLength
 
'check where we are in .mid
if midipos()<midiLength then
    print "Midi still playing"
else
    print "Midi ended"
end if
 
'to stop a playing .mid
stopmidi
 
'to play a .wav and wait for it to end
playwave "my.wav"
 
'to play a .wav and continue procesing
playwave "my.wav", async
 
'to loop a .wav and continue processing
playwave "my.wav",loop
 
'to silence any .wav
playwave ""
or
playwave "next.wav"
 
'to adjust .wav vol
'set left and right full on
left =65535
right=65535
dwVol=right*65536+left
calldll #winmm, "waveOutSetVolume", 0 as long, _
    dwVol as long, ret as long
 