Re: Sample-rate conversion
Re: Sample-rate conversion
- Subject: Re: Sample-rate conversion
- From: "Paul Kellett" <email@hidden>
- Date: Wed, 4 Feb 2004 10:27:24 +0100
Jens Bauer <email@hidden> wrote:
>
>
I pull around 79 or 80 samples from the 3.5MHz signal add them up,
>
averaging them by dividing them by # of samples read (say 80), then I
>
multiply them by the playback volume, and store them in the left+right
>
channel (mono).
>
>
The signal I am converting, is a square signal, which can be either hi
>
or lo.
Maybe you should ask the music-dsp mailing list about this (even if your
square signal isn't music!)
Averaging 80 samples makes a lowpass filter - not a good one (which is
why the output has some alias frequencies in it) but enough to distort
the transitions of your square wave. You need to choose the right
filter depending on how well the waveform shape needs to be preserved,
and how much aliasing (wrong frequencies present in the output signal)
is acceptable.
If you know your signal is square and at an audio frequency, and is
a data stream rather than something you want to listen to, maybe you
can save some calculation - each block of N samples must be all high,
all low, or contain one transition. It might be better to detect the
transitions and synthesize a new signal from them.
Paul.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.