void OnApplicationPause(bool paused) { BinauralEngine.SetAudioSourcePaused(sourceID, paused); }
void OnDestroy() { BinauralEngine.StopAudioSource(sourceID); BinauralEngine.RemoveAudioSource(sourceID); }
void OnDisable() { BinauralEngine.SetAudioSourcePaused(sourceID, true); }
void OnEnable() { BinauralEngine.SetAudioSourcePaused(sourceID, false); }
void Update() { BinauralEngine.SetAudioSourceHRTF(sourceID, hrtf); BinauralEngine.SetAudioSourcePos(sourceID, transform.position.x, transform.position.y, transform.position.z); }
void Start() { BinauralEngine.AddAudioSource(audioPath, sourceID); BinauralEngine.SetAudioSourcePos(sourceID, transform.position.x, transform.position.y, transform.position.z); BinauralEngine.PlayAudioSource(sourceID); }