diff options
author | David Robillard <d@drobilla.net> | 2011-01-08 15:28:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-08 15:28:48 +0000 |
commit | 4c41b9240003e88c7dae7ba10dcca5ccd5a911dc (patch) | |
tree | 6e79c9e5388d174b18a7706684f0e097a3abc430 | |
parent | f8381e5fa077ad03e270b8697fa9d094c845fe14 (diff) | |
download | patchage-4c41b9240003e88c7dae7ba10dcca5ccd5a911dc.tar.gz patchage-4c41b9240003e88c7dae7ba10dcca5ccd5a911dc.tar.bz2 patchage-4c41b9240003e88c7dae7ba10dcca5ccd5a911dc.zip |
Fix configuration header define names to not stomp on global namespace.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2794 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/Patchage.cpp | 28 | ||||
-rw-r--r-- | src/PatchageCanvas.cpp | 10 | ||||
-rw-r--r-- | src/PatchageEvent.cpp | 4 | ||||
-rw-r--r-- | src/PatchageEvent.hpp | 2 | ||||
-rw-r--r-- | src/PortID.hpp | 10 | ||||
-rw-r--r-- | wscript | 6 |
6 files changed, 30 insertions, 30 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 48f69ae..ce41180 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -37,7 +37,7 @@ #if defined(HAVE_JACK_DBUS) #include "JackDbusDriver.hpp" -#elif defined(USE_LIBJACK) +#elif defined(PATCHAGE_LIBJACK) #include "JackDriver.hpp" #include <jack/statistics.h> #endif @@ -158,7 +158,7 @@ Patchage::Patchage(int argc, char** argv) } else if (!strcmp(*argv, "-A") || !strcmp(*argv, "--no-alsa")) { _alsa_driver_autoattach = false; #endif -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) } else if (!strcmp(*argv, "-J") || !strcmp(*argv, "--no-jack")) { _jack_driver_autoattach = false; #endif @@ -251,7 +251,7 @@ Patchage::Patchage(int argc, char** argv) _about_win->set_transient_for(*_main_win); -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) _jack_driver = new JackDriver(this); _jack_driver->signal_detached.connect(sigc::mem_fun(this, &Patchage::driver_detached)); @@ -287,7 +287,7 @@ Patchage::Patchage(int argc, char** argv) Patchage::~Patchage() { -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) delete _jack_driver; #endif #ifdef HAVE_ALSA @@ -313,7 +313,7 @@ Patchage::attach() { _enable_refresh = false; -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) if (_jack_driver_autoattach) _jack_driver->attach(true); #endif @@ -342,7 +342,7 @@ Patchage::idle_callback() } // Process any JACK events -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) if (_jack_driver) { _jack_driver->process_events(this); } @@ -359,7 +359,7 @@ Patchage::idle_callback() if (_refresh) { refresh(); } else if (_driver_detached) { -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) if (_jack_driver && !_jack_driver->is_attached()) _jack_driver->destroy_all(); #endif @@ -388,7 +388,7 @@ Patchage::idle_callback() void Patchage::update_toolbar() { -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) if (_enable_refresh && _jack_driver->is_attached()) { _enable_refresh = false; _buffer_size_combo->set_active((int)log2f(_jack_driver->buffer_size()) - 5); @@ -401,7 +401,7 @@ Patchage::update_toolbar() bool Patchage::update_load() { -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) if (!_jack_driver->is_attached()) return true; @@ -441,7 +441,7 @@ Patchage::refresh() _canvas->destroy(); -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) if (_jack_driver) _jack_driver->refresh(); #endif @@ -478,7 +478,7 @@ Patchage::store_window_location() void Patchage::clear_load() { -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) _main_xrun_progress->set_fraction(0.0); _jack_driver->reset_xruns(); _jack_driver->reset_max_dsp_load(); @@ -539,7 +539,7 @@ Patchage::update_state() void Patchage::connect_widgets() { -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) _jack_driver->signal_attached.connect( sigc::mem_fun(this, &Patchage::update_toolbar)); _jack_driver->signal_attached.connect(sigc::bind( @@ -657,7 +657,7 @@ Patchage::on_quit() #ifdef HAVE_ALSA _alsa_driver->detach(); #endif -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) _jack_driver->detach(); #endif _main_win->hide(); @@ -713,7 +713,7 @@ Patchage::on_scroll(GdkEventScroll* ev) void Patchage::buffer_size_changed() { -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) const int selected = _buffer_size_combo->get_active_row_number(); if (selected == -1) { diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index 48ce657..a8cd0e7 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -22,7 +22,7 @@ #if defined(HAVE_JACK_DBUS) #include "JackDbusDriver.hpp" -#elif defined(USE_LIBJACK) +#elif defined(PATCHAGE_LIBJACK) #include "JackDriver.hpp" #endif #ifdef HAVE_ALSA @@ -75,7 +75,7 @@ PatchageCanvas::find_port(const PortID& id) return i->second; } -#ifdef USE_LIBJACK +#ifdef PATCHAGE_LIBJACK // Alsa ports are always indexed (or don't exist at all) if (id.type == PortID::JACK_ID) { jack_port_t* jack_port = jack_port_by_id(_app->jack_driver()->client(), id.id.jack_id); @@ -95,7 +95,7 @@ PatchageCanvas::find_port(const PortID& id) if (pp) index_port(id, pp); } -#endif // USE_LIBJACK +#endif // PATCHAGE_LIBJACK return pp; } @@ -146,7 +146,7 @@ PatchageCanvas::connect(boost::shared_ptr<Connectable> port1, boost::shared_ptr< if ((p1->type() == JACK_AUDIO && p2->type() == JACK_AUDIO) || ((p1->type() == JACK_MIDI && p2->type() == JACK_MIDI))) { -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) _app->jack_driver()->connect(p1, p2); #endif #ifdef HAVE_ALSA @@ -182,7 +182,7 @@ PatchageCanvas::disconnect(boost::shared_ptr<Connectable> port1, boost::shared_p if ((input->type() == JACK_AUDIO && output->type() == JACK_AUDIO) || (input->type() == JACK_MIDI && output->type() == JACK_MIDI)) { -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) _app->jack_driver()->disconnect(output, input); #endif #ifdef HAVE_ALSA diff --git a/src/PatchageEvent.cpp b/src/PatchageEvent.cpp index dffbff3..694c628 100644 --- a/src/PatchageEvent.cpp +++ b/src/PatchageEvent.cpp @@ -26,7 +26,7 @@ #include "Driver.hpp" #if defined(HAVE_JACK_DBUS) #include "JackDbusDriver.hpp" -#elif defined(USE_LIBJACK) +#elif defined(PATCHAGE_LIBJACK) #include "JackDriver.hpp" #endif #ifdef HAVE_ALSA @@ -62,7 +62,7 @@ PatchageEvent::execute(Patchage* patchage) Driver* driver = NULL; if (_port_1.type == PortID::JACK_ID) { -#if defined(USE_LIBJACK) || defined(HAVE_JACK_DBUS) +#if defined(PATCHAGE_LIBJACK) || defined(HAVE_JACK_DBUS) driver = patchage->jack_driver(); #endif #ifdef HAVE_ALSA diff --git a/src/PatchageEvent.hpp b/src/PatchageEvent.hpp index 1650657..09f5803 100644 --- a/src/PatchageEvent.hpp +++ b/src/PatchageEvent.hpp @@ -22,7 +22,7 @@ #include "patchage-config.h" -#ifdef USE_LIBJACK +#ifdef PATCHAGE_LIBJACK #include <jack/jack.h> #endif #ifdef HAVE_ALSA diff --git a/src/PortID.hpp b/src/PortID.hpp index b1f8444..35f8b53 100644 --- a/src/PortID.hpp +++ b/src/PortID.hpp @@ -23,7 +23,7 @@ #include "patchage-config.h" -#ifdef USE_LIBJACK +#ifdef PATCHAGE_LIBJACK #include <jack/jack.h> #endif #ifdef HAVE_ALSA @@ -40,7 +40,7 @@ struct PortID { enum { NULL_PORT_ID, JACK_ID, ALSA_ADDR } type; -#ifdef USE_LIBJACK +#ifdef PATCHAGE_LIBJACK PortID(jack_port_id_t jack_id, bool ign=false) : type(JACK_ID) { id.jack_id = jack_id; } #endif @@ -51,7 +51,7 @@ struct PortID { #endif union { -#ifdef USE_LIBJACK +#ifdef PATCHAGE_LIBJACK jack_port_id_t jack_id; #endif #ifdef HAVE_ALSA @@ -70,7 +70,7 @@ operator<<(std::ostream& os, const PortID& id) case PortID::NULL_PORT_ID: return os << "(null)"; case PortID::JACK_ID: -#ifdef USE_LIBJACK +#ifdef PATCHAGE_LIBJACK return os << "jack:" << id.id.jack_id; #endif break; @@ -94,7 +94,7 @@ operator<(const PortID& a, const PortID& b) case PortID::NULL_PORT_ID: return true; case PortID::JACK_ID: -#ifdef USE_LIBJACK +#ifdef PATCHAGE_LIBJACK return a.id.jack_id < b.id.jack_id; #endif break; @@ -61,7 +61,7 @@ def configure(conf): else: autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.107.0', mandatory=False) if conf.env['HAVE_JACK'] == 1: - autowaf.define(conf, 'USE_LIBJACK', 1) + autowaf.define(conf, 'PATCHAGE_LIBJACK', 1) autowaf.define(conf, 'HAVE_JACK_MIDI', int(conf.env['HAVE_JACK'] == 1 or conf.env['HAVE_JACK_DBUS'] == 1)) @@ -90,7 +90,7 @@ def configure(conf): autowaf.display_msg(conf, "App human name", "'" + conf.env['APP_HUMAN_NAME'] + "'", 'CYAN') autowaf.display_msg(conf, "Jack (D-Bus)", str(conf.env['HAVE_JACK_DBUS'])) autowaf.display_msg(conf, "LASH (D-Bus)", str(conf.env['HAVE_LASH'] == 1)) - autowaf.display_msg(conf, "Jack (libjack)", str(conf.env['USE_LIBJACK'] == 1)) + autowaf.display_msg(conf, "Jack (libjack)", str(conf.env['PATCHAGE_LIBJACK'] == 1)) autowaf.display_msg(conf, "Alsa Sequencer", str(conf.env['HAVE_ALSA'] == 1)) print @@ -125,7 +125,7 @@ def build(bld): ''' if bld.env['HAVE_LASH'] or bld.env['HAVE_JACK_DBUS']: prog.source += ' src/DBus.cpp ' - if bld.env['USE_LIBJACK']: + if bld.env['PATCHAGE_LIBJACK']: prog.source += ' src/JackDriver.cpp ' prog.uselib += ' JACK ' if bld.env['HAVE_ALSA'] == 1: |