public class AudioParams
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
channel
The number of audio channels, which can be set as either of the following
values:
- `1`: Mono (Default)
- `2`: Stereo
|
int |
mode
The use mode of the audio data:
-
RAW_AUDIO_FRAME_OP_MODE_READ_ONLY(0):
(Default) Read-only mode, in which users can only read the AudioFrame
without modifying anything. |
int |
sampleRate
The audio sample rate (Hz), which can be set as one of the following values:
- `8000`
- `16000` (Default)
- `32000`
- `44100`
- `48000`
|
int |
samplesPerCall
The number of samples.
|
| Constructor and Description |
|---|
AudioParams(int sampleRate,
int channelCnt,
int mode,
int samplesPerCall) |
| Modifier and Type | Method and Description |
|---|---|
int |
getChannel() |
int |
getMode() |
int |
getSampleRate() |
int |
getSamplesPerCall() |
java.lang.String |
toString() |
public int sampleRate
public int channel
public int mode
RAW_AUDIO_FRAME_OP_MODE_READ_ONLY(0):
(Default) Read-only mode, in which users can only read the AudioFrame
without modifying anything. For example, this mode applies when users acquire
data with the
Agora SDK and then push the RTMP or RTMPS streams.
- RAW_AUDIO_FRAME_OP_MODE_READ_WRITE(2):
Read and write mode, in which users read the AudioFrame,
modify it, and then
play it. For example, this mode applies when users have their own
sound-effect processing
module to pre-process the audio (such as a voice changer).public int samplesPerCall