fix typos in prev commit
[ardour.git] / libs / ardour / ardour / click.h
index e50e0a29cbc6e8d079a34a8c38ef0de8045e99f7..7fc6d21f7396d19926efc9a096cafbd87484cee1 100644 (file)
@@ -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
 #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
-{
-  public:
-       ClickIO (Session& s, const string& name, 
+class LIBARDOUR_API Click {
+public:
+       framepos_t start;
+       framecnt_t duration;
+       framecnt_t offset;
+       const Sample *data;
+
+       Click (framepos_t s, framecnt_t d, const Sample *b) : start (s), duration (d), offset (0), data (b) {}
 
-              int input_min = -1, int input_max = -1, 
+       void *operator new (size_t) {
+               return pool.alloc ();
+    };
 
-              int output_min = -1, int output_max = -1)
-       : IO (s, name, input_min, input_max, output_min, output_max) {}
+       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, IO::Output) {}
        ~ClickIO() {}
 
-  protected:
+protected:
        uint32_t pans_required () const { return 1; }
 };