|
Agora Java API Reference for Android
|
Audio data format. More...
Public Member Functions | |
| AudioParams (int sampleRate, int channelCnt, int mode, int samplesPerCall) | |
| int | getSampleRate () |
| int | getChannel () |
| int | getMode () |
| int | getSamplesPerCall () |
| String | toString () |
Public Attributes | |
| int | sampleRate = 0 |
| int | channel = 0 |
| int | mode = Constants.RAW_AUDIO_FRAME_OP_MODE_READ_ONLY |
| int | samplesPerCall = 0 |
Audio data format.
You can pass the AudioParams object in the following APIs to set the audio data format for the corresponding callback:
getRecordAudioParams: Sets the audio data format for the onRecordAudioFrame callback.getPlaybackAudioParams: Sets the audio data format for the onPlaybackAudioFrame callback.getMixedAudioParams: Sets the audio data format for the onMixedAudioFrame callback.getEarMonitoringAudioParams: Sets the audio data format for the onEarMonitoringAudioFrame callback.samplesPerCall, sampleRate, and channel parameters in AudioParams, and triggers the onRecordAudioFrame, onPlaybackAudioFrame, onMixedAudioFrame, and onEarMonitoringAudioFrame callbacks according to the sampling interval.samplePerCall /( sampleRate × channel ).| int io.agora.rtc2.audio.AudioParams.sampleRate = 0 |
The audio sample rate (Hz), which can be set as one of the following values:
| int io.agora.rtc2.audio.AudioParams.channel = 0 |
The number of audio channels, which can be set as either of the following values:
| int io.agora.rtc2.audio.AudioParams.mode = Constants.RAW_AUDIO_FRAME_OP_MODE_READ_ONLY |
The use mode of the audio data, which can be set as either of the following values:
| int io.agora.rtc2.audio.AudioParams.samplesPerCall = 0 |
The number of samples, such as 1024 for the media push.
1.8.18