Subject: Re: [linux-audio-dev] low latency + mp3
From: Andy Lo A Foe (andy_AT_alsa-project.org)
Date: Mon Oct 22 2001 - 17:18:49 EEST
On Mon, 22 Oct 2001, David Burrows wrote:
> My question is this. How would one go about modifying say mpg123, so that
> it uses 3x256 (or 3x128) byte buffering? I've ran the source through
> doxygen, and started to have a brief look into it but I am wondering if
> someone has already achieved this or could give a description of where to
> start.
You can download the archive located at http://www.alsaplayer.org, unpack
and then check the output/oss/oss.c file, specifically the set_buffer
routine. Similar code should be present in the mpg123 source tree.
> The bonus question is about pitch control. I understand that this can be
> achieved by simply changing the sampling rate, however, I'm wondering if
> anyone has knowledge of fast or high quality resampling algorithms?
You can change the hardware sampling rate of your audiocard to get pitch
(speed) control. As a bonus alsaplayer also allows pitch (speed) control,
but this is quite specific (code is contained in a C++ class), and it
doesn't change the hardware sampling rate. It also does negative speed
control (i.e. play an mp3/ogg in reverse), but it uses the crudest
algorithm (bresenham) which is simply duplicating/removing frame values as
necessary, it doesn't even interpolate.
> Any thoughts, urls, patches or otherwise on the subject would be great. =)
That's all I have from my side :)
Good luck,
Andy
-- AlsaPlayer, http://www.alsaplayer.org/
This archive was generated by hypermail 2b28 : Mon Oct 22 2001 - 17:15:55 EEST