[sdlsound] MP3 Glitches

Andrew Cross Adjc at 3DGraphics.com
Mon May 26 09:14:59 EDT 2003


Thanks a lot for your prompt response. I am pretty sure that the problem
lies with SDL_sound, although I might well be proven wrong ;)

I am using a 2GHz P4 with WindowsXP and playing MP3 files. I originally
worked with the VisualC version of SDL_Sound (which has not yet been updated
to v1.0.0 by the way) this version uses SMPG for it's MP3 audio playback
through mp3.c. I was getting ticks in the playback (normally caused by lost
samples). I then moved to v1.0.0 and recompiled it all for Win32 (which is
quite painful) and this version uses MPGLib. With this audio playback was
much better, however there where still audio glitches, although these where
no longer ticks and where dependant on the actual music content.

I also have an implementation of a DirectShow (yuk) media player that can
feed into the sample playback system as I used with SDL_Sound and these
files play correctly.

I should try pulling the latest version from CVS to see if that fixes the


----- Original Message ----- 
From: "Eric Wing" <ewing2121 at yahoo.com>
To: <sdlsound at icculus.org>
Sent: Monday, May 26, 2003 5:48 PM
Subject: Re: [sdlsound] MP3 Glitches

> Hi, I've also had my share of audio glitches with
> MP3's (and other high cost formats like OGG). However,
> in my case, many of these problems were related to the
> sound backend actually responsible for playing and the
> CPU power of the computer, and not SDL_sound.
> For example, when I switched API's from using
> SDL_mixer to OpenAL for playback, a lot of my glitches
> and stuttering went away. I've also found that
> different OS's (Linux, MacOSX, Windows) perform
> differently at the same CPU speeds (so Windows might
> give you better playback than Linux on the same
> machine or vice-versa).
> However there are some exceptions and SDL_sound might
> be the culpri. Make sure you have a current version of
> SDL_sound. I remember I had to make some bug fixes
> some number of months ago that affected OGG playback,
> and also MP3 playback. (I forgot if the changes have
> made it to the stable release yet or if they are still
> in CVS.)
> Can you describe what kind of system you're running
> (CPU, OS), and what sound playback backend you're
> using. (Then you might try changing some of these
> parameters to see if your results are consistent to
> determine who the real culprit is.)
> -Eric
> --- Andrew Cross <Adjc at 3DGraphics.com> wrote:
> > I have stried to get SDL_working in my project and
> > have had quite a few issues ... the most serious of
> > which is that there seem to be a lot of audio
> > glitches when playing MP3 files. I was wondering if
> > this was a common issue, and if a fix was know.
> >
> > Andrew
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com

More information about the sdlsound mailing list