Re: coreaudio-api digest, Vol 2 #1055 - 6 msgs
Re: coreaudio-api digest, Vol 2 #1055 - 6 msgs
- Subject: Re: coreaudio-api digest, Vol 2 #1055 - 6 msgs
- From: Stefan Werner <email@hidden>
- Date: Wed, 4 Feb 2004 11:27:19 +0100
Hi,
On 04.02.2004, at 07:00, email@hidden wrote:
> I just wrote a program, which needs to convert a sample-rate from
approx. 3.5MHz resolution to 44100Hz resolution.
The signal that is sampled, is in the hearable range, but I ran into a
problem that some of you most likely recognize.
When I have a "pure tone", and it's converted, I can hear another tone,
which is of a lower frequency, and the amplitude is somewhat lower.
Is there an easy/simple way of getting rid of these extra tones ?
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).
It could be that you're getting unwanted artifacts at the edges of
these 80/79 sample packets - maybe it'd help if you'd invole the
previous packet in your calculations. Also, to avoid aliasing artifacts
in sampling, you should apply a low-pass filter beforehand. BTW, do you
know whether or not your 3.5 MHz sampled stream contains frequencies >
22050 Hz?
I do not see these in the file I dumped.
There is a strange thing. I tried using Audio Hijack on the output
(before it gets into the oscilloscope), and using lowpass filters, I
got rid of very much noise. (This confuses me quite a bit, because when
I output pure data, how can Audio Hijack make them cleaner??? -Is this
because I output square waves rather than sine waves?)
That's because you have an effective sample depth of 6 - 7 bit. Adding
a lowpass certainly can enhance the perceived sound quality here.
Depending on the frequency range you want to cover with your
application, you may want to consider converting to a lower sample
rate, but with a higher precision instead.
Regards,
Stefan
_______________________________________________
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.