13
0

delayline: use boost::shared_array

This commit is contained in:
Robin Gareus 2016-04-24 18:23:14 +02:00
parent d1874d4685
commit a3856d44b2
2 changed files with 6 additions and 2 deletions

View 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;
};

View 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;