[SDL] [OT] sdl audio jittering

Gerry JJ trick at icculus.org
Thu Nov 17 11:32:26 PST 2005


På Sun, 13 Nov 2005 22:33:15 +0100, skrev David Olofson  
<david at olofson.net>:
>> Also, MODs are tracked music, so it doesn't make sense to use those
>> for sound effects.
>
> Actually, why not? :-)

Well, okay, saying it doesn't make sense was maybe a bit harsh.  Still,
using a MOD for sound effects wouldn't have much advantage over using
WAV or other sampled formats unless the sound effects were multichannel
and/or using selective/partial repeating or fancy effects (but those
could just as well be applied to regular waves), would it ?

> 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.

Not the only way =).  Sampling using the volume click bug was pretty
popular for some time, until Commodore fixed that bug in the 8580
version of the SID.  There were still ways to get around the fix, though,
and later on people discovered how to get true 12-bit PCM sound using
the pulse waveform without a very noticable carrier tone.  This wasn't
much used in games, though (mostly because playing digi required obscene
amounts of both memory and rastertime, not to mention the insane timing
requirements of the PCM method ..)

> 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
> data.

Yes, but I don't think this could be done to the same degree with a
regular MOD file.  SID audio is pretty much just regular programs
that happens to manipulate audio registers in stead of putting things
on the screen or calculating other stuff, so there's literally no
restrictions on what they can do (CPU speed willing, of course).

> 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.

Yeah, I completely agree.

- Gerry




More information about the SDL mailing list