Exemple #1
0
        public override void Initialize(ComponentCache componentCache, GameEngineState gameEngineState, string[] sofaFileNames)
        {
            foreach (var sofaFileName in sofaFileNames)
            {
                PhononFmod.iplFmodAddSOFAFileName(sofaFileName);
            }
            PhononFmod.iplFmodSetCurrentSOFAFile(0);

            PhononFmod.iplFmodSetEnvironment(gameEngineState.SimulationSettings(),
                                             gameEngineState.Environment().GetEnvironment(), gameEngineState.ConvolutionType());
        }
        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;
            }
        }