views:

142

answers:

1

I've actually posted this question before, but it hasn't been answered. Maybe I wasn't clear enough, so let me rephrase:

As you know, when you're sampling a signal at a certain sampling rate, any frequency that's higher than half of the sampling rate gets aliased. In order to avoid it, you need to pass the signal (either in the analog form, or in digital form sampled at a higher rate) through an appropriate lowpass filter.

Now, in my case, I'm using Windows' waveIn functions to gather mic input at a certain rate. Since the waveIn functions seem to work at any sampling rate I supply to it, rather than at arbitary predefined rates, I really have no idea whether the soundcard actually samples at that rate, or if it samples at a predefined rate and the system "converts" it to my requested rate. Neither do I care, actually...

What does concern me is, when I sample at, say, 8kHz, is whether the soundcard or the system perform a lowpass filterring (either an analog one at the soundcard, or digital one, which is then restricted to some maximum sampling rate supported by the soundcard) so I won't get aliasing frequencies on my input.

Or maybe, I should sample at the highest sampling rate possible and filter the frequencies out myself?

+3  A: 

I think you'd be using a very poor soundcard if it didn't use an LPF before sampling the signal. I wouldn't worry about this! You can always check by passing in a 10kHz tone and see if it comes through aliased or not.

EDIT: Even if your soundcard supplied it at 44.1 or 48 or whatever, waveIn would still perform an LPF when it resampled. It's just part of sampling. It is possible to turn of the anti-aliasing filter in some applications to get funky frequency looping-back effects, but by default I'd have thought it would always be on.

Skilldrick
Thanks .
Agreed. That is a good experiment; send a chirp signal (or a sequence of pure tones increasing in frequency) into the system, and find out when the output frequency starts to decrease.
Steve