Pergunta

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)?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top