X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fpatch_change_dialog.cc;h=05cbaab459a7c14bd4f3b46be763a7da5f0b86e3;hb=20ea90a186748f34061fec323faa74f084c7937c;hp=081604344cb971430eb4fe4acbde78b200bdd63c;hpb=4a6412aebe4f18578f201e99ddc74fc5d9cb6bfc;p=ardour.git diff --git a/gtk2_ardour/patch_change_dialog.cc b/gtk2_ardour/patch_change_dialog.cc index 081604344c..05cbaab459 100644 --- a/gtk2_ardour/patch_change_dialog.cc +++ b/gtk2_ardour/patch_change_dialog.cc @@ -27,7 +27,6 @@ #include "midi++/midnam_patch.h" -#include "ardour/midi_patch_manager.h" #include "ardour/beats_frames_converter.h" #include "ardour/instrument_info.h" @@ -42,12 +41,12 @@ using namespace Gtkmm2ext; /** @param tc If non-0, a time converter for this patch change. If 0, time control will be desensitized */ PatchChangeDialog::PatchChangeDialog ( - const ARDOUR::BeatsFramesConverter* tc, - ARDOUR::Session* session, - Evoral::PatchChange const & patch, - ARDOUR::InstrumentInfo& info, - const Gtk::BuiltinStockID& ok, - bool allow_delete) + const ARDOUR::BeatsFramesConverter* tc, + ARDOUR::Session* session, + Evoral::PatchChange const & patch, + ARDOUR::InstrumentInfo& info, + const Gtk::BuiltinStockID& ok, + bool allow_delete) : ArdourDialog (_("Patch Change"), true) , _time_converter (tc) , _info (info) @@ -140,16 +139,16 @@ PatchChangeDialog::instrument_info_changed () fill_patch_combo (); } -Evoral::PatchChange +Evoral::PatchChange PatchChangeDialog::patch () const { - Evoral::MusicalTime t = 0; + Evoral::Beats t = Evoral::Beats(); if (_time_converter) { t = _time_converter->from (_time.current_time ()); } - return Evoral::PatchChange ( + return Evoral::PatchChange ( t, _channel.get_value_as_int() - 1, _program.get_value_as_int() - 1, @@ -286,7 +285,7 @@ PatchChangeDialog::set_active_patch_combo () boost::replace_all (n, "_", " "); MIDI::Name::PatchPrimaryKey const & key = (*j)->patch_primary_key (); - if (key.program_number == _program.get_value() - 1) { + if (key.program() == _program.get_value() - 1) { _ignore_signals = true; _patch_combo.set_active_text (n); _ignore_signals = false;