示例#1
0
        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);
            }
        }
示例#2
0
        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;
        }
示例#3
0
 public SoundSourceHandle PlayHandledSound(CachedSound sound)
 {
     return(AddMixerInputWithHandle(new CachedSoundSampleProvider(sound)));
 }
示例#4
0
 public void PlaySound(CachedSound sound)
 {
     AddMixerInput(new CachedSoundSampleProvider(sound));
 }
示例#5
0
 public CachedSoundSampleProvider(CachedSound cachedSound)
 {
     this.cachedSound = cachedSound;
 }