change input/output button context menus for mixer strip to be non-additive: when...
[ardour.git] / libs / ardour / ardour / audio_buffer.h
index 57c5de612482695692a9766cfb0cf44feda83ae2..5c04a7f43a321276079f63237315b8b8d30501d7 100644 (file)
@@ -20,7 +20,9 @@
 #define __ardour_audio_buffer_h__
 
 #include <cstring>
+
 #include "ardour/buffer.h"
+#include "ardour/runtime_functions.h"
 
 namespace ARDOUR {
 
@@ -50,7 +52,7 @@ public:
                assert(src.type() == DataType::AUDIO);
                assert(len <= _capacity);
                assert( src_offset <= ((framecnt_t) src.capacity()-len));
-               memcpy(_data + dst_offset, ((AudioBuffer&)src).data() + src_offset, sizeof(Sample) * len);
+               memcpy(_data + dst_offset, ((const AudioBuffer&)src).data() + src_offset, sizeof(Sample) * len);
                if (dst_offset == 0 && src_offset == 0 && len == _capacity) {
                        _silent = src.silent();
                } else {
@@ -171,6 +173,7 @@ public:
 
        void prepare () { _written = false; _silent = false; }
        bool written() const { return _written; }
+       void set_written(bool w) { _written = w; }
 
   private:
        bool    _owns_data;