Chat on IRC |
c++ sound
Posted by gbyte222 [send private reply] at April 26, 2002, 05:40:31 PM
How do I get a sound file to play in my programs?
Posted by CodeRed [send private reply] at April 26, 2002, 05:44:39 PM
If you are using win32 include it as a resource
Posted by miken [send private reply] at April 26, 2002, 08:10:40 PM
Look up the PlaySound(...) function. You'll need to include windows.h but your program doesn't have to be a windows program to use the function.
Posted by CViper [send private reply] at April 27, 2002, 05:57:03 AM
If you need really fancy sound functions, you might wanna take a look at DirectSound :) Only Win32 though...
And then there is (supposed to be) OpenAL. (www.openal.org). Tell me if you get the download to work :/
Posted by unknown_lamer [send private reply] at April 27, 2002, 07:28:37 PM
You can use SDL sound (libsdl.org). Or OSS, ALSA, etc. Of course, I am coming
from a GNU/Linux perspective (SDL is supposed to work on windows too).
Register as a new user | |||||||