delayline: use boost::shared_array
authorRobin Gareus <robin@gareus.org>
Sun, 24 Apr 2016 16:23:14 +0000 (18:23 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 24 Apr 2016 16:26:39 +0000 (18:26 +0200)
libs/ardour/ardour/delayline.h
libs/ardour/delayline.cc

index 9dfe5628d37f220b740638ba79c284b0e0c9afaf..2e970ecd9fb6fad9303e66341ef57faa0a23bdcd 100644 (file)
@@ -20,6 +20,9 @@
 #ifndef __ardour_delayline_h__
 #define __ardour_delayline_h__
 
+#include <boost/shared_ptr.hpp>
+#include <boost/shared_array.hpp>
+
 #include "ardour/types.h"
 #include "ardour/processor.h"
 
@@ -58,8 +61,8 @@ private:
        framecnt_t _delay, _pending_delay;
        framecnt_t _bsiz,  _pending_bsiz;
        frameoffset_t _roff, _woff;
-       boost::shared_ptr<Sample[]> _buf;
-       boost::shared_ptr<Sample[]> _pending_buf;
+       boost::shared_array<Sample> _buf;
+       boost::shared_array<Sample> _pending_buf;
        boost::shared_ptr<MidiBuffer> _midi_buf;
        bool _pending_flush;
 };
index 0bd779336665b68a969e7a25a51c6ff1c4ef2728..26b6ce619eb14f2a799e14c46b9cf979ca6f963e 100644 (file)
@@ -112,6 +112,7 @@ DelayLine::run (BufferSet& bufs, framepos_t /* start_frame */, framepos_t /* end
                        _roff += boff;
                }
 
+               // use shared_array::swap() ??
                _buf = _pending_buf;
                _bsiz = _pending_bsiz;
                _pending_bsiz = 0;