Exemplo n.º 1
0
        private void btnOkay_Click(object sender, EventArgs e)
        {
            Stop();

            if (_sourceStream is InitialStreamWrapper w && w.BaseStream == _initialStream)
            {
                _initialStream.LoopStartSample = _sourceStream.LoopStartSample;
                _initialStream.LoopEndSample   = _sourceStream.LoopEndSample;
                _initialStream.IsLooping       = _sourceStream.IsLooping;
            }

            if (_initialStream == null)
            {
                using (ProgressWindow progress = new ProgressWindow(this, String.Format("{0} Converter", _type == 0 ? "Brstm" : "Wave"), "Encoding, please wait...", false))
                    switch (_type)
                    {
                    case 0:
                        var encoding = (WaveEncoding)ddlEncoding.SelectedItem;
                        PreviousEncoding = encoding;
                        _audioData       = RSTMConverter.Encode(_sourceStream, progress, encoding);
                        break;

                    case 1:
                        _audioData = RSARWaveConverter.Encode(_sourceStream, progress);
                        break;

                    case 2:
                        _audioData = RWAVConverter.Encode(_sourceStream, progress);
                        break;
                    }
            }

            DialogResult = DialogResult.OK;
            Close();
        }
Exemplo n.º 2
0
        private void btnOkay_Click(object sender, EventArgs e)
        {
            Stop();
#if LOOP_SELECTION_DIALOG_LIB
#else
            using (ProgressWindow progress = new ProgressWindow(this, String.Format("{0} Converter", _type == 0 ? "Brstm" : "Wave"), "Encoding, please wait...", false))
                switch (_type)
                {
                case 0:
                    var encoding = (WaveEncoding)ddlEncoding.SelectedItem;
                    PreviousEncoding = encoding;
                    _audioData       = RSTMConverter.Encode(_sourceStream, progress, encoding);
                    break;

                case 1:
                    _audioData = RSARWaveConverter.Encode(_sourceStream, progress);
                    break;

                case 2:
                    _audioData = RWAVConverter.Encode(_sourceStream, progress);
                    break;
                }
#endif

            DialogResult = DialogResult.OK;
            Close();
        }
Exemplo n.º 3
0
        private void btnOkay_Click(object sender, EventArgs e)
        {
            Stop();
            using (ProgressWindow progress = new ProgressWindow(this, String.Format("{0} Converter", _type == 0 ? "Brstm" : "Wave"), "Encoding, please wait...", false))
                switch (_type)
                {
                case 0:
                    _audioData = RSTMConverter.Encode(_sourceStream, progress);
                    break;

                case 1:
                    _audioData = RSARWaveConverter.Encode(_sourceStream, progress);
                    break;

                case 2:
                    _audioData = RWAVConverter.Encode(_sourceStream, progress);
                    break;
                }

            DialogResult = DialogResult.OK;
            Close();
        }