Ejemplo n.º 1
0
        // Token: 0x0600025A RID: 602 RVA: 0x0000C134 File Offset: 0x0000A334
        private void StopAllByAudioMixer()
        {
            GameClientSetting gameClientSetting = GameManager.Instance.GameClientSetting;

            this.m_mainAudioMixer.SetFloat(gameClientSetting.AudioSetting.AudioMixerBGMVolumeParamName, this.TransformNormalizeVolumeToRealAudioMixerGroupVolume(0f));
            this.m_mainAudioMixer.SetFloat(gameClientSetting.AudioSetting.AudioMixerSoundEffectParamName, this.TransformNormalizeVolumeToRealAudioMixerGroupVolume(0f));
            this.m_mainAudioMixer.SetFloat(gameClientSetting.AudioSetting.AudioMixerPlayerVoiceVolumeParamName, this.TransformNormalizeVolumeToRealAudioMixerGroupVolume(0f));
            this.m_mainAudioMixer.SetFloat(gameClientSetting.AudioSetting.AudioMixerSpeechVolumeParamName, this.TransformNormalizeVolumeToRealAudioMixerGroupVolume(0f));
        }
Ejemplo n.º 2
0
        // Token: 0x0600025C RID: 604 RVA: 0x0000C398 File Offset: 0x0000A598
        private void SetVolumeByAudioMixer()
        {
            GameClientSetting gameClientSetting = GameManager.Instance.GameClientSetting;

            this.m_mainAudioMixer.SetFloat(gameClientSetting.AudioSetting.AudioMixerBGMVolumeParamName, this.TransformNormalizeVolumeToRealAudioMixerGroupVolume(this.m_backGroundMusicVolume));
            this.m_mainAudioMixer.SetFloat(gameClientSetting.AudioSetting.AudioMixerMovieBGMVolumeParamName, this.TransformNormalizeVolumeToRealAudioMixerGroupVolume(this.m_backGroundMusicVolume));
            this.m_mainAudioMixer.SetFloat(gameClientSetting.AudioSetting.AudioMixerSoundEffectParamName, this.TransformNormalizeVolumeToRealAudioMixerGroupVolume(this.m_soundVolume));
            this.m_mainAudioMixer.SetFloat(gameClientSetting.AudioSetting.AudioMixerPlayerVoiceVolumeParamName, this.TransformNormalizeVolumeToRealAudioMixerGroupVolume(this.m_soundVolume));
            this.m_mainAudioMixer.SetFloat(gameClientSetting.AudioSetting.AudioMixerSpeechVolumeParamName, this.TransformNormalizeVolumeToRealAudioMixerGroupVolume(this.m_speechVolume));
        }
Ejemplo n.º 3
0
        // Token: 0x06000259 RID: 601 RVA: 0x0000C108 File Offset: 0x0000A308
        private IEnumerator CreateMainAudioMixer(Action <bool> onEnd, string mixerAssetPath)
        {
            yield return(ResourceManager.Instance.LoadAsset <AudioMixer>(mixerAssetPath, delegate(string path, AudioMixer asset)
            {
                if (asset == null)
                {
                    global::Debug.LogError(string.Format("AudioManager.Start load AudioMixer fail path={0}", mixerAssetPath));
                    onEnd(false);
                }
                this.m_mainAudioMixer = asset;
            }, false, false));

            if (this.m_mainAudioMixer != null)
            {
                GameClientSetting gameClientSetting            = GameManager.Instance.GameClientSetting;
                AudioMixerGroup   audioMixerGroupBySubPathName = this.GetAudioMixerGroupBySubPathName(this.m_mainAudioMixer, gameClientSetting.AudioSetting.AudioMixerBGMGroupSubPath);
                if (audioMixerGroupBySubPathName == null)
                {
                    global::Debug.LogError(string.Format("AudioManager.Start find AudioMixerBGMGroup fail subpath = {0}", gameClientSetting.AudioSetting.AudioMixerBGMGroupSubPath));
                }
                this.m_backGroundAudioSource1.outputAudioMixerGroup = audioMixerGroupBySubPathName;
                this.m_backGroundAudioSource2.outputAudioMixerGroup = audioMixerGroupBySubPathName;
                AudioMixerGroup audioMixerGroupBySubPathName2 = this.GetAudioMixerGroupBySubPathName(this.m_mainAudioMixer, gameClientSetting.AudioSetting.AudioMixerSoundEffectGroupSubPath);
                if (audioMixerGroupBySubPathName2 == null)
                {
                    global::Debug.LogError(string.Format("AudioManager.Start find AudioMixerSoundEffectGroup fail subpath = {0}", gameClientSetting.AudioSetting.AudioMixerBGMGroupSubPath));
                }
                this.m_soundAudioSource.outputAudioMixerGroup = audioMixerGroupBySubPathName2;
                AudioMixerGroup audioMixerGroupBySubPathName3 = this.GetAudioMixerGroupBySubPathName(this.m_mainAudioMixer, gameClientSetting.AudioSetting.AudioMixerPlayerVoiceGroupSubPath);
                if (audioMixerGroupBySubPathName3 == null)
                {
                    global::Debug.LogError(string.Format("AudioManager.Start find AudioMixerPlayerVoiceGroup fail subpath = {0}", gameClientSetting.AudioSetting.AudioMixerPlayerVoiceGroupSubPath));
                }
                this.m_playerVoiceAudioSource.outputAudioMixerGroup = audioMixerGroupBySubPathName3;
                AudioMixerGroup audioMixerGroupBySubPathName4 = this.GetAudioMixerGroupBySubPathName(this.m_mainAudioMixer, gameClientSetting.AudioSetting.AudioMixerSpeechGroupSubPath);
                if (audioMixerGroupBySubPathName4 == null)
                {
                    global::Debug.LogError(string.Format("AudioManager.Start find AudioMixerSpeechGroup fail subpath = {0}", gameClientSetting.AudioSetting.AudioMixerSpeechGroupSubPath));
                }
                this.m_speechAudioSource.outputAudioMixerGroup = audioMixerGroupBySubPathName4;
                onEnd(true);
            }
            yield break;
        }
Ejemplo n.º 4
0
        // Token: 0x0600025D RID: 605 RVA: 0x0000C460 File Offset: 0x0000A660
        private void StopBackGroundMusicByAudioMixer()
        {
            GameClientSetting gameClientSetting = GameManager.Instance.GameClientSetting;

            this.m_mainAudioMixer.SetFloat(gameClientSetting.AudioSetting.AudioMixerBGMVolumeParamName, this.TransformNormalizeVolumeToRealAudioMixerGroupVolume(0f));
        }