[SDL] [OT] sdl audio jittering
david at olofson.net
Sun Nov 13 13:33:15 PST 2005
On Sunday 13 November 2005 20.22, Gerry JJ wrote:
> På Sun, 13 Nov 2005 16:51:30 +0100, skrev Ricardo Cruz
> <rpmcruz at clix.pt>:
> > SDL_mixer can't reproduce two OGG/MP3/MOD sounds at once, so they
> > are no good
> > for sound effects. They can only be played in the music channel.
> That's wrong. OGG and MP3 sound effects work fine in Linux, at
...and if it works there (uhm, "here" - I only use Windows for the
occasional game that refuses to run on Linux), it should work on
other platforms, provided you bring along the libs needed for the
decoding. Decoding audio files is totally platform independent code,
at least in theory.
> Also, MODs are tracked music, so it doesn't make sense to use those
> for sound effects.
Actually, why not? :-)
Back in the C64 days, it was pretty common that games used the music
player to play sound effects. (*) Of course, this was mostly because
actively driving a SID or "similar" sound chip (well, other chips at
the time were really rather primitive, compared to the SID) into
playing back "structured audio" in real time was pretty much the only
way to generate serious sound effects. So, the music player was
pretty much the right tool for the job anyway. Either way, this
method did have the advantage that you could generate very long,
complex and dynamic sound effects without storing insane amounts of
It's a bit sad that these days, you often end up pretending you're not
hearing the ambience loops repeating, or recognizing the sound
effects when you hear them the millionth time - sometimes even the
first time you're playing the game.
(*) This was also done on the Amiga to some extent, because the
limited amount of RAM sometimes left the musician with
practically no room for samples. Though, the most common
result of that was probably that the music was "chip tunes",
while the sound effects were simply cut down to very short,
very low quality samples.
//David Olofson - Programmer, Composer, Open Source Advocate
.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
--- http://olofson.net --- http://www.reologica.se ---
More information about the SDL