public static void playMidi(String path) { if (_player != null) { _player.Dispose(); } _player = new MidiPlayer(_outputDevice); _player.Play(path); }
private void btnPlay_Click(object sender, RoutedEventArgs e) //This gets called whenever the play button is clicked in the MainWindow (Plays the Midi File) { if (player != null) { player.Dispose(); } player = new MidiPlayer(outputDevice); player.Play(txt_MidiFilePath.Text); }
private void btnPlay_Click(object sender, RoutedEventArgs e) { if (_player != null) { _player.Dispose(); } _player = new MidiPlayer(_outputDevice); _player.Play(txt_MidiFilePath.Text); }
private void OnPlayButtonClick(object sender, RoutedEventArgs e) { if (player != null) { player.Dispose(); } player = new MidiPlayer(outputDevice); player.Play(filePathTextBox.Text); }