Exemple #1
0
 public void SetSound()
 {
     if ((long)cfg.sound == 0L)
     {
         SoundLib.EnableMusic();
     }
     else
     {
         SoundLib.DisableMusic();
     }
 }
Exemple #2
0
 public static void DidAutoload()
 {
     if (FF9StateSystem.Sound.auto_save_bgm_id != -1)
     {
         if (FF9StateSystem.Settings.cfg.sound == 0UL)
         {
             SoundLib.EnableMusic();
         }
         else
         {
             SoundLib.DisableMusic();
         }
         AllSoundDispatchPlayer allSoundDispatchPlayer = SoundLib.GetAllSoundDispatchPlayer();
         allSoundDispatchPlayer.FF9SOUND_SONG_PLAY(FF9StateSystem.Sound.auto_save_bgm_id, 127);
         allSoundDispatchPlayer.FF9SOUND_SONG_VOL_FADE(FF9StateSystem.Sound.auto_save_bgm_id, 30, 0, 127);
         FF9StateSystem.Sound.auto_save_bgm_id = -1;
     }
 }
Exemple #3
0
        private void BuildAdjustment()
        {
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.Label("Panning", new GUILayoutOption[0]);
            Single panningPosition = this.PanningPosition;

            this.PanningPosition = GUILayout.HorizontalSlider(this.PanningPosition, -1f, 1f, new GUILayoutOption[0]);
            if (panningPosition != this.PanningPosition)
            {
                this.soundViewController.SetMusicPanning(this.PanningPosition);
            }
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.Label("Pitch", new GUILayoutOption[0]);
            Single pitchPosition = this.PitchPosition;

            this.PitchPosition = GUILayout.HorizontalSlider(this.PitchPosition, 0f, 2f, new GUILayoutOption[0]);
            if (pitchPosition != this.PitchPosition)
            {
                this.soundViewController.SetMusicPitch(this.PitchPosition);
            }
            GUILayout.EndHorizontal();
            if (GUILayout.Button("Reset", new GUILayoutOption[0]))
            {
                this.SoundVolume     = 1f;
                this.PitchPosition   = 1f;
                this.PanningPosition = 0f;
                this.soundViewController.SetMusicVolume(this.SoundVolume);
                this.soundViewController.SetMusicPitch(this.PitchPosition);
                this.soundViewController.SetMusicPanning(this.PanningPosition);
            }
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            if (this.isSfxEnabled)
            {
                if (GUILayout.Button("Disable SFX", new GUILayoutOption[0]))
                {
                    SoundLib.DisableSoundEffect();
                    this.isSfxEnabled = false;
                }
            }
            else if (GUILayout.Button("Enable SFX", new GUILayoutOption[0]))
            {
                SoundLib.EnableSoundEffect();
                this.isSfxEnabled = true;
            }
            if (this.isMusicEnabled)
            {
                if (GUILayout.Button("Disable Music", new GUILayoutOption[0]))
                {
                    SoundLib.DisableMusic();
                    this.isMusicEnabled = false;
                }
            }
            else if (GUILayout.Button("Enable Music", new GUILayoutOption[0]))
            {
                SoundLib.EnableMusic();
                this.isMusicEnabled = true;
            }
            if (GUILayout.Button("Next Loop Region", new GUILayoutOption[0]))
            {
                SoundLib.SetNextLoopRegion(71);
            }
            GUILayout.EndHorizontal();
            GUILayout.EndVertical();
        }