setExternalAudioSource abstract method
Sets the external audio source parameters.
Deprecated: This method is deprecated, use createCustomAudioTrack instead.
enabledWhether to enable the external audio source: true : Enable the external audio source. false : (Default) Disable the external audio source.sampleRateThe sample rate (Hz) of the external audio source which can be set as 8000, 16000, 32000, 44100, or 48000.channelsThe number of channels of the external audio source, which can be set as 1 (Mono) or 2 (Stereo).localPlaybackWhether to play the external audio source: true : Play the external audio source. false : (Default) Do not play the external source.publishWhether to publish audio to the remote users: true : (Default) Publish audio to the remote users. false : Do not publish audio to the remote users.
Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. < 0: Failure.
Implementation
Future<void> setExternalAudioSource(
{required bool enabled,
required int sampleRate,
required int channels,
bool localPlayback = false,
bool publish = true});