Re: [linux-audio-dev] how to resample ??

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] how to resample ??
From: Mike Rawes (mike_rawes_AT_yahoo.co.uk)
Date: Sat Aug 31 2002 - 15:53:17 EEST


Rohit

A re-read of your post reveals that you want to do this using C or
similar, which is a little more complicated!

For downsampling, you need to remove some samples from the data - to
resample to half the sample rate (48000 to 24000 for example), the
simplest method is to read in your wav (or aiff or whatever), and copy
every other sample over to a new wav (aiff etc).

However, if the source sample contains frequencies above the Nyquist
rate (half of the sample rate), you will get aliasing noise in the
result, so you need to put the source data through a low pass filter
first.

Upsampling is simpler, as you don't need to worry about aliasing. You
just use some form of interpolation to fill up the extra samples. For
high quality results, some form of cubic interpolation should be used.

If you can get your head around the math, this document tells you all
about resampling in much more detail than I could go into here:

http://ccrma-www.stanford.edu/~jos/resample

On 31 Aug 2002 11:49:16 -0000
"rohitash panda" <prohit99_AT_rediffmail.com> wrote:

> hi,
> iam using red hat linux7.2 with 2.4.16.Iam using OSS ver 3.95
> for audio/sound programming.Iam not using any libraries.what is
> the procedure for resampling sound(for upsampling and downsampling
> too) ???
>
> any help will be highly appreciated.
>
> thanks
> rohit
>
> so all the geeks are in #gothic, all the goths are in #melbouren
> and all the
> ppl with no computer skills are in #linux
> -- Orlock

-- 
Myk

__________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sat Aug 31 2002 - 15:57:29 EEST