public bool StartElias() { if (elias.Handle == IntPtr.Zero) { return(false); } bool startedSucessfully; if (actionPreset >= 0) { startedSucessfully = StartWithActionPreset(); } else { startedSucessfully = StartTheme(customPreset.CreateSetLevelEvent(elias)); } if (startedSucessfully) { if (audioReader == null) { audioReader = new EliasAudioReader(elias, (uint)eliasFramesPerBuffer, GetComponent <AudioSource>(), useHighLatencyMode); audioReader.unityChannelMode = AudioSettings.speakerMode; AudioSettings.OnAudioConfigurationChanged += OnAudioConfigurationChanged; } isEliasStarted = true; GetComponent <AudioSource> ().Play(); } return(startedSucessfully); }
public bool StartElias() { bool startedSucessfully; if (actionPreset >= 0) { startedSucessfully = StartWithActionPreset(); } else { startedSucessfully = StartTheme(customPreset.CreateSetLevelEvent(elias)); } if (startedSucessfully) { isEliasStarted = true; if (audioReader == null) { audioReader = new EliasAudioReader(elias, GetComponent <AudioSource>(), useHighLatencyMode); } GetComponent <AudioSource> ().Play(); } return(startedSucessfully); }