Beispiel #1
0
        private void Effect(WavData wavData)
        {
            if (checkBoxInvert.Checked)
            {
                for (int ch = 0; ch < wavData.NumChannels; ++ch)
                {
                    for (int pos = 0; pos < wavData.NumSamples; ++pos)
                    {
                        short val = wavData.Sample16Get(ch, pos);

                        // Invert! we want to do this effect
                        val = (short)-val;

                        wavData.Sample16Set(ch, pos, val);
                    }
                }
            }
        }
        private void Effect(WavData wavData)
        {
            if (checkBoxInvert.Checked) {
                for (int ch=0; ch < wavData.NumChannels; ++ch) {
                    for (int pos=0; pos < wavData.NumSamples; ++pos) {
                        short val = wavData.Sample16Get(ch, pos);

                        // Invert! we want to do this effect
                        val = (short)-val;

                        wavData.Sample16Set(ch, pos, val);
                    }
                }
            }
        }