X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fbuffer_manager.h;h=1614854a8978876f4e5e103e1158fe77ca964146;hb=7c2302651559eda71833c291ddc17f4d590ad95a;hp=362e716958bdb3606ea86b4537479226d1538ae0;hpb=ea9979b4b9b2b0b5d3b50b58b518b0562198fefb;p=ardour.git diff --git a/libs/ardour/ardour/buffer_manager.h b/libs/ardour/ardour/buffer_manager.h index 362e716958..1614854a89 100644 --- a/libs/ardour/ardour/buffer_manager.h +++ b/libs/ardour/ardour/buffer_manager.h @@ -1,4 +1,23 @@ -#ifndef __libardour_buffer_manager__ +/* + Copyright (C) 2012 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef __libardour_buffer_manager__ #define __libardour_buffer_manager__ #include @@ -7,29 +26,29 @@ #include "ardour/chan_count.h" #include -#include +#include namespace ARDOUR { class ThreadBuffers; -class BufferManager +class LIBARDOUR_API BufferManager { - public: - static void init (uint32_t); - - static ThreadBuffers* get_thread_buffers (); - static void put_thread_buffers (ThreadBuffers*); - - static void ensure_buffers (ChanCount howmany = ChanCount::ZERO); - - private: - static Glib::StaticMutex rb_mutex; - - typedef PBD::RingBufferNPT ThreadBufferFIFO; +public: + static void init (uint32_t); + + static ThreadBuffers* get_thread_buffers (); + static void put_thread_buffers (ThreadBuffers*); + + static void ensure_buffers (ChanCount howmany = ChanCount::ZERO, size_t custom = 0); + +private: + static Glib::Threads::Mutex rb_mutex; + + typedef PBD::RingBufferNPT ThreadBufferFIFO; typedef std::list ThreadBufferList; - static ThreadBufferFIFO* thread_buffers; + static ThreadBufferFIFO* thread_buffers; static ThreadBufferList* thread_buffers_list; };