summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/diskstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour/diskstream.h')
-rw-r--r--libs/ardour/ardour/diskstream.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h
index 0803436913..858ed1af6f 100644
--- a/libs/ardour/ardour/diskstream.h
+++ b/libs/ardour/ardour/diskstream.h
@@ -34,6 +34,7 @@
#include <pbd/fastlog.h>
#include <pbd/ringbufferNPT.h>
#include <pbd/stateful.h>
+#include <pbd/destructible.h>
#include <ardour/ardour.h>
#include <ardour/configuration.h>
@@ -43,7 +44,6 @@
#include <ardour/port.h>
#include <ardour/utils.h>
-
struct tm;
namespace ARDOUR {
@@ -54,7 +54,7 @@ class Session;
class Playlist;
class IO;
-class Diskstream : public Stateful, public sigc::trackable
+ class Diskstream : public Stateful, public sigc::trackable, public PBD::Destructible
{
public:
enum Flag {
@@ -63,16 +63,16 @@ class Diskstream : public Stateful, public sigc::trackable
Destructive = 0x4
};
+ Diskstream (Session &, const string& name, Flag f = Recordable);
+ Diskstream (Session &, const XMLNode&);
+ virtual ~Diskstream();
+
string name () const { return _name; }
virtual int set_name (string str);
ARDOUR::IO* io() const { return _io; }
void set_io (ARDOUR::IO& io);
- Diskstream& ref() { _refcnt++; return *this; }
- void unref() { if (_refcnt) _refcnt--; if (_refcnt == 0) delete this; }
- uint32_t refcnt() const { return _refcnt; }
-
virtual float playback_buffer_load() const = 0;
virtual float capture_buffer_load() const = 0;
@@ -147,15 +147,11 @@ class Diskstream : public Stateful, public sigc::trackable
static sigc::signal<void> DiskOverrun;
static sigc::signal<void> DiskUnderrun;
- static sigc::signal<void,Diskstream*> DiskstreamCreated; // XXX use a ref with sigc2
static sigc::signal<void,list<Source*>*> DeleteSources;
protected:
friend class Session;
- Diskstream (Session &, const string& name, Flag f = Recordable);
- Diskstream (Session &, const XMLNode&);
-
/* the Session is the only point of access for these because they require
* that the Session is "inactive" while they are called.
*/
@@ -186,9 +182,6 @@ class Diskstream : public Stateful, public sigc::trackable
//private:
- /** Use unref() to destroy a diskstream */
- virtual ~Diskstream();
-
enum TransitionType {
CaptureStart = 0,
CaptureEnd
@@ -303,8 +296,6 @@ class Diskstream : public Stateful, public sigc::trackable
jack_nframes_t scrub_buffer_size;
jack_nframes_t scrub_offset;
- uint32_t _refcnt;
-
sigc::connection ports_created_c;
sigc::connection plmod_connection;
sigc::connection plstate_connection;