enableCustomAudioLocalPlayback
Sets whether to enable the local playback of external audio source.
virtual int enableCustomAudioLocalPlayback(track_id_t trackId, bool enabled) = 0;
Details
Attention: Ensure you have called the createCustomAudioTrack method to create a custom audio track before calling this method.
After calling this method to enable the local playback of external audio source, if you need to stop local playback, you can call this method again and set enabled to false.
You can call adjustCustomAudioPlayoutVolume to adjust the local playback volume of the custom audio track.
Parameters
- trackId
- The audio track ID. Set this parameter to the custom audio track ID returned in createCustomAudioTrack.
- enabled
- Whether to play the external audio source:
true: Play the external audio source.false: (Default) Do not play the external source.
Returns
- 0: Success.
- < 0: Failure.