ranostaj at stud.uni-frankfurt.de
Sun Apr 6 15:20:43 EDT 2003
----- Original Message -----
From: "Glenn Maynard" <g_sdl at zewt.org>
To: <sdlsound at icculus.org>
Sent: Sunday, April 06, 2003 9:01 PM
Subject: Re: [sdlsound] alt_audio_convert
> On Sun, Apr 06, 2003 at 08:25:44PM +0200, Frank Ranostaj wrote:
> > Yes, it is intended to do so. I though, it was more or less working.
> > The allocation interface in playsound should take a additional buffer
> > length into account for the settling time of the filter.
> > The conversion e.g. 44.1 <-> 48.0 is approximated by 44.0 <-> 48.0.
> > The use of Splines can be superior to the windowed sin(x)/x filter
> > used in the alt-converter.
> That won't work; not for me, anyway. It'll result in a lot of drift. The
> application I'm working on, at least, has a fundamental requirement that
> there be no long-term drift in the conversion, since it syncs events in
> music to timestamps. A few samples jitter doesn't matter, but cumulative
> drift will wreak havoc.
You can rescale the timestamps by 441/440 :-)
More serious: You need a huge set of fir coefficients, namely 147*l
or 160*l for the 44.1 <-> 48 case, where l is 128 if i remember correctly.
You can allow this be changing a few #defines and adapt the rate ratio test.
I assumed that large arrays in libaries are inapropiate,
so I compromised this.
> I couldn't make heads or tails of it. :)
I hope it fits now together.
More information about the sdlsound