X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fardour%2Fplugin.cc;h=57198475d72f9ad81d355924e91a19da7acd4ea5;hb=07112b55e0bb7ceb9e5c05ab4df167ecaf7edd9b;hp=cbcf9f7f7cad1675a93e7de1b54b89084c73163a;hpb=02ec346c2b8a8872bfb3b7f231556c0f514ff95f;p=ardour.git diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index cbcf9f7f7c..57198475d7 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -38,12 +38,16 @@ #include "pbd/error.h" #include "pbd/xml++.h" -#include "ardour/ardour.h" -#include "ardour/session.h" -#include "ardour/audioengine.h" +#include "ardour/buffer_set.h" +#include "ardour/chan_count.h" +#include "ardour/chan_mapping.h" +#include "ardour/data_type.h" +#include "ardour/midi_buffer.h" +#include "ardour/midi_state_tracker.h" #include "ardour/plugin.h" -#include "ardour/ladspa_plugin.h" #include "ardour/plugin_manager.h" +#include "ardour/session.h" +#include "ardour/types.h" #ifdef AUDIOUNIT_SUPPORT #include "ardour/audio_unit.h" @@ -62,6 +66,8 @@ using namespace std; using namespace ARDOUR; using namespace PBD; +namespace ARDOUR { class AudioEngine; } + bool PluginInfo::is_instrument () const { @@ -250,9 +256,8 @@ Plugin::connect_and_run (BufferSet& bufs, /* Track notes that we are sending to the plugin */ MidiBuffer& b = bufs.get_midi (0); - bool looped; - _tracker.track (b.begin(), b.end(), looped); + _tracker.track (b.begin(), b.end()); if (_have_pending_stop_events) { /* Transmit note-offs that are pending from the last transport stop */ @@ -321,13 +326,23 @@ Plugin::load_preset (PresetRecord r) return true; } +void +Plugin::clear_preset () +{ + _last_preset.uri = ""; + _last_preset.label = ""; + _parameter_changed_since_last_preset = false; + + PresetLoaded (); /* EMIT SIGNAL */ +} + /** @param val `plugin' value */ void -Plugin::set_parameter (uint32_t which, float val) +Plugin::set_parameter (uint32_t which, float) { _parameter_changed_since_last_preset = true; _session.set_dirty (); - ParameterChanged (which, val); /* EMIT SIGNAL */ + ParameterChanged (which, get_parameter (which)); /* EMIT SIGNAL */ } int