[SDL] Code to just play a wav file

Chris Nystrom cnystrom at gmail.com
Sat Feb 12 09:19:32 PST 2005


On Sat, 12 Feb 2005 17:28:34 +0100, August <fusionfive at comhem.se> wrote:
> Hello all,
> 
> In my program I want to use SDL to just play a wav file (stored on the
> disk). What code is needed to perform that? There is no example of how
> to do that in the SDL manual.

Like someone else said, you want to use SDL_Mixer. Here are some examples:

http://www.kekkai.org/roger/sdl/mixer/

and

http://gpwiki.org/index.php/C:Playing_a_WAV_Sound_File_With_SDL_mixer

Good luck,
Chris

-- 
Chris Nystrom <cnystrom at gmail.com>
http://www.newio.org/~ccn
AIM: nystromchris




More information about the SDL mailing list