enableSpatialAudio abstract method
Enables or disables the spatial audio effect.
After enabling the spatial audio effect, you can call setRemoteUserSpatialAudioParams to set the spatial audio effect parameters of the remote user. You can call this method either before or after joining a channel. This method relies on the spatial audio dynamic library libagora_spatial_audio_extension.dll. If the dynamic library is deleted, the function cannot be enabled normally.
enabled
Whether to enable the spatial audio effect: true : Enable the spatial audio effect. false : Disable the spatial audio effect.
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.
Implementation
Future<void> enableSpatialAudio(bool enabled);