示例#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());
        }
        public void UpdateListener(Vector3 position, Vector3 ahead, Vector3 up)
        {
            switch (audioEngine)
            {
            case AudioEngine.UnityNative:
                PhononUnityNative.iplUnitySetListener(position, ahead, up);
                break;

            default:
                break;
            }
        }
        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();
 }