Monday, 15 March 2010

audio - How do I filter out out-of-hearing-range data from PCM samples using C++? -



audio - How do I filter out out-of-hearing-range data from PCM samples using C++? -

i have raw 16bit 48khz pcm data. need strip info out of range of human hearing.

for i'm doing sum of samples , dividing sample count calculate peak sound level, need cut down false positives.

i have big peak level time, speaking , other sounds can hear increasing levels little, need implement filtering. not familiar sound processing @ all, not using filtering because not understand how create it. current code looks this:

for(size_t = 0; < buffer.size(); i++) level += abs(buffer[i]); level /= buffer.size();

how can implement kind of filtering using c++?

use band pass filter.

a band-pass filter device passes frequencies within range , rejects (attenuates) frequencies outside range.

this sounds sort of filter looking for.

i had quick google search , found this thread discusses implementation in c++.

c++ audio pcm

No comments:

Post a Comment