Agora Java API Reference for Android
io.agora.rtc.audio.AudioRecordingConfiguration Class Reference

Public Member Functions

 AudioRecordingConfiguration (String filePath, int quality, int position, int sampleRate, int channel)
 

Public Attributes

String filePath
 
int recordingQuality
 
int recordingPosition
 
int recordingSampleRate
 
int recordingChannel
 

Detailed Description

Recording configuration, which is set in startAudioRecording.

Member Data Documentation

◆ filePath

String io.agora.rtc.audio.AudioRecordingConfiguration.filePath

The absolute path (including the filename extensions) of the recording file. For example: /sdcard/emulated/0/audio.aac.

Note
Ensure that the path you specify exists and is writable.

◆ recordingQuality

int io.agora.rtc.audio.AudioRecordingConfiguration.recordingQuality

Audio recording quality:

  • AUDIO_RECORDING_QUALITY_LOW(0): Low quality. For example, the size of an AAC file with a sample rate of 32,000 Hz and a 10-minute recording is approximately 1.2 MB.
  • AUDIO_RECORDING_QUALITY_MEDIUM(1): (Default) Medium quality. For example, the size of an AAC file with a sample rate of 32,000 Hz and a 10-minute recording is approximately 2 MB.
  • AUDIO_RECORDING_QUALITY_HIGH(2): High quality. For example, the size of an AAC file with a sample rate of 32,000 Hz and a 10-minute recording is approximately 3.75 MB.
  • AUDIO_RECORDING_QUALITY_ULTRA_HIGH(3): Ultra-high quality. For example, the size of an AAC file with a sample rate of 32,000 Hz and a 10-minute recording is approximately 7.5 MB. Since v3.6.2.
Note
This parameter applies to AAC files only.

◆ recordingPosition

int io.agora.rtc.audio.AudioRecordingConfiguration.recordingPosition

Recording content:

◆ recordingSampleRate

int io.agora.rtc.audio.AudioRecordingConfiguration.recordingSampleRate

Recording sample rate (Hz). The following values are supported:

  • 16000
  • (Default) 32000
  • 44100
  • 48000
Note
If this parameter is set to 44100 or 48000, for better recording effects, Agora recommends recording WAV files or AAC files whose recordingQuality is AUDIO_RECORDING_QUALITY_MEDIUM or AUDIO_RECORDING_QUALITY_HIGH.

◆ recordingChannel

int io.agora.rtc.audio.AudioRecordingConfiguration.recordingChannel
Since
v3.6.2

The recorded audio channel. The following values are supported:

  • 1: (Default) Mono channel.
  • 2: Dual channel.
Note

The actual recorded audio channel is related to the audio channel that you capture. If the captured audio is mono and recordingChannel is 2, the recorded audio is the dual-channel data that is copied from mono data, not stereo. If the captured audio is dual channel and recordingChannel is 1, the recorded audio is the mono data that is mixed by dual-channel data. The integration scheme also affects the final recorded audio channel. Therefore, to record in stereo, contact technical support for assistance.