private void button2_Click(object sender, System.EventArgs e) { // first reset the FX tempo... trackBarPitch.Value = 0; Pitching = Pitch((float)trackBarPitch.Value); // now wind the frequency down... int a = (int)BassAsio.BASS_ASIO_ChannelGetRate(false, 0); if (a < _originSampleRate) { BassAsio.BASS_ASIO_ChannelSetRate(false, 0, this._originSampleRate); this.button2.Text = _originSampleRate.ToString("0"); } else { int b = (a - 1000) / 25; for (int r = a; r >= 9000; r -= b) { BassAsio.BASS_ASIO_ChannelSetRate(false, 0, r); this.button2.Text = r.ToString(); Thread.Sleep(25); } } }