getSpatialAudio method

FutureOr<ISpatialAudio> getSpatialAudio()

@detail api @author wangjunzheng @brief Get location audio interface instances. @return Spatial audio management interface instance. If NULL is returned, spatial audio is not supported. See ISpatialAudio{@link #ISpatialAudio}. @note - The first time this API is called must be between you create a room and you actually enter the room. Refer to Spatial Audio for more information. - The spatial audio effect can only be turned on when using a device that supports true two-channel playback; - In the case of poor network conditions, even if this function is turned on, the spatial audio effect will not be generated; - Insufficient performance of the model may cause the audio card. When using a low-end machine, it is not recommended to turn on the spatial audio effect; - Spatial audio effects do not take effect when server level routing is enabled.

Implementation

FutureOr<ISpatialAudio> getSpatialAudio() async {
  final result = await nativeCall('getSpatialAudio', []);
  return packObject(result,
      () => ISpatialAudio(const NativeClassOptions([], disableInit: true)));
}