ewing2121 at yahoo.com
Mon Jan 20 13:05:33 EST 2003
Sorry if this is late (I currently have limited
If you're using other sound libraries other than SDL
with SDL_sound, after the Sound_Init() call, try doing
SDL_QuitSubsystem(SDL_INIT_AUDIO). I had to do this
hack to get SDL_sound to work with OpenAL for SMPEG
because I also had the SMPEG silence problem.
Disabling it for me reactivated SMPEG.
It seems that the SDL_InitSubsystem() call in
SDL_Sound is sort of a 'half-way to hell' scenario.
You either need to fully enable SDL audio yourself to
get SMPEG playback, or you need to fully
disable SDL audio and use your alternative audio
Ryan, perhaps this should be removed from SDL_sound
unless there are other reasons to init the audio
It seems reasonable to me that if a person intends to
use SDL_Audio, they should be responsible for calling
SDL_InitSubsystem() and SDL_OpenAudio() themselves and
it's no fault of SDL_sound if they don't.
--- Ted Kulp <wishy at comcast.net> wrote:
> Thanks for your help. Time for me to figure out how
> to do sound in SDL.
> I'm still using libao from when the program was ogg
> only. I only put SDL
> in to use SDL_sound (and get easy MP3 support).
> Guess it's time to rip
> out the libao stuff and go SDL only.
> Thanks again,
> >> If I enable SMPEG, I get no sound. Nada. It's
> filling the buffer with
> >> data, because I have my counter working from the
> size of the data in the
> >> buffer, and it's full everytime. If I disable
> SMPEG, everytime I play a
> >> file with id3v2 tags, I get garbage and it just
> moves on to the next
> >> song.
> > SMPEG requires you to have the audio device opened
> through SDL_OpenAudio()
> > before decoding. This is a stupid requirement, but
> that's how it is at the
> > moment. That's the usual cause of problems.
> > The other MP3 decoder (mpglib) doesn't deal with
> file corruption at all,
> > and doesn't understand ID3v2 tags. There's a hack
> to discard ID3v1 tags
> > before passing them to the decoder, and the same
> could be done for ID3v2,
> > I suppose.
> > --ryan.
> Ted Kulp
> wishy at comcast.net
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
More information about the sdlsound