/// GENERATED BY testcase_gen. DO NOT MODIFY BY HAND.

// ignore_for_file: deprecated_member_use,constant_identifier_names

import 'package:agora_rtc_engine/agora_rtc_engine.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/foundation.dart';
import 'package:fake_test_app/main.dart' as app;
import 'package:iris_tester/iris_tester.dart';
import 'package:iris_method_channel/iris_method_channel.dart';

void localSpatialAudioEngineSmokeTestCases() {
  testWidgets(
    'LocalSpatialAudioEngine.release',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        await localSpatialAudioEngine.release();
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.release] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.initialize',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        await localSpatialAudioEngine.initialize();
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.initialize] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.updateRemotePosition',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        int uid = 5;
        List<double> posInfoPosition = List.filled(5, 5.0);
        List<double> posInfoForward = List.filled(5, 5.0);
        RemoteVoicePositionInfo posInfo = RemoteVoicePositionInfo(
          position: posInfoPosition,
          forward: posInfoForward,
        );
        await localSpatialAudioEngine.updateRemotePosition(
          uid: uid,
          posInfo: posInfo,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.updateRemotePosition] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.updateRemotePositionEx',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        int uid = 5;
        List<double> posInfoPosition = List.filled(5, 5.0);
        List<double> posInfoForward = List.filled(5, 5.0);
        RemoteVoicePositionInfo posInfo = RemoteVoicePositionInfo(
          position: posInfoPosition,
          forward: posInfoForward,
        );
        String connectionChannelId = "hello";
        int connectionLocalUid = 5;
        RtcConnection connection = RtcConnection(
          channelId: connectionChannelId,
          localUid: connectionLocalUid,
        );
        await localSpatialAudioEngine.updateRemotePositionEx(
          uid: uid,
          posInfo: posInfo,
          connection: connection,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.updateRemotePositionEx] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.removeRemotePosition',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        int uid = 5;
        await localSpatialAudioEngine.removeRemotePosition(
          uid,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.removeRemotePosition] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.removeRemotePositionEx',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        int uid = 5;
        String connectionChannelId = "hello";
        int connectionLocalUid = 5;
        RtcConnection connection = RtcConnection(
          channelId: connectionChannelId,
          localUid: connectionLocalUid,
        );
        await localSpatialAudioEngine.removeRemotePositionEx(
          uid: uid,
          connection: connection,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.removeRemotePositionEx] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.clearRemotePositionsEx',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        String connectionChannelId = "hello";
        int connectionLocalUid = 5;
        RtcConnection connection = RtcConnection(
          channelId: connectionChannelId,
          localUid: connectionLocalUid,
        );
        await localSpatialAudioEngine.clearRemotePositionsEx(
          connection,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.clearRemotePositionsEx] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.setMaxAudioRecvCount',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        int maxCount = 5;
        await localSpatialAudioEngine.setMaxAudioRecvCount(
          maxCount,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.setMaxAudioRecvCount] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.setAudioRecvRange',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        double range = 5.0;
        await localSpatialAudioEngine.setAudioRecvRange(
          range,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.setAudioRecvRange] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.setDistanceUnit',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        double unit = 5.0;
        await localSpatialAudioEngine.setDistanceUnit(
          unit,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.setDistanceUnit] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.updatePlayerPositionInfo',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        int playerId = 5;
        List<double> positionInfoPosition = List.filled(5, 5.0);
        List<double> positionInfoForward = List.filled(5, 5.0);
        RemoteVoicePositionInfo positionInfo = RemoteVoicePositionInfo(
          position: positionInfoPosition,
          forward: positionInfoForward,
        );
        await localSpatialAudioEngine.updatePlayerPositionInfo(
          playerId: playerId,
          positionInfo: positionInfo,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.updatePlayerPositionInfo] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.setParameters',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        String params = "hello";
        await localSpatialAudioEngine.setParameters(
          params,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.setParameters] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.muteLocalAudioStream',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        bool mute = true;
        await localSpatialAudioEngine.muteLocalAudioStream(
          mute,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.muteLocalAudioStream] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.muteAllRemoteAudioStreams',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        bool mute = true;
        await localSpatialAudioEngine.muteAllRemoteAudioStreams(
          mute,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.muteAllRemoteAudioStreams] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.muteRemoteAudioStream',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        int uid = 5;
        bool mute = true;
        await localSpatialAudioEngine.muteRemoteAudioStream(
          uid: uid,
          mute: mute,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.muteRemoteAudioStream] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.setRemoteAudioAttenuation',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        int uid = 5;
        double attenuation = 5.0;
        bool forceSet = true;
        await localSpatialAudioEngine.setRemoteAudioAttenuation(
          uid: uid,
          attenuation: attenuation,
          forceSet: forceSet,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.setRemoteAudioAttenuation] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.setZones',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        final List<SpatialAudioZone> zones = () {
          int zonesItemZoneSetId = 5;
          List<double> zonesItemPosition = List.filled(5, 5.0);
          List<double> zonesItemForward = List.filled(5, 5.0);
          List<double> zonesItemRight = List.filled(5, 5.0);
          List<double> zonesItemUp = List.filled(5, 5.0);
          double zonesItemForwardLength = 5.0;
          double zonesItemRightLength = 5.0;
          double zonesItemUpLength = 5.0;
          double zonesItemAudioAttenuation = 5.0;
          SpatialAudioZone zonesItem = SpatialAudioZone(
            zoneSetId: zonesItemZoneSetId,
            position: zonesItemPosition,
            forward: zonesItemForward,
            right: zonesItemRight,
            up: zonesItemUp,
            forwardLength: zonesItemForwardLength,
            rightLength: zonesItemRightLength,
            upLength: zonesItemUpLength,
            audioAttenuation: zonesItemAudioAttenuation,
          );

          return List.filled(5, zonesItem);
        }();

        int zoneCount = 5;
        await localSpatialAudioEngine.setZones(
          zones: zones,
          zoneCount: zoneCount,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.setZones] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.setPlayerAttenuation',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        int playerId = 5;
        double attenuation = 5.0;
        bool forceSet = true;
        await localSpatialAudioEngine.setPlayerAttenuation(
          playerId: playerId,
          attenuation: attenuation,
          forceSet: forceSet,
        );
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.setPlayerAttenuation] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );

  testWidgets(
    'LocalSpatialAudioEngine.clearRemotePositions',
    (WidgetTester tester) async {
      String engineAppId = const String.fromEnvironment('TEST_APP_ID',
          defaultValue: '<YOUR_APP_ID>');

      RtcEngine rtcEngine = createAgoraRtcEngine();
      await rtcEngine.initialize(RtcEngineContext(
        appId: engineAppId,
        areaCode: AreaCode.areaCodeGlob.value(),
      ));
      await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

      final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine();
      await localSpatialAudioEngine.initialize();

      try {
        await localSpatialAudioEngine.clearRemotePositions();
      } catch (e) {
        if (e is! AgoraRtcException) {
          debugPrint(
              '[LocalSpatialAudioEngine.clearRemotePositions] error: ${e.toString()}');
          rethrow;
        }

        if (e.code != -4) {
          // Only not supported error supported.
          rethrow;
        }
      }

      await localSpatialAudioEngine.release();
      await rtcEngine.release();
    },
//  skip: !(),
  );
}
