AudioRecordingConfiguration
Used to configure recording parameters.
struct AudioRecordingConfiguration {
const char* filePath;
bool encode;
int sampleRate;
AUDIO_FILE_RECORDING_TYPE fileRecordingType;
AUDIO_RECORDING_QUALITY_TYPE quality;
int recordingChannel;
};
Properties
- filePath
- Absolute path of the recording file (including extension), e.g., C:\music\audio.aac.
Note: Ensure the log file directory exists and is writable.
- encode
- Whether to encode audio data:
- true: Encode audio data in AAC format.
- false: Do not encode, save raw audio data.
- sampleRate
-
Note: If set to 44100 or 48000, Agora recommends recording WAV files or AAC files withRecording sample rate (Hz):
qualityset toAUDIO_RECORDING_QUALITY_MEDIUMorAUDIO_RECORDING_QUALITY_HIGHfor better quality.- 16000
- 32000 (default)
- 44100
- 48000
- fileRecordingType
- Recording content type. See AUDIO_FILE_RECORDING_TYPE.
- quality
- Recording quality. See AUDIO_RECORDING_QUALITY_TYPE.
Note: This parameter applies only to AAC files.
- recordingChannel
-
Note: The actual recorded channel depends on the captured audio:Number of audio channels in the recording. Supported values:
- If mono is captured and
recordingChannelis 2, the recorded audio is duplicated mono, not true stereo. - If stereo is captured and
recordingChannelis 1, the recorded audio is mixed down to mono.
- 1: Mono (default).
- 2: Stereo.
- If mono is captured and