It depends what level of functionality you need.
If you need 3D sound, I guess the OpenAL recommended by Mike could be an option. As ThinBASIC can access functions from DLLs, you would just create DECLARE statements and then you can use it.
If you need just to play some (even multiple) sounds, manipulate their volume and do other basic (non-3D) stuff, you can try MCI commands:
#MINVERSION 1.8.8.0
String mySoundFile = APP_SourcePath + "prodigy.wav"
' -- To be able to use mciSendString, we need to decalre it first
Declare Function mciSendString Lib "WINMM.DLL" Alias "mciSendStringA" ( ByRef lpstrCommand As Asciiz,
ByRef lpstrReturnString As Asciiz,
ByVal uReturnLength As DWord ,
ByVal hwndCallback As DWord ) As DWord
' -- Open file (WAV, MP3) and give it alias for easier manipulation
mciSendString("open "+mySoundFile+" alias mySound", "", 0, 0)
' -- Start playing the file
mciSendString("play mySound" , "", 0, 0)
' -- Give it second to play
Sleep 1000
' -- Release the file
mciSendString("close mySound" , "", 0, 0)
Petr
Bookmarks