diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-01-28 13:43:17 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-29 14:18:12 -0400 |
commit | 1caf54ee7f6754181037a6a05a5667acd0b3e9b1 (patch) | |
tree | 2c9f75d1acb8d0f718d3265ed005f890fcc1c450 /libs/ardour/ardour/diskstream.h | |
parent | 4644e113a86974ba29c5979b7285260bd3afdfcb (diff) |
add initial support for vari-fill
When refilling playback buffer, try to fill it completely, or at least
using the next-lowest power-of-2 as the amount to read. When locating,
where we use do_refill_with_alloc(), only partially fill the buffer.
Work not yet finished, but possibly promising.
Diffstat (limited to 'libs/ardour/ardour/diskstream.h')
-rw-r--r-- | libs/ardour/ardour/diskstream.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h index 0e82459981..a298e3f2c8 100644 --- a/libs/ardour/ardour/diskstream.h +++ b/libs/ardour/ardour/diskstream.h @@ -171,8 +171,15 @@ class LIBARDOUR_API Diskstream : public SessionObject, public PublicDiskstream void move_processor_automation (boost::weak_ptr<Processor>, std::list<Evoral::RangeMove<framepos_t> > const &); - /** For non-butler contexts (allocates temporary working buffers) */ - virtual int do_refill_with_alloc() = 0; + /** For non-butler contexts (allocates temporary working buffers) + * + * This accessible method has a default argument; derived classes + * must inherit the virtual method that we call which does NOT + * have a default argument, to avoid complications with inheritance + */ + int do_refill_with_alloc(bool partial_fill = true) { + return _do_refill_with_alloc (partial_fill); + } virtual void set_block_size (pframes_t) = 0; bool pending_overwrite () const { @@ -205,6 +212,11 @@ class LIBARDOUR_API Diskstream : public SessionObject, public PublicDiskstream virtual int can_internal_playback_seek (framecnt_t distance) = 0; virtual void reset_write_sources (bool, bool force = false) = 0; virtual void non_realtime_input_change () = 0; + /* accessible method has default argument, so use standard C++ "trick" + to avoid complications with inheritance, by adding this virtual + method which does NOT have a default argument. + */ + virtual int _do_refill_with_alloc (bool partial_fill) = 0; protected: friend class Auditioner; |