Re: [LAD] precision resampling to correct clock differences - no luck with libsamplerate and zita-resampler...

From: Jörn Nettingsmeier <nettings@email-addr-hidden-hochschule.de>
Date: Sun May 23 2010 - 14:47:01 EEST

On 05/23/2010 11:20 AM, Erik de Castro Lopo wrote:
> fons@email-addr-hidden wrote:
>
>> On Sun, May 23, 2010 at 08:52:16AM +1000, Erik de Castro Lopo wrote:
>>
>>> I really don't think any modification is necessary.
>>
>> At least one: the sample rate value in the header must
>> remain the same.
>
> sndfile-resample accepts a:
>
> -by <ratio>
>
> command line option where <ratio> is given as a floating
> point value.

yes, that's what i've used in the end. but as i said in another posting,
i've been confused about it, because the ratio is displayed rounded to 6
decimals, and the apparent target rate is an integer (i.e. the number
that ends up in the target header), even though the real sample rate is
the desired fractional value.

> After the conversion is done, the sample rate in the destination
> file's header.
>
>> The 'canonical' way to obtain the required result would
>> be to modify the input file's header to reflect the real
>> (and wrong) samplerate before it is resampled, then resample
>> it to the exact required rate.
>
> Probably easier to fix the desination file.

yep. sndfile-convert -override-sample-rate=44100 in.wav out.wav
did the trick for me.

best,

jörn

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sun May 23 16:15:02 2010

This archive was generated by hypermail 2.1.8 : Sun May 23 2010 - 16:15:02 EEST