summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/click.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-04 02:15:12 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-04 02:15:12 +0000
commit9ad2875905c611b33fc9114101da224c878ca9cd (patch)
tree8e37e2a765ea68eea29c42a6f0cdc13b05180bbe /libs/ardour/ardour/click.h
parent1ef43ec89c1073a370450b9756fca361b1c0f69d (diff)
move Session::Event into SessionEvent class; add SessionEventManager (Session IS-A SessionEventManager); make session ops to toggle all track rec-enable be atomic with respect to process()
git-svn-id: svn://localhost/ardour2/branches/3.0@6273 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/click.h')
-rw-r--r--libs/ardour/ardour/click.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/libs/ardour/ardour/click.h b/libs/ardour/ardour/click.h
index 50efe7ce46..5ee1d50194 100644
--- a/libs/ardour/ardour/click.h
+++ b/libs/ardour/ardour/click.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2004 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,17 +20,43 @@
#ifndef __ardour_click_h__
#define __ardour_click_h__
+#include <list>
+
+#include "pbd/pool.h"
+#include "ardour/types.h"
#include "ardour/io.h"
namespace ARDOUR {
+struct Click {
+ nframes_t start;
+ nframes_t duration;
+ nframes_t offset;
+ const Sample *data;
+
+ Click (nframes_t s, nframes_t d, const Sample *b) : start (s), duration (d), offset (0), data (b) {}
+
+ void *operator new (size_t) {
+ return pool.alloc ();
+ };
+
+ void operator delete(void *ptr, size_t /*size*/) {
+ pool.release (ptr);
+ }
+
+private:
+ static Pool pool;
+};
+
+typedef std::list<Click*> Clicks;
+
class ClickIO : public IO
{
-public:
+ public:
ClickIO (Session& s, const std::string& name) : IO (s, name, IO::Output) {}
~ClickIO() {}
-
-protected:
+
+ protected:
uint32_t pans_required () const { return 1; }
};