setAudioDualMonoMode

Sets the channel mode of the current audio file.

virtual int setAudioDualMonoMode(agora::media::base::AUDIO_DUAL_MONO_MODE mode) = 0;

In stereo music files, the left and right channels can store different audio data. You can set the channel mode to original, left channel, right channel, or mixed channel mode as needed. For example, in a KTV scenario, the left channel of a music file stores accompaniment, and the right channel stores vocals. If you only want to hear the accompaniment, you can call this method to set the channel mode to left channel; if you want to hear both accompaniment and vocals, you can set the channel mode to mixed channel.

Note:
  • Call the open method before calling this method.
  • This method is only applicable to stereo audio files.

Parameters

mode
Channel mode. See AUDIO_DUAL_MONO_MODE.

Return Values

  • 0: The method call succeeds.
  • < 0: The method call fails.