From 120757b8cb154266aae21472a49f0c00309a7dde Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 12 Jul 2006 01:01:15 +0000 Subject: Minor cleanups, removed braindead centralized singleton instance file git-svn-id: http://svn.drobilla.net/lad/ingen@86 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/Store.cpp | 5 +++++ src/libs/engine/JackAudioDriver.cpp | 3 --- src/libs/engine/JackAudioDriver.h | 3 --- src/progs/ingenuity/App.cpp | 5 +++++ src/progs/ingenuity/Controller.cpp | 4 ++++ src/progs/ingenuity/Makefile.am | 1 - src/progs/ingenuity/singletons.cpp | 27 --------------------------- 7 files changed, 14 insertions(+), 34 deletions(-) delete mode 100644 src/progs/ingenuity/singletons.cpp (limited to 'src') diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp index 042ea5f5..476e24d0 100644 --- a/src/libs/client/Store.cpp +++ b/src/libs/client/Store.cpp @@ -25,6 +25,11 @@ namespace LibOmClient { + +/// Singleton instance +Store* Store::_instance = 0; + + Store::Store(SigClientInterface& emitter) { //emitter.new_plugin_sig.connect(sigc::mem_fun(this, &Store::add_plugin)); diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp index edc13ee9..9ba5de82 100644 --- a/src/libs/engine/JackAudioDriver.cpp +++ b/src/libs/engine/JackAudioDriver.cpp @@ -51,7 +51,6 @@ JackAudioPort::JackAudioPort(JackAudioDriver* driver, DuplexPort* patch_ m_driver(driver), m_jack_port(NULL), m_jack_buffer(NULL), - //m_jack_buffer(NULL), m_patch_port(patch_port) { //assert(patch_port->tied_port() != NULL); @@ -62,8 +61,6 @@ JackAudioPort::JackAudioPort(JackAudioDriver* driver, DuplexPort* patch_ (patch_port->is_input()) ? JackPortIsInput : JackPortIsOutput, 0); - //m_jack_buffer = new DriverBuffer(driver->buffer_size()); - patch_port->fixed_buffers(true); } diff --git a/src/libs/engine/JackAudioDriver.h b/src/libs/engine/JackAudioDriver.h index f62e274f..f491ce11 100644 --- a/src/libs/engine/JackAudioDriver.h +++ b/src/libs/engine/JackAudioDriver.h @@ -49,8 +49,6 @@ public: void prepare_buffer(jack_nframes_t nframes); jack_port_t* jack_port() const { return m_jack_port; } - //DriverBuffer* buffer() const { return m_jack_buffer; } - //void jack_buffer(jack_sample_t* s) { m_jack_buffer->set_data(s); } DuplexPort* patch_port() const { return m_patch_port; } private: @@ -61,7 +59,6 @@ private: JackAudioDriver* m_driver; jack_port_t* m_jack_port; jack_sample_t* m_jack_buffer; ///< Cached for output ports - //DriverBuffer* m_jack_buffer; DuplexPort* m_patch_port; }; diff --git a/src/progs/ingenuity/App.cpp b/src/progs/ingenuity/App.cpp index 2b506a97..60fa4c7f 100644 --- a/src/progs/ingenuity/App.cpp +++ b/src/progs/ingenuity/App.cpp @@ -55,6 +55,11 @@ namespace OmGtk { class OmPort; + +/// Singleton instance +App* App::_instance = 0; + + App::App() : m_configuration(new Configuration()), m_about_dialog(NULL), diff --git a/src/progs/ingenuity/Controller.cpp b/src/progs/ingenuity/Controller.cpp index 9f2a4cfe..9fa8b2f2 100644 --- a/src/progs/ingenuity/Controller.cpp +++ b/src/progs/ingenuity/Controller.cpp @@ -26,6 +26,10 @@ namespace OmGtk { +/// Singleton instance +Controller* Controller::_instance = 0; + + Controller::Controller(const string& engine_url) : OSCModelEngineInterface(engine_url), m_patch_librarian(new PatchLibrarian(this)), diff --git a/src/progs/ingenuity/Makefile.am b/src/progs/ingenuity/Makefile.am index 5b45c54a..aa04d3fb 100644 --- a/src/progs/ingenuity/Makefile.am +++ b/src/progs/ingenuity/Makefile.am @@ -16,7 +16,6 @@ ingenuity_SOURCES = \ cmdline.h \ cmdline.c \ main.cpp \ - singletons.cpp \ ConnectWindow.h \ ConnectWindow.cpp \ App.h \ diff --git a/src/progs/ingenuity/singletons.cpp b/src/progs/ingenuity/singletons.cpp deleted file mode 100644 index e3d113dc..00000000 --- a/src/progs/ingenuity/singletons.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* This file is part of Om. Copyright (C) 2006 Dave Robillard. - * - * Om 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. - * - * Om 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 "App.h" -#include "Store.h" -#include "Controller.h" - -namespace OmGtk -{ - App* App::_instance = 0; - Store* Store::_instance = 0; - Controller* Controller::_instance = 0; -} - -- cgit v1.2.1