2

I have question regarding the buffer size. I want to record an audio and save it as WAV. Im' using AudioRecord. I have two questions:

First, what is the equation for the buffer size? I know that we can just use AudioRecord.getMinBufferSize(x, y, z). But I just want to know how it is really computed.

Secondly, how to decide that you have the right buffer size?

Since my application is all about recoding audio, I need to have a bigger buffer size, but not big enough. I want to have a biger buffer size for cases that the CPU might be distracted.

Thanks for your knowledge. よろしくおねがいします!

sftdev
  • 1,701
  • 3
  • 16
  • 18

1 Answers1

0

http://developer.android.com/reference/android/media/AudioTrack.html#getMinBufferSize(int, int, int)

getMinBufferSize() is the minimum buffer size required for successful creation of an Audio Track object in MODE_STREAM.

ashwin153
  • 364
  • 2
  • 13