Question

I never worked with Core Audio on iOS, but now I need to detect clap sounds coming from the mic. So.. where should I start? Are there any libs just for that (audio analyze)?

Was it helpful?

Solution

Music-DSP has quite a bit of DSP code for you to peruse. It is extremely unlikely you'll find a turnkey solution for doing this with Core Audio. From a very high level you'll need to install a render callback using RemoteIO for microphone input, and then analyze the incoming audio to detect the claps. I'm far from a DSP expert so I can't say what algorithm would work best for you. Amplitude detection would be the simplest but other options would include beat detection or envelope followers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top