RES: SDL_Sound

sorry, i forgot to give more details about my problem…

i took a look on playsound.c

i include de “SDL_Sound/SDL_Sound.h”, modified de SDL_Sound.h to acess de
SDL.h from “SDL/SDL.h”

but when i compile my program (i use mingw32) i receve the follow error…
undefined reference to `Sound_Init’

tks> ----- Mensagem original -----

De: Ryan C. Gordon [SMTP:icculus at clutteredmind.org]
Enviada em: quarta-feira, 17 de setembro de 2003 18:21
Para: sdl at libsdl.org
Assunto: Re: [SDL] SDL_Sound

i get the SDL_Sound library from libsdl.org and i dont know how to use
it!

From libsdl.org? Did you mean SDL_mixer? SDL_sound is at icculus.org.

Documentation is here:

http://icculus.org/SDL_sound/docs/html/

Function list is here:

http://icculus.org/SDL_sound/docs/html/globals.html

The library is fairly straightforward. You create a Sound_Sample structure
from some audio file (mp3, wav, ogg, whatever), and then decode it with
Sound_Decode(). When you’re done, you call Sound_FreeSample().

A relatively complex example of decoding an audio file and playing it to
the sound card is included with the library source (look for
playsound.c)…ultimately, when you strip out the bells and whistles, it’s
just calling Sound_Decode() in a loop to feed decoded data to SDL’s audio
callback.

–ryan.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Ricardo Ferrari (SPO-LAB) wrote:

but when i compile my program (i use mingw32) i receve the follow error…
undefined reference to `Sound_Init’

This looks like you haven’t linked the library with executable.

Can you post your makefile?–
Milan Babuskov
http://fbexport.sourceforge.net

but when i compile my program (i use mingw32) i receve the follow error…
undefined reference to `Sound_Init’

Is there a -lSDL_sound on the command line when you link your program? It
looks like the library isn’t being linked in.

–ryan.

hi, i put -lSDL_Sound on the command line but i receve an error message:
“c:\CPP\BIN\ld.exe: cannot find -lSDL_Sound”> ----- Mensagem original -----

De: Ryan C. Gordon [SMTP:icculus at clutteredmind.org]
Enviada em: quinta-feira, 18 de setembro de 2003 16:49
Para: sdl at libsdl.org
Assunto: Re: [SDL] SDL_Sound

but when i compile my program (i use mingw32) i receve the follow
error…
undefined reference to `Sound_Init’

Is there a -lSDL_sound on the command line when you link your program? It
looks like the library isn’t being linked in.

–ryan.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl