private void _SetSoundStreamingOn() { int level = _GetCurrentStreamingQualityLevel(); if (level >= m_cachedSound_bgms.Count) { level = m_cachedSound_bgms.Count - 1; } lock (m_soundSystemLock) { m_soundIsStreaming = true; m_isPlaySignal = true; m_streamBGMSound = m_cachedSound_bgms[level]; m_streamSoundHandle = m_audioPlayer.PlayHandledSound(m_cachedSound_signal); } }
private void _InitializeSoundSystem() { m_soundIsStreaming = false; m_isPlaySignal = false; m_audioPlayer = Audio.AudioPlaybackEngine.Instance; m_soundSystemLock = new object(); m_cachedSound_signal = new Audio.CachedSound(kSoundFilePath_Signal); m_cachedSound_bgms = new List <Audio.CachedSound>(); for (int i = 0; i < kSoundFilePath_BGMs.Length; ++i) { m_cachedSound_bgms.Add(new Audio.CachedSound(kSoundFilePath_BGMs[i], true)); } m_cachedSound_purchase = new Audio.CachedSound(kSoundFilePath_Purchase); m_cachedSound_received = new Audio.CachedSound(kSoundFilePath_Received); m_streamSoundHandle.insertedProvider = null; m_streamSoundHandle.sourceProvider = null; }
public SoundSourceHandle PlayHandledSound(CachedSound sound) { return(AddMixerInputWithHandle(new CachedSoundSampleProvider(sound))); }
public void PlaySound(CachedSound sound) { AddMixerInput(new CachedSoundSampleProvider(sound)); }
public CachedSoundSampleProvider(CachedSound cachedSound) { this.cachedSound = cachedSound; }