Esempio n. 1
0
        /// <summary>
        /// ソロ,ミュートのボタンのチェック状態を更新します
        /// </summary>
        private void updateSoloMute()
        {
            VsqFileEx vsq = AppManager.getVsqFile();

            if (vsq == null)
            {
                return;
            }
            // マスター
            bool masterMuted = vsq.getMasterMute();

            volumeMaster.setMuted(masterMuted);

            // VSQのトラック
            bool soloSpecificationExists = false; // 1トラックでもソロ指定があればtrue

            for (int i = 1; i < vsq.Track.Count; i++)
            {
                if (vsq.getSolo(i))
                {
                    soloSpecificationExists = true;
                    break;
                }
            }
            for (int track = 1; track < vsq.Track.Count; track++)
            {
                if (soloSpecificationExists)
                {
                    if (vsq.getSolo(track))
                    {
                        m_tracker[track - 1].setSolo(true);
                        m_tracker[track - 1].setMuted(masterMuted ? true : vsq.getMute(track));
                    }
                    else
                    {
                        m_tracker[track - 1].setSolo(false);
                        m_tracker[track - 1].setMuted(true);
                    }
                }
                else
                {
                    m_tracker[track - 1].setSolo(vsq.getSolo(track));
                    m_tracker[track - 1].setMuted(masterMuted ? true : vsq.getMute(track));
                }
            }

            // BGM
            int offset = vsq.Track.Count - 1;

            for (int i = 0; i < vsq.BgmFiles.Count; i++)
            {
                m_tracker[offset + i].setMuted(masterMuted ? true : vsq.BgmFiles[i].mute == 1);
            }

            this.Refresh();
        }