From alsa-devel-owner@alsa.jcu.cz  Thu Jul 23 11:07:57 1998
Received: from pat.bath.ac.uk (qmailr@pat.bath.ac.uk [138.38.32.2])
	by marvin.jcu.cz (8.8.8/8.8.8) with SMTP id LAA12012
	for <alsa-devel@jcu.cz>; Thu, 23 Jul 1998 11:07:09 +0200
Received: (qmail 118 invoked from network); 23 Jul 1998 09:07:04 -0000
Received: from midge.bath.ac.uk (HELO bath.ac.uk) (mmdf@138.38.32.34)
  by pat.bath.ac.uk with SMTP; 23 Jul 1998 09:07:04 -0000
Received: from tobi.bath.ac.uk by midge.bath.ac.uk id aa22404;
          23 Jul 98 10:07 BST
Message-ID: <35B6FD6B.446B@bath.ac.uk>
Date: Thu, 23 Jul 1998 10:07:55 +0100
From: "P.J.Leonard" <P.J.Leonard@bath.ac.uk>
MIME-Version: 1.0
To: alsa-devel@jcu.cz
Subject: Re: ALSA driver 0.2.0-pre2
References: <35B303E7.E9ECFBB7@ife.ee.ethz.ch> <Pine.LNX.3.96.980720112358.22254F-100000@entry.jcu.cz> <19980722222258.A3598@ruhr-uni-bochum.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

Marcus Brinkmann wrote:
> 
> On Mon, Jul 20, 1998 at 11:33:57AM +0200, Jaroslav Kysela wrote:
> > On Mon, 20 Jul 1998, Thomas Sailer wrote:
> >
> > > > soundcards. Write kernel-side mixing PCM module (mixing will be done
> > > > probably in kernel thread).
> > >
> > > Including sample rate conversion?
> >
> > Yes, but very simple. I'm planning only simple support downmix/upmix to
> > 1/2, 1/4 etc.. For example if mixing rate (user selectable) will be
> > 44100Hz, only rates 44100,22050,11025,5512 will be supported. Looks like
> > there will be big problem with 8000Hz frequency (for .au playback and
> > RAT).
> 
> Mmmh.
> 
> Isn't converting to different sample rates the same as drawing a straight line
> on bit planes?
> 
> The Bresenham algorithm has a nice integer solution for this. I can work out
> the details, if you want. It wouldn't be too time consuming, I think.
> (Maybe you want to do this in libraries user space, though).

 This would be the quickest way but I believe you can do cleverer stuff
with interpolation if so desired. EG. the EMU8000 in the AWE32 uses
an interpolation using 7(?)  points. This is cool if you are doing 
pitch bending because it will not introtroduce anomolies. For straight
sample rate changing linear interpolation is probably OK.


 cheers Paul.

