Example usage for Java android.media AudioRecord fields, constructors, methods, implement or subclass
The text is from its open source code.
int | STATE_INITIALIZED indicates AudioRecord state is ready to be used |
int | RECORDSTATE_STOPPED indicates AudioRecord recording state is not recording |
int | ERROR Denotes a generic operation failure. |
int | ERROR_BAD_VALUE Denotes a failure due to the use of an invalid value. |
int | ERROR_INVALID_OPERATION Denotes a failure due to the improper use of a method. |
AudioRecord(int audioSource, int sampleRateInHz, int channelConfig, int audioFormat, int bufferSizeInBytes) Class constructor. |
int | getAudioSource() Returns the audio recording source. |
int | getMinBufferSize(int sampleRateInHz, int channelConfig, int audioFormat) Returns the minimum buffer size required for the successful creation of an AudioRecord object, in byte units. |
int | getState() Returns the state of the AudioRecord instance. |
int | read(@NonNull byte[] audioData, int offsetInBytes, int sizeInBytes) Reads audio data from the audio hardware for recording into a byte array. |
int | read(@NonNull short[] audioData, int offsetInShorts, int sizeInShorts) Reads audio data from the audio hardware for recording into a short array. |
int | read(@NonNull ByteBuffer audioBuffer, int sizeInBytes, @ReadMode int readMode) Reads audio data from the audio hardware for recording into a direct buffer. |
void | release() Releases the native AudioRecord resources. |
void | startRecording() Starts recording from the AudioRecord instance. |
void | stop() Stops recording. |