summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-13 19:18:45 +0000
committerDavid Robillard <d@drobilla.net>2008-08-13 19:18:45 +0000
commit3bc15f3e1fef153dd6f1898b981a409876c171ac (patch)
treee3114ef34b0e21e1b80087e4f6844341fb9296ac /src
parent671f6b557aceba0ffa82b0107e692e2a667b0965 (diff)
downloadingen-3bc15f3e1fef153dd6f1898b981a409876c171ac.tar.gz
ingen-3bc15f3e1fef153dd6f1898b981a409876c171ac.tar.bz2
ingen-3bc15f3e1fef153dd6f1898b981a409876c171ac.zip
Remove old LASH stuff (wouldn't be useful in implementing the new LASH with the new Ingen design anyway).
git-svn-id: http://svn.drobilla.net/lad/ingen@1353 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/libs/engine/Engine.cpp10
-rw-r--r--src/libs/engine/Engine.hpp3
-rw-r--r--src/libs/engine/JackAudioDriver.cpp3
-rw-r--r--src/libs/engine/JackMidiDriver.cpp3
-rw-r--r--src/libs/engine/LashDriver.cpp159
-rw-r--r--src/libs/engine/LashDriver.hpp58
-rw-r--r--src/libs/engine/Makefile.am6
-rw-r--r--src/libs/engine/OmInProcess.cpp3
-rw-r--r--src/libs/gui/App.cpp3
-rw-r--r--src/libs/gui/LashController.cpp170
-rw-r--r--src/libs/gui/LashController.hpp56
11 files changed, 0 insertions, 474 deletions
diff --git a/src/libs/engine/Engine.cpp b/src/libs/engine/Engine.cpp
index f0950844..0decdf25 100644
--- a/src/libs/engine/Engine.cpp
+++ b/src/libs/engine/Engine.cpp
@@ -45,9 +45,6 @@
#ifdef HAVE_JACK_MIDI
#include "JackMidiDriver.hpp"
#endif
-/*#ifdef HAVE_LASH
-#include "LashDriver.hpp"
-#endif*/
using namespace std;
namespace Ingen {
@@ -62,13 +59,6 @@ Engine::Engine(Ingen::Shared::World* world)
, _broadcaster(new ClientBroadcaster())
, _object_store(new ObjectStore())
, _node_factory(new NodeFactory(world))
-#if 0
-#ifdef HAVE_LASH
- , _lash_driver(new LashDriver())
-#else
- , _lash_driver(NULL)
-#endif
-#endif
, _quit_flag(false)
, _activated(false)
{
diff --git a/src/libs/engine/Engine.hpp b/src/libs/engine/Engine.hpp
index 2fa2ff3e..be7a3ee7 100644
--- a/src/libs/engine/Engine.hpp
+++ b/src/libs/engine/Engine.hpp
@@ -44,7 +44,6 @@ class PostProcessor;
class Event;
class QueuedEvent;
class QueuedEngineInterface;
-class LashDriver;
class Driver;
class ProcessSlave;
@@ -89,7 +88,6 @@ public:
ClientBroadcaster* broadcaster() const { return _broadcaster; }
ObjectStore* object_store() const { return _object_store; }
NodeFactory* node_factory() const { return _node_factory; }
- //LashDriver* lash_driver() const { return _lash_driver; }
/** Return the active driver for the given type */
Driver* driver(DataType type, EventType event_type);
@@ -114,7 +112,6 @@ private:
ClientBroadcaster* _broadcaster;
ObjectStore* _object_store;
NodeFactory* _node_factory;
- //LashDriver* _lash_driver;
bool _quit_flag;
bool _activated;
diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp
index cd86f91f..ea49e492 100644
--- a/src/libs/engine/JackAudioDriver.cpp
+++ b/src/libs/engine/JackAudioDriver.cpp
@@ -36,9 +36,6 @@
#include "EventSource.hpp"
#include "AudioBuffer.hpp"
#include "ProcessSlave.hpp"
-/*#ifdef HAVE_LASH
-#include "LashDriver.hpp"
-#endif*/
using namespace std;
diff --git a/src/libs/engine/JackMidiDriver.cpp b/src/libs/engine/JackMidiDriver.cpp
index c20bed8b..b5c71c10 100644
--- a/src/libs/engine/JackMidiDriver.cpp
+++ b/src/libs/engine/JackMidiDriver.cpp
@@ -29,9 +29,6 @@
#include "DuplexPort.hpp"
#include "ProcessContext.hpp"
#include "jack_compat.h"
-/*#ifdef HAVE_LASH
-#include "LashDriver.hpp"
-#endif*/
using namespace std;
namespace Ingen {
diff --git a/src/libs/engine/LashDriver.cpp b/src/libs/engine/LashDriver.cpp
deleted file mode 100644
index 641599ff..00000000
--- a/src/libs/engine/LashDriver.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007 Dave 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 <iostream>
-#include <string>
-#include <cassert>
-#include CONFIG_H_PATH
-#include "LashDriver.hpp"
-#include "App.hpp"
-
-using namespace std;
-
-namespace Ingen {
-
-
-LashDriver::LashDriver(Ingen* app, lash_args_t* args)
-: _app(app),
- _client(NULL),
- _alsa_client_id(0) // FIXME: appropriate sentinel?
-{
- _client = lash_init(args, PACKAGE_NAME,
- /*LASH_Config_Data_Set|LASH_Config_File*/0, LASH_PROTOCOL(2, 0));
- if (_client == NULL) {
- cerr << "[LashDriver] Failed to connect to LASH. Session management will not function." << endl;
- } else {
- cout << "[LashDriver] Lash initialised" << endl;
- lash_event_t* event = lash_event_new_with_type(LASH_Client_Name);
- lash_event_set_string(event, "Ingen");
- lash_send_event(_client, event);
- }
-}
-
-
-/** Set the Jack client name to be sent to LASH.
- * The name isn't actually send until restore_finished() is called.
- */
-void
-LashDriver::set_jack_client_name(const char* name)
-{
- _jack_client_name = name;
- lash_jack_client_name(_client, _jack_client_name.c_str());
-}
-
-
-/** Set the Alsa client ID to be sent to LASH.
- * The name isn't actually send until restore_finished() is called.
- */
-void
-LashDriver::set_alsa_client_id(int id)
-{
- _alsa_client_id = id;
- lash_alsa_client_id(_client, _alsa_client_id);
-}
-
-
-/** Notify LASH of our port names so it can restore connections.
- * The Alsa client ID and Jack client name MUST be set before calling
- * this function.
- */
-void
-LashDriver::restore_finished()
-{
- assert(_jack_client_name != "");
- assert(_alsa_client_id != 0);
-
- cerr << "LASH RESTORE FINISHED " << _jack_client_name << " - " << _alsa_client_id << endl;
-
- lash_jack_client_name(_client, _jack_client_name.c_str());
- lash_alsa_client_id(_client, _alsa_client_id);
-}
-
-
-void
-LashDriver::process_events()
-{
- assert(_client != NULL);
-
- lash_event_t* ev = NULL;
- lash_config_t* conf = NULL;
-
- // Process events
- while ((ev = lash_get_event(_client)) != NULL) {
- handle_event(ev);
- lash_event_destroy(ev);
- }
-
- // Process configs
- while ((conf = lash_get_config(_client)) != NULL) {
- handle_config(conf);
- lash_config_destroy(conf);
- }
-}
-
-
-void
-LashDriver::handle_event(lash_event_t* ev)
-{
- LASH_Event_Type type = lash_event_get_type(ev);
- const char* c_str = lash_event_get_string(ev);
- string str = (c_str == NULL) ? "" : c_str;
-
- //cout << "[LashDriver] LASH Event. Type = " << type << ", string = " << str << "**********" << endl;
-
- /*if (type == LASH_Save_File) {
- //cout << "[LashDriver] LASH Save File - " << str << endl;
- _app->store_window_location();
- _app->state_manager()->save(str.append("/locations"));
- lash_send_event(_client, lash_event_new_with_type(LASH_Save_File));
- } else if (type == LASH_Restore_File) {
- //cout << "[LashDriver] LASH Restore File - " << str << endl;
- _app->state_manager()->load(str.append("/locations"));
- _app->update_state();
- lash_send_event(_client, lash_event_new_with_type(LASH_Restore_File));
- } else if (type == LASH_Save_Data_Set) {
- //cout << "[LashDriver] LASH Save Data Set - " << endl;
-
- // Tell LASH we're done
- lash_send_event(_client, lash_event_new_with_type(LASH_Save_Data_Set));
- } else*/
- if (type == LASH_Quit) {
- //stop_thread();
- _client = NULL;
- _app->quit();
- } else {
- cerr << "[LashDriver] WARNING: Unhandled lash event, type " << static_cast<int>(type) << endl;
- }
-}
-
-
-void
-LashDriver::handle_config(lash_config_t* conf)
-{
- const char* key = NULL;
- const void* val = NULL;
- size_t val_size = 0;
-
- //cout << "[LashDriver] LASH Config. Key = " << key << endl;
-
- key = lash_config_get_key(conf);
- val = lash_config_get_value(conf);
- val_size = lash_config_get_value_size(conf);
-}
-
-
-} // namespace Ingen
diff --git a/src/libs/engine/LashDriver.hpp b/src/libs/engine/LashDriver.hpp
deleted file mode 100644
index 4b93749c..00000000
--- a/src/libs/engine/LashDriver.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007 Dave 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 LASHDRIVER_H
-#define LASHDRIVER_H
-
-#include <lash/lash.h>
-#include <pthread.h>
-#include <string>
-using std::string;
-
-namespace Ingen {
-
-class Ingen;
-
-
-/** Handles all support for LASH session management.
- */
-class LashDriver
-{
-public:
- LashDriver(Ingen* app, lash_args_t* args);
-
- bool enabled() { return (_client != NULL && lash_enabled(_client)); }
- void process_events();
- void set_jack_client_name(const char* name);
- void set_alsa_client_id(int id);
- void restore_finished();
-
-private:
- Ingen* _app;
- lash_client_t* _client;
-
- int _alsa_client_id;
- string _jack_client_name;
-
- void handle_event(lash_event_t* conf);
- void handle_config(lash_config_t* conf);
-};
-
-
-} // namespace Ingen
-
-#endif // LASHDRIVER_H
diff --git a/src/libs/engine/Makefile.am b/src/libs/engine/Makefile.am
index b0035ba6..3ce73124 100644
--- a/src/libs/engine/Makefile.am
+++ b/src/libs/engine/Makefile.am
@@ -196,9 +196,3 @@ libingen_engine_la_SOURCES += \
LV2Node.cpp
endif
-#if WITH_LASH
-#libingen_engine_la_SOURCES += \
-# LashDriver.hpp \
-# LashDriver.cpp
-#endif
-
diff --git a/src/libs/engine/OmInProcess.cpp b/src/libs/engine/OmInProcess.cpp
index cf821441..6a65cf38 100644
--- a/src/libs/engine/OmInProcess.cpp
+++ b/src/libs/engine/OmInProcess.cpp
@@ -22,9 +22,6 @@
#include "Engine.hpp"
#include "OSCReceiver.hpp"
#include "JackAudioDriver.hpp"
-/*#ifdef HAVE_LASH
-#include "LashDriver.hpp"
-#endif*/
extern "C"
{
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp
index dc919b20..a00f93a5 100644
--- a/src/libs/gui/App.cpp
+++ b/src/libs/gui/App.cpp
@@ -46,9 +46,6 @@
#include "ThreadedLoader.hpp"
#include "WindowFactory.hpp"
#include "Port.hpp"
-/*#ifdef HAVE_LASH
-#include "LashController.hpp"
-#endif*/
#ifdef HAVE_SLV2
#include <slv2/slv2.h>
#endif
diff --git a/src/libs/gui/LashController.cpp b/src/libs/gui/LashController.cpp
deleted file mode 100644
index 3a654100..00000000
--- a/src/libs/gui/LashController.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007 Dave 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 CONFIG_H_PATH
-#include "LashController.hpp"
-#include <iostream>
-#include <string>
-#include <cassert>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include "App.hpp"
-#include "PatchModel.hpp"
-
-using std::cerr; using std::cout; using std::endl;
-using std::string;
-
-namespace Ingen {
-namespace GUI {
-
-
-LashController::LashController(lash_args_t* args)
-: _client(NULL)
-{
- _client = lash_init(args, PACKAGE_NAME,
- /*LASH_Config_Data_Set|*/LASH_Config_File, LASH_PROTOCOL(2, 0));
- if (_client == NULL) {
- cerr << "[LashController] Failed to connect to LASH. Session management will not function." << endl;
- } else {
- cout << "[LashController] Lash initialised" << endl;
- }
-
- lash_event_t* event = lash_event_new_with_type(LASH_Client_Name);
- lash_event_set_string(event, "Ingen");
- lash_send_event(_client, event);
-}
-
-
-LashController::~LashController()
-{
- if (_client != NULL) {
- lash_event_t* quit_event = lash_event_new_with_type(LASH_Quit);
- lash_send_event(_client, quit_event);
- }
-}
-
-
-void
-LashController::process_events()
-{
- assert(_client != NULL);
-
- lash_event_t* ev = NULL;
- lash_config_t* conf = NULL;
-
- // Process events
- while ((ev = lash_get_event(_client)) != NULL) {
- handle_event(ev);
- lash_event_destroy(ev);
- }
-
- // Process configs
- while ((conf = lash_get_config(_client)) != NULL) {
- handle_config(conf);
- lash_config_destroy(conf);
- }
-}
-
-
-void
-LashController::handle_event(lash_event_t* ev)
-{
- assert(ev != NULL);
-
- LASH_Event_Type type = lash_event_get_type(ev);
- const char* c_str = lash_event_get_string(ev);
- string str = (c_str == NULL) ? "" : c_str;
-
- if (type == LASH_Save_File) {
- cout << "[LashController] LASH Save File - " << str << endl;
- save(str);
- lash_send_event(_client, lash_event_new_with_type(LASH_Save_File));
- } else if (type == LASH_Restore_File) {
- cout << "[LashController] LASH Restore File - " << str << endl;
- cerr << "LASH RESTORE NOT YET (RE)IMPLEMENTED." << endl;
- /*_controller->load_session_blocking(str + "/session");
- _controller->lash_restore_finished();
- lash_send_event(_client, lash_event_new_with_type(LASH_Restore_File));
- */
- /*} else if (type == LASH_Save_Data_Set) {
- //cout << "[LashController] LASH Save Data Set - " << endl;
-
- // Tell LASH we're done
- lash_send_event(_client, lash_event_new_with_type(LASH_Save_Data_Set));
- */
- } else if (type == LASH_Quit) {
- cout << "[LashController] LASH Quit" << endl;
- _client = NULL;
- App::instance().quit();
- } else {
- cerr << "[LashController] Unhandled LASH event, type: " << static_cast<int>(type) << endl;
- }
-}
-
-
-void
-LashController::handle_config(lash_config_t* conf)
-{
- assert(conf != NULL);
-
- const char* key = NULL;
- const void* val = NULL;
- size_t val_size = 0;
-
- cout << "[LashController] LASH Config. Key = " << key << endl;
-
- key = lash_config_get_key(conf);
- val = lash_config_get_value(conf);
- val_size = lash_config_get_value_size(conf);
-}
-
-void
-LashController::save(const string& dir)
-{
- cerr << "LASH SAVING NOT YET (RE)IMPLEMENTED\n";
- /*
- PatchController* pc = NULL;
-
- // Save every patch under dir with it's path as a filename
- // (so the dir structure will resemble the patch heirarchy)
- for (map<string,PatchController*>::iterator i = _app->patches().begin();
- i != _app->patches().end(); ++i) {
- pc = (*i).second;
- pc->model()->filename(dir + pc->model()->path() + ".om");
- }
-
- // Create directories
- for (map<string,PatchController*>::iterator i = _app->patches().begin();
- i != _app->patches().end(); ++i) {
- pc = (*i).second;
- if (pc->model()->parent() != NULL) {
- string path = Path::parent(pc->model()->path()).substr(1) + "/";
- while (path.find("/") != string::npos) {
- mkdir(string(dir +"/"+ path.substr(0, path.find("/"))).c_str(), 0744);
- path = path.substr(path.find("/")+1);
- }
- }
- _controller->save_patch_blocking(pc->model(), pc->model()->filename(), false);
- }
-
- //m_app->state_manager()->save(str + "/omgtkrc");
- _controller->save_session_blocking(dir + "/session");
- */
-}
-
-} // namespace GUI
-} // namespace Ingen
diff --git a/src/libs/gui/LashController.hpp b/src/libs/gui/LashController.hpp
deleted file mode 100644
index f47eb5e9..00000000
--- a/src/libs/gui/LashController.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/* This file is part of IngenGtk.
- * Copyright (C) 2007 Dave 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 LASHCONTROLLER_H
-#define LASHCONTROLLER_H
-
-#include <string>
-#include <lash/lash.h>
-using std::string;
-
-namespace Ingen {
-namespace GUI {
-
-class App;
-
-/* Old and unused LASH controller.
- *
- * \ingroup GUI
- */
-class LashController
-{
-public:
- LashController(lash_args_t* args);
- ~LashController();
-
- bool enabled() { return lash_enabled(_client); }
- void process_events();
-
-private:
- void save(const string& dir);
-
- lash_client_t* _client;
-
- void handle_event(lash_event_t* conf);
- void handle_config(lash_config_t* conf);
-};
-
-
-} // namespace GUI
-} // namespace Ingen
-
-#endif // LASHCONTROLLER_H