Clarify stop-at-session-end behaviour; should fix #4033.
[ardour.git] / libs / ardour / buffer_set.cc
index 663b5e8ca0d69f0afe70f121f9c5475960cc37a2..2bd360b42cf02afbb8f1ccf3c2e933fe919d412b 100644 (file)
 #include "ardour/lv2_plugin.h"
 #include "ardour/lv2_event_buffer.h"
 #endif
-#ifdef VST_SUPPORT
-#include "vestige/aeffectx.h"
-#endif
-
-#ifdef LXVST_SUPPORT
+#if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT
 #include "ardour/vestige/aeffectx.h"
 #endif
 
@@ -81,7 +77,7 @@ BufferSet::clear()
        _count.reset();
        _available.reset();
 
-#if defined VST_SUPPORT || defined LXVST_SUPPORT 
+#if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT 
        for (VSTBuffers::iterator i = _vst_buffers.begin(); i != _vst_buffers.end(); ++i) {
                delete *i;
        }
@@ -197,7 +193,7 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac
        }
 #endif
 
-#if defined VST_SUPPORT || defined LXVST_SUPPORT
+#if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT
        // As above but for VST
        if (type == DataType::MIDI) {
                while (_vst_buffers.size() < _buffers[type].size()) {
@@ -266,10 +262,10 @@ BufferSet::get_lv2_midi(bool input, size_t i)
                        const Evoral::MIDIEvent<framepos_t> ev(*e, false);
                        uint32_t type = LV2Plugin::midi_event_type();
 #ifndef NDEBUG
-                        DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("(FLUSH) MIDI event of size %1\n", ev.size()));
-                        for (uint16_t x = 0; x < ev.size(); ++x) {
-                                DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("\tByte[%1] = %2\n", x, (int) ev.buffer()[x]));
-                        }
+                       DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("(FLUSH) MIDI event of size %1\n", ev.size()));
+                       for (uint16_t x = 0; x < ev.size(); ++x) {
+                               DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("\tByte[%1] = %2\n", x, (int) ev.buffer()[x]));
+                       }
 #endif
                        ebuf->append(ev.time(), 0, type, ev.size(), ev.buffer());
                }
@@ -293,10 +289,10 @@ BufferSet::flush_lv2_midi(bool input, size_t i)
                uint8_t* data;
                ebuf->get_event(&frames, &subframes, &type, &size, &data);
 #ifndef NDEBUG
-                DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("(FLUSH) MIDI event of size %1\n", size));
-                for (uint16_t x = 0; x < size; ++x) {
-                        DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("\tByte[%1] = %2\n", x, (int) data[x]));
-                }
+               DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("(FLUSH) MIDI event of size %1\n", size));
+               for (uint16_t x = 0; x < size; ++x) {
+                       DEBUG_TRACE (PBD::DEBUG::LV2, string_compose ("\tByte[%1] = %2\n", x, (int) data[x]));
+               }
 #endif
                mbuf.push_back(frames, size, data);
        }
@@ -304,7 +300,7 @@ BufferSet::flush_lv2_midi(bool input, size_t i)
 
 #endif /* LV2_SUPPORT */
 
-#if defined VST_SUPPORT || defined LXVST_SUPPORT
+#if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT
 
 VstEvents*
 BufferSet::get_vst_midi (size_t b)
@@ -381,7 +377,7 @@ BufferSet::VSTBuffer::push_back (Evoral::MIDIEvent<framepos_t> const & ev)
        _events->numEvents++;
 }
 
-#endif /* VST_SUPPORT */
+#endif /* WINDOWS_VST_SUPPORT */
 
 /** Copy buffers of one type from `in' to this BufferSet */
 void
@@ -438,11 +434,11 @@ BufferSet::silence (framecnt_t nframes, framecnt_t offset)
 }
 
 void
-BufferSet::is_silent (bool yn)
+BufferSet::set_is_silent (bool yn)
 {
        for (std::vector<BufferVec>::iterator i = _buffers.begin(); i != _buffers.end(); ++i) {
                for (BufferVec::iterator b = i->begin(); b != i->end(); ++b) {
-                       (*b)->is_silent (yn);
+                       (*b)->set_is_silent (yn);
                }
        }