Fix broken whitespace. I'd apologize for the compile times if it was my fault :D
[ardour.git] / libs / ardour / plugin.cc
index 3ba0f8ddeccc785076bcf2bab3d50865efffc866..90e9146af10882e3d9c828cb28c8623094632eaf 100644 (file)
@@ -49,7 +49,7 @@
 #include "ardour/audio_unit.h"
 #endif
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
 #include "ardour/lv2_plugin.h"
 #endif
 
@@ -83,12 +83,12 @@ Plugin::Plugin (const Plugin& other)
        , _have_pending_stop_events (false)
        , _parameter_changed_since_last_preset (false)
 {
-       
+
 }
 
 Plugin::~Plugin ()
 {
-       
+
 }
 
 void
@@ -127,7 +127,7 @@ ARDOUR::find_plugin(Session& session, string identifier, PluginType type)
                plugs = mgr->ladspa_plugin_info();
                break;
 
-#ifdef HAVE_SLV2
+#ifdef LV2_SUPPORT
        case ARDOUR::LV2:
                plugs = mgr->lv2_plugin_info();
                break;
@@ -200,7 +200,7 @@ Plugin::preset_by_label (const string& label)
                        return &i->second;
                }
        }
-       
+
        return 0;
 }
 
@@ -226,7 +226,7 @@ Plugin::connect_and_run (BufferSet& bufs,
                MidiBuffer& b = bufs.get_midi (0);
                bool looped;
                _tracker.track (b.begin(), b.end(), looped);
-               
+
                if (_have_pending_stop_events) {
                        /* Transmit note-offs that are pending from the last transport stop */
                        bufs.merge_from (_pending_stop_events, 0);
@@ -243,7 +243,7 @@ Plugin::realtime_handle_transport_stopped ()
        /* Create note-offs for any active notes and put them in _pending_stop_events, to be picked
           up on the next call to connect_and_run ().
        */
-       
+
        _pending_stop_events.ensure_buffers (DataType::MIDI, 1, 4096);
        _pending_stop_events.get_midi(0).clear ();
        _tracker.resolve_notes (_pending_stop_events.get_midi (0), 0);
@@ -262,7 +262,7 @@ Plugin::get_presets ()
        for (map<string, PresetRecord>::const_iterator i = _presets.begin(); i != _presets.end(); ++i) {
                p.push_back (i->second);
        }
-       
+
        return p;
 }
 
@@ -277,11 +277,13 @@ Plugin::load_preset (PresetRecord r)
        return true;
 }
 
+/** @param val `plugin' value */
 void
 Plugin::set_parameter (uint32_t which, float val)
 {
        _parameter_changed_since_last_preset = true;
-       ParameterChanged (Evoral::Parameter (PluginAutomation, 0, which), val); /* EMIT SIGNAL */
+       _session.set_dirty ();
+       ParameterChanged (which, val); /* EMIT SIGNAL */
 }
 
 int