projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove C++11'ism
[ardour.git]
/
libs
/
ardour
/
ardour
/
delayline.h
diff --git
a/libs/ardour/ardour/delayline.h
b/libs/ardour/ardour/delayline.h
index 56a6de0c638c891cb08d453dd1436ca6b49fc4a1..6541361a967c33dbfc31a6ea3e2d9c458d351698 100644
(file)
--- a/
libs/ardour/ardour/delayline.h
+++ b/
libs/ardour/ardour/delayline.h
@@
-20,6
+20,9
@@
#ifndef __ardour_delayline_h__
#define __ardour_delayline_h__
#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"
#include "ardour/types.h"
#include "ardour/processor.h"
@@
-37,31
+40,43
@@
public:
DelayLine (Session& s, const std::string& name);
~DelayLine ();
DelayLine (Session& s, const std::string& name);
~DelayLine ();
- bool display_to_user() const { return false; }
-
- void run (BufferSet&, framepos_t, framepos_t, pframes_t, bool);
- void set_delay(framecnt_t signal_delay);
- framecnt_t get_delay() { return _pending_delay; }
+ bool set_name (const std::string& str);
+ bool set_delay (samplecnt_t signal_delay);
+ samplecnt_t delay () { return _pending_delay; }
+ /* processor interface */
+ bool display_to_user () const { return false; }
+ void run (BufferSet&, samplepos_t, samplepos_t, double, pframes_t, bool);
bool configure_io (ChanCount in, ChanCount out);
bool can_support_io_configuration (const ChanCount& in, ChanCount& out);
bool configure_io (ChanCount in, ChanCount out);
bool can_support_io_configuration (const ChanCount& in, ChanCount& out);
+ void flush ();
- void flush();
- void realtime_handle_transport_stopped () { flush(); }
- void realtime_locate () { flush(); }
- void monitoring_changed() { flush(); }
-
- XMLNode& state (bool full);
+protected:
+ XMLNode& state ();
private:
private:
+ void allocate_pending_buffers (samplecnt_t, ChanCount const&);
+
+ void write_to_rb (Sample* rb, Sample* src, samplecnt_t); // honor _woff, _bsiz.
+ void read_from_rb (Sample* rb, Sample* dst, samplecnt_t); // honor _roff, _bsiz
+
friend class IO;
friend class IO;
- 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;
+
+ samplecnt_t _bsiz;
+ samplecnt_t _bsiz_mask;
+ samplecnt_t _delay, _pending_delay;
+ sampleoffset_t _roff, _woff;
+ bool _pending_flush;
+
+ typedef std::vector<boost::shared_array<Sample> > AudioDlyBuf;
+ typedef std::vector<boost::shared_array<MidiBuffer> > MidiDlyBuf;
+
+ AudioDlyBuf _buf;
boost::shared_ptr<MidiBuffer> _midi_buf;
boost::shared_ptr<MidiBuffer> _midi_buf;
- bool _pending_flush;
+
+#ifndef NDEBUG
+ Glib::Threads::Mutex _set_delay_mutex;
+#endif
};
} // namespace ARDOUR
};
} // namespace ARDOUR