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 with quality set to AUDIO_RECORDING_QUALITY_MEDIUM or AUDIO_RECORDING_QUALITY_HIGH for better quality.
Recording sample rate (Hz):
  • 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:
  • If mono is captured and recordingChannel is 2, the recorded audio is duplicated mono, not true stereo.
  • If stereo is captured and recordingChannel is 1, the recorded audio is mixed down to mono.
The integration solution also affects the final recorded channels. Contact technical support if stereo recording is required.
Number of audio channels in the recording. Supported values:
  • 1: Mono (default).
  • 2: Stereo.