void _playButton_TouchUpInside(object sender, EventArgs e)
        {
            if (null != _synth)
                return;

            _messageTextField.Text = String.Empty;
            try
            {
                _synth = new AudioQueueSynth(int.Parse(_baseFreqTextField.Text), int.Parse(_bufferLengthTextField.Text));
                _synth.play();
            }
            catch (Exception ex)
            {
                _messageTextField.Text = ex.Message + "\n" + ex.StackTrace;
            }
        }
        void _stopButton_TouchUpInside(object sender, EventArgs e)
        {
            if (null == _synth)
                return;

            _messageTextField.Text = string.Empty;
            try
            {
                _synth.stop(true);
                _synth = null;
            }
            catch (Exception ex)
            {
                _messageTextField.Text = ex.Message + "\n" + ex.StackTrace;
            }            
        }
示例#3
0
        void _playButton_TouchUpInside(object sender, EventArgs e)
        {
            if (null != _synth)
            {
                return;
            }

            _messageTextField.Text = String.Empty;
            try
            {
                _synth = new AudioQueueSynth(int.Parse(_baseFreqTextField.Text), int.Parse(_bufferLengthTextField.Text));
                _synth.play();
            }
            catch (Exception ex)
            {
                _messageTextField.Text = ex.Message + "\n" + ex.StackTrace;
            }
        }
示例#4
0
        void _stopButton_TouchUpInside(object sender, EventArgs e)
        {
            if (null == _synth)
            {
                return;
            }

            _messageTextField.Text = string.Empty;
            try
            {
                _synth.stop(true);
                _synth = null;
            }
            catch (Exception ex)
            {
                _messageTextField.Text = ex.Message + "\n" + ex.StackTrace;
            }
        }