Re: [linux-audio-dev] Jack and sample rate conversion : realtime or not ?

From: Tom Szilagyi <tszilagyi@email-addr-hidden>
Date: Thu Mar 24 2005 - 10:39:22 EET

On Thu, Mar 24, 2005 at 12:40:23AM +0100, Olivier Guilyardi wrote:
> Hi,
>
> If playing a sound file that has a different framerate from Jack, using
> libsamplerate, should I :
>
> - convert in real time, in the process callback ?
> - convert the whole file into memory when loading it ?

Hi,

my music player Aqualung (http://aqualung.sf.net) does the former,
however not in the JACK process callback (since it also supports ALSA
and OSS output) but in the disk thread which reads and decodes audio
files and resamples them (if necessary) in a buffer-by-buffer manner
via libsamplerate so it can be sent to the output thread.

If you're interested in the details, you may look at src/core.c in the
Aqualung codebase. Beware, though, that it's not particularly easily
readable by humans :)

Loading the whole file into memory sounds a bit pathologic IMHO (no
offense incl.)

Tom
Received on Thu Mar 24 12:15:13 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 24 2005 - 12:15:14 EET