mat_vee
mat_vee

Reputation: 85

AudioRecord buffer wipe out in android

In android read is blocking call as per documentation,However if We read data into our custom buffer using read call what will happen to android audio buffer

  1. Is Android audio buffer wipe out its data after reading ?
  2. What happens if large number of sound signals with different frequency incident on android recorder?
  3. Is there any way to capture the sound wave of specified frequency in android?
  4. How to capture sound wave emitted from android(using audiotrack) by android recorder itself i.e.If I emit sound wave of specific frequency how I know that I captured the same frequency?

Upvotes: 0

Views: 414

Answers (1)

gregm
gregm

Reputation: 12149

Is Android audio buffer wipe out its data after reading ?

  • Yes

What happens if large number of sound signals incident on android recorder?

  • I'm not sure what you mean, Android records whatever comes into the microphone. If your app waits too long before reading from the buffer, then there is an overflow and you start to lose data.

Is there any way to capture the sound wave of specified frequency in android?

  • You mean generate a sound of a certain frequency? For that use the ToneGenerator to recognize frequency, then you need more complicated algorithms one of those is zero-crossings

How to capture sound wave emitted from android(using audiotrack) by android recorder itself?

  • You just record as normal. I haven't used an audiotrack, but I used a SoundPool to play sound and then record them using Android's APIs

Upvotes: 1

Related Questions