private void _UpdateFadeVolume() { bool finishedFadeOut; // primary AudioSource float fadeVolumePrimary = _EqualizePowerForCrossfading(_primaryFader.Get(out finishedFadeOut)); if (finishedFadeOut) { if (_stopRequested) { _Stop(); return; } if (!_IsAudioLoopSequenceMode()) { if (_shouldStopIfPrimaryFadedOut) { _Stop(); } return; } } if (fadeVolumePrimary != _volumeFromPrimaryFade) { _volumeFromPrimaryFade = fadeVolumePrimary; _ApplyVolumePrimary(); } // secondary AudioSource if (_audioSource2 != null) { float fadeVolumeSecondary = _EqualizePowerForCrossfading(_secondaryFader.Get(out finishedFadeOut)); if (finishedFadeOut) { _audioSource2.Stop(); } else { if (fadeVolumeSecondary != _volumeFromSecondaryFade) { _volumeFromSecondaryFade = fadeVolumeSecondary; _ApplyVolumeSecondary(); } } } }