/*
- 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
#ifndef __ardour_click_h__
#define __ardour_click_h__
+#include <list>
+
+#include "pbd/pool.h"
+#include "ardour/libardour_visibility.h"
+#include "ardour/types.h"
#include "ardour/io.h"
namespace ARDOUR {
-class ClickIO : public IO
+class LIBARDOUR_API Click {
+public:
+ samplepos_t start;
+ samplecnt_t duration;
+ samplecnt_t offset;
+ const Sample *data;
+
+ Click (samplepos_t s, samplecnt_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;
+};
+
+class LIBARDOUR_API ClickIO : public IO
{
public:
- ClickIO (Session& s, const std::string& name) : IO (s, name) {}
+ ClickIO (Session& s, const std::string& name) : IO (s, name, IO::Output) {}
~ClickIO() {}
protected: