1 Reply Latest reply: Jun 28, 2011 2:59 PM by captfoss RSS

    Filtering audio (static and/or low/high cut)

    796283
      I'm working on an audio project and I've currently got the whole "recording" and playback working (application just replays what it gets from the mic, but not via native windows "listen to this device") and I think I've got a decible sound meter working (relatively, when I increase the volume going into the mic, the dB increases appropriately, calculated using RMS values).

      However I noticed the dB meter flare up at times when nothing is playing. When I checked the box in windows to "listen to this device" and it would snap/pop every now and then. While I know this is probably an issue with a cheap grade 3.5mm male-to-male cable, I'd like to be able to filter out that noise and eventually what I'd ultimately like is to have 2 sliders of frequencies (one for low frequency cutoff, one for high frequency cutoff).

      So my questions is, how do I filter out everything above/below a given frequency (or static) given the raw PCM data? Doesn't necessarily need to be perfect, just make the snaps / static less obtrusive.
        • 1. Re: Filtering audio (static and/or low/high cut)
          captfoss
          bogdana wrote:
          So my questions is, how do I filter out everything above/below a given frequency (or static) given the raw PCM data? Doesn't necessarily need to be perfect, just make the snaps / static less obtrusive.
          You'd need to run your PCM data through both a low-pass filter (to get rid of the high frequencies) and a high-pass filter (to get rid of the low frequencies).

          http://en.wikipedia.org/wiki/Low-pass_filter
          http://en.wikipedia.org/wiki/High-pass_filter

          There are any number of different implementations of how to do those...