Package 

Class AudioConfig

    • Method Summary

      Modifier and Type Method Description
      AudioConfig copy()
      int byteRate()
      int bitRate()
      int audioFormatChannels()
      int frameSize() We call FRAME here the chunk of data that we want to read at each loop cycle.When this number is HIGH, the AudioRecord might be unable to keep a good pace andwe might end up skip some frames.When this number is LOW, we pull a bigger number of frames and this might end updelaying our recorder/encoder balance (more frames means more encoding operations).In the end, this means that the recorder will skip some frames to restore the balance.
      int audioRecordBufferFrames() Number of frames contained in the android.media.AudioRecord buffer.In theory, the higher this value is, the safer it is to delay reading as theaudioRecord will hold the recorded samples anyway and return to us next time we read.
      int bufferPoolMaxSize() We allocate buffers of frameSize each, which is not much.This value indicates the maximum number of these buffers that we can allocate at a giveninstant.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • frameSize

         int frameSize()

        We call FRAME here the chunk of data that we want to read at each loop cycle.When this number is HIGH, the AudioRecord might be unable to keep a good pace andwe might end up skip some frames.When this number is LOW, we pull a bigger number of frames and this might end updelaying our recorder/encoder balance (more frames means more encoding operations).In the end, this means that the recorder will skip some frames to restore the balance.

      • audioRecordBufferFrames

         int audioRecordBufferFrames()

        Number of frames contained in the android.media.AudioRecord buffer.In theory, the higher this value is, the safer it is to delay reading as theaudioRecord will hold the recorded samples anyway and return to us next time we read.Should be coordinated with frameSize.

      • bufferPoolMaxSize

         int bufferPoolMaxSize()

        We allocate buffers of frameSize each, which is not much.This value indicates the maximum number of these buffers that we can allocate at a giveninstant. This value is the number of runnables that the encoder thread is allowed to be'behind' the recorder thread. It's not safe to have it very large or we can end encodingA LOT AFTER the actual recording. It's better to reduce this and skip recording at all.Should be coordinated with frameSize.