コード例 #1
0
        //TODO: weck
        public static void LoadMp3(string mp3Path)
        {
            var        mp3Reader          = new Mp3FileReader(mp3Path);
            WaveStream pcmStream          = WaveFormatConversionStream.CreatePcmStream(mp3Reader);
            WaveStream blockAlignedStream = new BlockAlignReductionStream(pcmStream);

            _mp3Channel?.Dispose();
            _mp3Channel  = new WaveChannel32(blockAlignedStream);
            _mp3Position = 0;
            _mixerForm   = new MixerForm(_mp3Channel);
        }
コード例 #2
0
        protected void btnMatrixMixer_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                return;
            }

            GainConfig[][] crosspoint_cache = new GainConfig[6][];

            for (int i = 0; i < 6; i++)
            {
                crosspoint_cache[i] = new GainConfig[4];

                for(int j = 0; j < 4; j++)
                {
                    crosspoint_cache[i][j] = (GainConfig) PROGRAMS[CURRENT_PROGRAM].crosspoints[i][j].Clone();
                }
            }

                using (MixerForm mixerForm = new MixerForm(this))
                {

                    if (LIVE_MODE)
                    {
                        mixerForm.Width = 496;
                    }
                    else
                    {
                        mixerForm.Width = 228;
                    }

                    DialogResult showBlock = mixerForm.ShowDialog(this);

                    if (showBlock == DialogResult.Cancel)
                    {
                        for (int i = 0; i < 6; i++)
                        {
                            for (int j = 0; j < 4; j++)
                            {
                                PROGRAMS[CURRENT_PROGRAM].crosspoints[i][j] = (GainConfig)crosspoint_cache[i][j].Clone();
                            }
                        }

                    }
                }
        }