[SDL] Re: SDL_Mixer sound effect problem causing my game to stutter
avcp-sdlmail at usa.net
Tue Nov 8 11:24:17 PST 2005
James OMeara wrote:
> I just find it odd that I'm having problems when I've seen other
> game sue this method without any problems whatsoever.
You said you are using an 8bit PCM coding, so I am assuming it's actually a
u-Law or a-Law coding (not plain PCM). That could make a difference as it
takes time to decode. However, if you really are using 8bit unsigned PCM,
I'd suggest a 22KHz 16bit rather -- you'll get better quality with that.
> I'm a bit worried about the number of effects I'd have to load,
> however. I'd end up having to load 50 or so sound effects, and
> I'm sure that would take up a bit of memory.
Simple math really. Assuming your average sfx length is ~1 second:
50 * (22050 * 2 bytes per sec) = 2205000 -- 2 Megs. Not a whole lot.
More information about the SDL