public void Stop() { if (audioSource) { audioSource.Stop(); } playState = AudioPlayState.Stop; if (sourceType == AudioSourceType.Music) { if (!isCallPreStop) { isCallPreStop = true; if (AudioPlayManager.OnMusicPreStopCallBack != null) { AudioPlayManager.OnMusicPreStopCallBack(AssetName, musicChannel, flag); } } if (AudioPlayManager.OnMusicStopCallBack != null) { AudioPlayManager.OnMusicStopCallBack(AssetName, musicChannel, flag); } } else { if (AudioPlayManager.OnSFXStopCallBack != null) { AudioPlayManager.OnSFXStopCallBack(AssetName, flag); } } }