| java.lang.Object | |
| ↳ | org.opencdnunion.media.streamer.capture.AudioCapture |
Capture audio data from microphone.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| interface | AudioCapture.OnAudioCaptureListener | AudioCapture status and error listener interface. | |||||||||
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | AUDIO_CAPTURE_TYPE_AUDIORECORDER | ||||||||||
| int | AUDIO_CAPTURE_TYPE_DUMMY | ||||||||||
| int | AUDIO_CAPTURE_TYPE_OPENSLES | ||||||||||
| int | AUDIO_ERROR_UNKNOWN | ||||||||||
| int | AUDIO_START_FAILED | ||||||||||
| int | STATE_IDLE | ||||||||||
| int | STATE_INITIALIZED | ||||||||||
| int | STATE_RECORDING | ||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public SrcPin<AudioBufFrame> | mSrcPin | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
AudioCapture(Context context)
Construct AudioCapture with default params.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | getChannels() | ||||||||||
| boolean | getEnableLatencyTest() | ||||||||||
| int | getSampleRate() | ||||||||||
| SrcPin<AudioBufFrame> | getSrcPin() | ||||||||||
| float | getVolume() | ||||||||||
| boolean |
isRecordingState()
Get is it in recording state currently.
| ||||||||||
| void | release() | ||||||||||
| void |
setAudioCaptureListener(AudioCapture.OnAudioCaptureListener listener)
Set OnAudioCaptureListener listener.
| ||||||||||
| void | setAudioCaptureType(int type) | ||||||||||
| void | setChannels(int channels) | ||||||||||
| void | setEnableLatencyTest(boolean enable) | ||||||||||
| void |
setOnAudioRawDataListener(OnAudioRawDataListener listener)
This method is deprecated.
To implement class extends
AudioFilterBase and set it to
AudioFilterMgt.
| ||||||||||
| void | setSampleRate(int sampleRate) | ||||||||||
| void | setVolume(float volume) | ||||||||||
| void |
start()
Start audio recording.
| ||||||||||
| void |
stop()
Stop audio recording.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Construct AudioCapture with default params.
Get is it in recording state currently.
Set OnAudioCaptureListener listener.
| listener | listener to set |
|---|
This method is deprecated.
To implement class extends
AudioFilterBase and set it to
AudioFilterMgt.
Set audio raw data listener.
| listener | listener to set |
|---|
Start audio recording.
If audio recording already started, nothing will be done.
Stop audio recording.
If audio recording not started, nothing will be done.