summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-06 01:32:04 +0000
committerDavid Robillard <d@drobilla.net>2011-10-06 01:32:04 +0000
commit37e686ac346bdb77386dc3f7307ff956d40f2643 (patch)
treeead2cc35b2c3eedd7df5638dfeb9b70e26c1f5bd
parent990007a6c0317aa0cce97f4e095bc98745c60c4d (diff)
downloadingen-37e686ac346bdb77386dc3f7307ff956d40f2643.tar.gz
ingen-37e686ac346bdb77386dc3f7307ff956d40f2643.tar.bz2
ingen-37e686ac346bdb77386dc3f7307ff956d40f2643.zip
Remove unused EventSink
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3530 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/server/Context.hpp1
-rw-r--r--src/server/EventSink.cpp62
-rw-r--r--src/server/EventSink.hpp59
-rw-r--r--src/server/ProcessContext.hpp1
-rw-r--r--src/server/wscript1
5 files changed, 0 insertions, 124 deletions
diff --git a/src/server/Context.hpp b/src/server/Context.hpp
index f30b11d5..8cbe90f0 100644
--- a/src/server/Context.hpp
+++ b/src/server/Context.hpp
@@ -23,7 +23,6 @@
#include "shared/World.hpp"
#include "Engine.hpp"
-#include "EventSink.hpp"
#include "types.hpp"
namespace Ingen {
diff --git a/src/server/EventSink.cpp b/src/server/EventSink.cpp
deleted file mode 100644
index e80713dd..00000000
--- a/src/server/EventSink.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/* This file is part of Ingen.
- * Copyright 2007-2011 David Robillard <http://drobilla.net>
- *
- * Ingen 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.
- *
- * Ingen 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
- */
-
-#include "EventSink.hpp"
-#include "PortImpl.hpp"
-
-using namespace std;
-
-namespace Ingen {
-namespace Server {
-
-/** \a size is not size_t because an event will never be even remotely close
- * to UINT32_MAX in size, so uint32_t saves wasted space on 64-bit.
- */
-bool
-EventSink::write(uint32_t size, const Event* ev)
-{
- if (size > _events.write_space())
- return false;
-
- _events.write(sizeof(uint32_t), (uint8_t*)&size);
- _events.write(size, (uint8_t*)ev);
-
- return true;
-}
-
-/** Read the next event into event_buffer.
- *
- * \a event_buffer can be casted to Event* and virtual methods called.
- */
-bool
-EventSink::read(uint32_t event_buffer_size, uint8_t* event_buffer)
-{
- uint32_t read_size;
- uint32_t s = _events.read(sizeof(uint32_t), (uint8_t*)&read_size);
- if (!s)
- return false;
-
- assert(read_size <= event_buffer_size);
-
- if (read_size > 0)
- return _events.read(read_size, event_buffer);
- else
- return false;
-}
-
-} // namespace Server
-} // namespace Ingen
diff --git a/src/server/EventSink.hpp b/src/server/EventSink.hpp
deleted file mode 100644
index bbc3c324..00000000
--- a/src/server/EventSink.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/* This file is part of Ingen.
- * Copyright 2007-2011 David Robillard <http://drobilla.net>
- *
- * Ingen 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.
- *
- * Ingen 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
- */
-
-#ifndef INGEN_ENGINE_EVENTSINK_HPP
-#define INGEN_ENGINE_EVENTSINK_HPP
-
-#include <stdint.h>
-#include <list>
-#include <utility>
-#include "raul/RingBuffer.hpp"
-
-namespace Ingen {
-namespace Server {
-
-class PortImpl;
-class Engine;
-class Event;
-
-/** Sink for events generated in the audio thread.
- *
- * Implemented as a flat ringbuffer of events, which are constructed directly
- * in the ringbuffer rather than allocated on the heap (in order to make
- * writing realtime safe).
- *
- * \ingroup engine
- */
-class EventSink
-{
-public:
- EventSink(Engine& engine, size_t capacity) : _engine(engine), _events(capacity) {}
-
- bool write(uint32_t size, const Event* ev);
-
- bool read(uint32_t event_buffer_size, uint8_t* event_buffer);
-
-private:
- Engine& _engine;
- Raul::RingBuffer _events;
-};
-
-} // namespace Server
-} // namespace Ingen
-
-#endif // INGEN_ENGINE_EVENTSINK_HPP
-
diff --git a/src/server/ProcessContext.hpp b/src/server/ProcessContext.hpp
index 339b32f8..cda3c4c6 100644
--- a/src/server/ProcessContext.hpp
+++ b/src/server/ProcessContext.hpp
@@ -21,7 +21,6 @@
#include <vector>
#include "Context.hpp"
-#include "EventSink.hpp"
#include "types.hpp"
namespace Ingen {
diff --git a/src/server/wscript b/src/server/wscript
index 3cef01b8..dd0dfa8f 100644
--- a/src/server/wscript
+++ b/src/server/wscript
@@ -13,7 +13,6 @@ def build(bld):
EngineStore.cpp
Event.cpp
EventBuffer.cpp
- EventSink.cpp
EventSource.cpp
GraphObjectImpl.cpp
InputPort.cpp