CloudSpatialAudioEngineEventHandlerNative.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. #if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID
  3. using AOT;
  4. #endif
  5. namespace Agora.Rtc
  6. {
  7. // internal static class CloudSpatialAudioEngineEventHandlerNative
  8. // {
  9. // internal static ICloudSpatialAudioEventHandler CloudSpatialAudioEngineEventHandler = null;
  10. //#if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID
  11. // internal static AgoraCallbackObject CallbackObject = null;
  12. //#endif
  13. //#if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID
  14. // [MonoPInvokeCallback(typeof(Func_Event_Native))]
  15. //#endif
  16. // internal static void OnEvent(string @event, string data, IntPtr buffer, IntPtr length, uint buffer_count)
  17. // {
  18. // if (CloudSpatialAudioEngineEventHandler == null) return;
  19. //#if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID
  20. // if (CallbackObject == null || CallbackObject._CallbackQueue == null) return;
  21. // CallbackObject._CallbackQueue.EnQueue(() =>
  22. // {
  23. //#endif
  24. // switch (@event)
  25. // {
  26. // case "CloudSpatialAudioEventHandler_onTokenWillExpire":
  27. // CloudSpatialAudioEngineEventHandler.OnTokenWillExpire();
  28. // break;
  29. // case "CloudSpatialAudioEventHandler_onConnectionStateChange":
  30. // CloudSpatialAudioEngineEventHandler.OnConnectionStateChange(
  31. // (SAE_CONNECTION_STATE_TYPE)AgoraJson.GetData<int>(data, "state"),
  32. // (SAE_CONNECTION_CHANGED_REASON_TYPE)AgoraJson.GetData<int>(data, "reason")
  33. // );
  34. // break;
  35. // case "CloudSpatialAudioEventHandler_onTeammateLeft":
  36. // CloudSpatialAudioEngineEventHandler.OnTeammateLeft(
  37. // (uint)AgoraJson.GetData<uint>(data, "uid")
  38. // );
  39. // break;
  40. // case "CloudSpatialAudioEventHandler_onTeammateJoined":
  41. // CloudSpatialAudioEngineEventHandler.OnTeammateJoined(
  42. // (uint)AgoraJson.GetData<uint>(data, "uid")
  43. // );
  44. // break;
  45. // }
  46. //#if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_IOS || UNITY_ANDROID
  47. // });
  48. //#endif
  49. // }
  50. // }
  51. }