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; } }
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; } }
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(); }
public override void UpdateSOFAFile(int index) { PhononUnityNative.iplUnitySetCurrentSOFAFile(index); }
public override void UpdateListener(Vector3 position, Vector3 ahead, Vector3 up) { PhononUnityNative.iplUnitySetListener(position, ahead, up); }
public override void Destroy() { PhononUnityNative.iplUnityResetEnvironment(); }