Exemplo n.º 1
0
        public AudioViewController(AudioView view)
        {
            _view                               = view;
            _view.PlayClicked                  += View_PlayClicked;
            _view.StopClicked                  += View_StopClicked;
            _view.ExportWAVClicked             += View_ExportWAVClicked;
            _view.ExportMultichannelWAVClicked += View_ExportMultichannelWAVClicked;
            _view.SelectedWaveChanged          += View_SelectedBlockChanged;
            _view.Disposed                     += View_Disposed;

            _player = new AudioPlayer();
        }
Exemplo n.º 2
0
        public AudioViewController(AudioView view)
        {
            _view = view;
            _view.PlayClicked += View_PlayClicked;
            _view.StopClicked += View_StopClicked;
            _view.ExportWAVClicked += View_ExportWAVClicked;
            _view.ExportMultichannelWAVClicked += View_ExportMultichannelWAVClicked;
            _view.SelectedWaveChanged += View_SelectedBlockChanged;
            _view.Disposed += View_Disposed;

            _player = new AudioPlayer();
        }
Exemplo n.º 3
0
        public Control GetView(RageLib.FileSystem.Common.File file)
        {
            var data = file.GetData();

            var ms = new MemoryStream(data);
            var audioFile = new AudioFile();
            try
            {
                audioFile.Open(ms);
            }
            catch
            {
                ms.Close();

                throw;
            }

            var view = new AudioView();
            var controller = new AudioViewController(view);
            controller.AudioFile = audioFile;

            return view;
        }