Пример #1
0
        public override void Initialize(ComponentCache componentCache, GameEngineState gameEngineState, string[] sofaFileNames)
        {
            foreach (var sofaFileName in sofaFileNames)
            {
                PhononUnityNative.iplUnityAddSOFAFileName(sofaFileName);
            }
            PhononUnityNative.iplUnitySetCurrentSOFAFile(0);

            PhononUnityNative.iplUnitySetEnvironment(gameEngineState.SimulationSettings(),
                                                     gameEngineState.Environment().GetEnvironment(), gameEngineState.ConvolutionType());
        }
Пример #2
0
        public void UpdateListener(Vector3 position, Vector3 ahead, Vector3 up)
        {
            switch (audioEngine)
            {
            case AudioEngine.UnityNative:
                PhononUnityNative.iplUnitySetListener(position, ahead, up);
                break;

            default:
                break;
            }
        }
Пример #3
0
        public void Destroy()
        {
            switch (audioEngine)
            {
            case AudioEngine.UnityNative:
                PhononUnityNative.iplUnityResetEnvironment();
                PhononUnityNative.iplUnityResetAudioEngine();
                break;

            default:
                break;
            }
        }
Пример #4
0
        public void Initialize(AudioEngine engine, ComponentCache componentCache, GameEngineState gameEngineState)
        {
            audioEngine = engine;

            switch (audioEngine)
            {
            case AudioEngine.UnityNative:
                PhononUnityNative.iplUnitySetEnvironment(gameEngineState.SimulationSettings(),
                                                         gameEngineState.Environment().GetEnvironment());
                break;

            default:
                Debug.LogError("Unsupported audio engine: " + audioEngine.ToString());
                break;
            }
        }
Пример #5
0
        void OnApplicationQuit()
        {
            var instancedScenes = managerData.gameEngineState.instancedScenes;

            if (instancedScenes != null)
            {
                foreach (var item in instancedScenes)
                {
                    var instancedScene = item.Value;
                    PhononCore.iplDestroyScene(ref instancedScene);
                }
                instancedScenes.Clear();
            }

            PhononUnityNative.iplUnityResetAudioEngine();
            PhononCore.iplCleanup();
        }
 void OnApplicationQuit()
 {
     PhononUnityNative.iplUnityResetAudioEngine();
     PhononCore.iplCleanup();
 }
Пример #7
0
 public override void UpdateSOFAFile(int index)
 {
     PhononUnityNative.iplUnitySetCurrentSOFAFile(index);
 }
Пример #8
0
 public override void UpdateListener(Vector3 position, Vector3 ahead, Vector3 up)
 {
     PhononUnityNative.iplUnitySetListener(position, ahead, up);
 }
Пример #9
0
 public override void Destroy()
 {
     PhononUnityNative.iplUnityResetEnvironment();
 }