X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fdiskstream.h;h=e51f8c3ef15ec7c42d6232d92dcca0ce89a05392;hb=eaa1dacf5fc9537cfff36e2339bd07aab348aa2e;hp=0e82459981d51e255b8ce3c1da361db1df8fca6c;hpb=4644e113a86974ba29c5979b7285260bd3afdfcb;p=ardour.git diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h index 0e82459981..e51f8c3ef1 100644 --- a/libs/ardour/ardour/diskstream.h +++ b/libs/ardour/ardour/diskstream.h @@ -29,7 +29,7 @@ #include -#include "evoral/types.hpp" +#include "evoral/Range.hpp" #include "ardour/ardour.h" #include "ardour/chan_count.h" @@ -103,8 +103,8 @@ class LIBARDOUR_API Diskstream : public SessionObject, public PublicDiskstream framecnt_t roll_delay() const { return _roll_delay; } void set_roll_delay (framecnt_t); - bool record_enabled() const { return g_atomic_int_get (&_record_enabled); } - bool record_safe () const { return g_atomic_int_get (&_record_safe); } + bool record_enabled() const { return g_atomic_int_get (const_cast(&_record_enabled)); } + bool record_safe () const { return g_atomic_int_get (const_cast(&_record_safe)); } virtual void set_record_enabled (bool yn) = 0; virtual void set_record_safe (bool yn) = 0; @@ -171,8 +171,15 @@ class LIBARDOUR_API Diskstream : public SessionObject, public PublicDiskstream void move_processor_automation (boost::weak_ptr, std::list > 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;