projects/guix·blob python-team · refs

191 lines · 5.7 KiB

1Remove any reference to LASH, which has been abandoned and still requires the
2use of Python 2.
3
4diff --git a/Makefile b/Makefile
5index 7c9f4f0..f82ba75 100644
6--- a/Makefile
7+++ b/Makefile
8@@ -10,7 +10,7 @@ PACKAGE_WEBPAGE = "http://ll-plugins.nongnu.org/azr3/"
9 PACKAGE_BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=ll-plugins"
10 PACKAGE_VC = "http://git.savannah.gnu.org/cgit/ll-plugins/azr3-jack.git/"
11
12-PKG_DEPS = gtkmm-2.4>=2.8.8 jack>=0.103.0 lash-1.0>=0.5.3
13+PKG_DEPS = gtkmm-2.4>=2.8.8 jack>=0.103.0
14
15
16 PROGRAMS = azr3
17@@ -32,8 +32,8 @@ azr3_SOURCES = \
18 drawbar.hpp drawbar.cpp \
19 textbox.hpp textbox.cpp
20 azr3_SOURCEDIR = azr3
21-azr3_CFLAGS = `pkg-config --cflags gtkmm-2.4 jack lash-1.0` -DDATADIR=\"$(pkgdatadir)\"
22-azr3_LDFLAGS = `pkg-config --libs gtkmm-2.4 jack lash-1.0` -lpthread
23+azr3_CFLAGS = `pkg-config --cflags gtkmm-2.4 jack` -DDATADIR=\"$(pkgdatadir)\"
24+azr3_LDFLAGS = `pkg-config --libs gtkmm-2.4 jack` -lpthread
25 azr3_cpp_CFLAGS = $(shell if pkg-config --atleast-version=0.107 jack ; then echo -include azr3/newjack.hpp; fi)
26 main_cpp_CFLAGS = -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
27
28diff --git a/azr3/main.cpp b/azr3/main.cpp
29index 344fd03..fbe5671 100644
30--- a/azr3/main.cpp
31+++ b/azr3/main.cpp
32@@ -32,13 +32,6 @@ using namespace std;
33
34
35 Main::Main(int& argc, char**& argv) : m_ok(false) {
36-
37- /* this is a bit dumb, but the only way I know of to check whether we were
38- started by lashd is to see if lash_extract_args() removes any arguments */
39- int old_argc = argc;
40- lash_args_t* lash_args = lash_extract_args(&argc, &argv);
41- m_started_by_lashd = (argc != old_argc);
42-
43 // parse all non-LASH arguments
44 OptionParser op;
45 bool help(false);
46@@ -166,10 +159,6 @@ Main::Main(int& argc, char**& argv) : m_ok(false) {
47 }
48 }
49
50- // initialise LASH
51- if (!init_lash(lash_args, jack_get_client_name(m_jack_client)))
52- return;
53-
54 m_win->set_title("AZR-3");
55 m_win->set_resizable(false);
56 m_win->add(*m_gui);
57@@ -184,14 +173,11 @@ void Main::run() {
58 jack_activate(m_jack_client);
59
60 // auto-connect JACK ports if desired
61- if (!m_started_by_lashd)
62- auto_connect();
63+ auto_connect();
64
65 Glib::signal_timeout().
66 connect(sigc::bind_return(sigc::mem_fun(*this, &Main::check_changes),
67 true), 10);
68- Glib::signal_timeout().
69- connect(sigc::mem_fun(*this, &Main::check_lash_events), 500);
70 m_kit->run(*m_win);
71 jack_deactivate(m_jack_client);
72 m_engine->deactivate();
73@@ -343,83 +329,7 @@ int Main::process(jack_nframes_t nframes) {
74
75 return 0;
76 }
77-
78-
79-bool Main::check_lash_events() {
80- lash_event_t* event;
81- bool go_on = true;
82- while ((event = lash_get_event(m_lash_client))) {
83-
84- // save
85- if (lash_event_get_type(event) == LASH_Save_File) {
86- cerr<<"Received LASH Save command"<<endl;
87- string dir(lash_event_get_string(event));
88- ofstream fout((dir + "/state").c_str());
89- fout<<int(m_program);
90- for (uint32_t i = 0; i < 63; ++i)
91- fout<<" "<<m_gui_controls[i];
92- fout<<endl;
93- write_presets((dir + "/presets").c_str());
94- lash_send_event(m_lash_client,
95- lash_event_new_with_type(LASH_Save_File));
96- }
97-
98- // restore
99- else if (lash_event_get_type(event) == LASH_Restore_File) {
100- cerr<<"Received LASH Restore command"<<endl;
101- string dir(lash_event_get_string(event));
102- for (unsigned char i = 0; i < 128; ++i)
103- m_presets[i].empty = true;
104- load_presets((dir + "/presets").c_str());
105- m_gui->clear_programs();
106- for (unsigned char i = 0; i < 128; ++i) {
107- if (!m_presets[i].empty)
108- m_gui->add_program(i, m_presets[i].name.c_str());
109- }
110- ifstream fin((dir + "/state").c_str());
111- int prog;
112- fin>>prog;
113- m_gui->set_program(prog);
114- for (uint32_t p = 0; p < 63; ++p) {
115- float tmp;
116- fin>>tmp;
117- m_gui->set_control(p, tmp);
118- }
119- lash_send_event(m_lash_client,
120- lash_event_new_with_type(LASH_Restore_File));
121- }
122-
123- // quit
124- else if (lash_event_get_type(event) == LASH_Quit) {
125- cerr<<"Received LASH Quit command"<<endl;
126- Gtk::Main::instance()->quit();
127- go_on = false;
128- }
129-
130- lash_event_destroy(event);
131- }
132- return go_on;
133-}
134-
135-
136-bool Main::init_lash(lash_args_t* lash_args, const std::string& jack_name) {
137-
138- m_lash_client = lash_init(lash_args, "AZR-3",
139- LASH_Config_File, LASH_PROTOCOL(2, 0));
140- if (m_lash_client) {
141- lash_event_t* event = lash_event_new_with_type(LASH_Client_Name);
142- lash_event_set_string(event, "AZR-3");
143- lash_send_event(m_lash_client, event);
144- lash_jack_client_name(m_lash_client, jack_name.c_str());
145- Glib::signal_timeout().
146- connect(sigc::mem_fun(*this, &Main::check_lash_events), 500);
147- }
148- else
149- cerr<<"Could not initialise LASH!"<<endl;
150- return (m_lash_client != 0);
151-}
152-
153-
154+
155 int Main::static_process(jack_nframes_t frames, void* arg) {
156 return static_cast<Main*>(arg)->process(frames);
157 }
158diff --git a/azr3/main.hpp b/azr3/main.hpp
159index 48a425c..0406295 100644
160--- a/azr3/main.hpp
161+++ b/azr3/main.hpp
162@@ -25,7 +25,6 @@
163 #include <gtkmm.h>
164 #include <pthread.h>
165 #include <semaphore.h>
166-#include <lash/lash.h>
167
168 #include "azr3.hpp"
169 #include "azr3gui.hpp"
170@@ -65,10 +64,6 @@ protected:
171
172 int process(jack_nframes_t nframes);
173
174- bool check_lash_events();
175-
176- bool init_lash(lash_args_t* lash_args, const std::string& jack_name);
177-
178 void auto_connect();
179
180 static int static_process(jack_nframes_t frames, void* arg);
181@@ -89,10 +84,8 @@ protected:
182 sem_t m_gui_changed;
183 float m_gui_controls[63];
184 Preset m_presets[128];
185- lash_client_t* m_lash_client;
186
187 bool m_ok;
188- bool m_started_by_lashd;
189 std::string m_auto_midi;
190 std::string m_auto_audio;
191