From 1693e57e0ee37c6cd74f2feadb3af6249ac6c29d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 30 Nov 2014 18:51:24 -0500 Subject: [PATCH] Move EventRingBuffer to libardour. This is not used anywhere in Evoral and is just a wrapper around the PBD RingBuffer anyway. Towards a (once again?) independently buildable/testable Evoral and fewer cross-dependencies. --- libs/ardour/MSVClibardour/ardour.vcproj | 4 ++ libs/ardour/ardour/async_midi_port.h | 4 +- .../ardour/event_ring_buffer.h} | 70 +++++++++---------- libs/ardour/ardour/midi_diskstream.h | 3 +- libs/ardour/ardour/midi_model.h | 1 - libs/ardour/ardour/midi_ring_buffer.h | 11 ++- libs/ardour/async_midi_port.cc | 4 -- libs/ardour/midi_diskstream.cc | 1 + libs/ardour/midi_playlist.cc | 1 + libs/ardour/midi_source.cc | 2 + libs/evoral/MSVCevoral/evoral.vcproj | 4 -- libs/evoral/evoral/OldSMF.hpp | 2 - 12 files changed, 50 insertions(+), 57 deletions(-) rename libs/{evoral/evoral/EventRingBuffer.hpp => ardour/ardour/event_ring_buffer.h} (56%) diff --git a/libs/ardour/MSVClibardour/ardour.vcproj b/libs/ardour/MSVClibardour/ardour.vcproj index 724d1b1c34..5965410763 100644 --- a/libs/ardour/MSVClibardour/ardour.vcproj +++ b/libs/ardour/MSVClibardour/ardour.vcproj @@ -1521,6 +1521,10 @@ RelativePath="..\ardour\element_importer.h" > + + diff --git a/libs/ardour/ardour/async_midi_port.h b/libs/ardour/ardour/async_midi_port.h index d822081bd3..7fab9e4186 100644 --- a/libs/ardour/ardour/async_midi_port.h +++ b/libs/ardour/ardour/async_midi_port.h @@ -30,13 +30,13 @@ #include "pbd/ringbuffer.h" #include "evoral/Event.hpp" -#include "evoral/EventRingBuffer.hpp" #include "midi++/types.h" #include "midi++/parser.h" #include "midi++/port.h" #include "ardour/libardour_visibility.h" +#include "ardour/event_ring_buffer.h" #include "ardour/midi_port.h" namespace ARDOUR { @@ -88,7 +88,7 @@ class LIBARDOUR_API AsyncMIDIPort : public ARDOUR::MidiPort, public MIDI::Port { bool have_timer; boost::function timer; RingBuffer< Evoral::Event > output_fifo; - Evoral::EventRingBuffer input_fifo; + EventRingBuffer input_fifo; Glib::Threads::Mutex output_fifo_lock; #ifndef PLATFORM_WINDOWS CrossThreadChannel xthread; diff --git a/libs/evoral/evoral/EventRingBuffer.hpp b/libs/ardour/ardour/event_ring_buffer.h similarity index 56% rename from libs/evoral/evoral/EventRingBuffer.hpp rename to libs/ardour/ardour/event_ring_buffer.h index df9e6aa9ee..c7344c5ca7 100644 --- a/libs/evoral/evoral/EventRingBuffer.hpp +++ b/libs/ardour/ardour/event_ring_buffer.h @@ -1,34 +1,34 @@ -/* This file is part of Evoral. - * Copyright (C) 2008 David Robillard - * - * Evoral 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. - * - * Evoral 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 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., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ +/* + Copyright (C) 2006-2014 Paul Davis + Author: David Robillard -#ifndef EVORAL_EVENT_RING_BUFFER_HPP -#define EVORAL_EVENT_RING_BUFFER_HPP + 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 __ardour_event_ring_buffer_h__ +#define __ardour_event_ring_buffer_h__ + +#include #include #include "pbd/ringbufferNPT.h" -#include "evoral/visibility.h" #include "evoral/EventSink.hpp" #include "evoral/types.hpp" -using namespace std; - -namespace Evoral { +namespace ARDOUR { /** A RingBuffer of events (generic time-stamped binary "blobs"). * @@ -40,7 +40,8 @@ namespace Evoral { * possible interpretation of uint8_t. */ template -class /*LIBEVORAL_API*/ EventRingBuffer : public PBD::RingBufferNPT, public Evoral::EventSink - - diff --git a/libs/evoral/evoral/OldSMF.hpp b/libs/evoral/evoral/OldSMF.hpp index ef1c751d04..814f2a06c9 100644 --- a/libs/evoral/evoral/OldSMF.hpp +++ b/libs/evoral/evoral/OldSMF.hpp @@ -24,8 +24,6 @@ namespace Evoral { template class Event; -template class EventRingBuffer; - /** Standard Midi File (Type 0) */