X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fclick.h;h=7fc6d21f7396d19926efc9a096cafbd87484cee1;hb=9e5b7db89f381c70232fab35dc21fd885863f998;hp=8488df47a66a7cb6f64655bbb5ac89e206a509f5;hpb=3b89d9eaa03406a5e03648f47734211f09b89d62;p=ardour.git diff --git a/libs/ardour/ardour/click.h b/libs/ardour/ardour/click.h index 8488df47a6..7fc6d21f73 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,14 +20,40 @@ #ifndef __ardour_click_h__ #define __ardour_click_h__ +#include + +#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: + 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) {} + + 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: