Prefix all env variable with "ARDOUR_"
authorRobin Gareus <robin@gareus.org>
Fri, 26 Jul 2019 14:44:29 +0000 (16:44 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 26 Jul 2019 14:44:29 +0000 (16:44 +0200)
In particular "CONCURRENCY" can be problematic. But in general
it's good practice to use a namespace prefix for app-specifics.

libs/ardour/ardour/dsp_load_calculator.h
libs/ardour/globals.cc
libs/backends/alsa/alsa_audiobackend.cc
libs/backends/coreaudio/coremidi_io.cc
libs/pbd/cpus.cc
libs/widgets/fastmeter.cc

index 32f24285cf7764a2e44ead33e2c5dec82b7d3bc7..3a7de6a2395e8a2f336ff996856bc3f6a97e37c3 100644 (file)
@@ -73,7 +73,7 @@ public:
                }
 
 #ifndef NDEBUG
-               const bool calc_avg_load = NULL != getenv("AVGLOAD");
+               const bool calc_avg_load = NULL != getenv("ARDOUR_AVG_DSP_LOAD");
 #else
                const bool calc_avg_load = false;
 #endif
index e42c0d5ca9fc26b5b67ff8c20c801f76365c1433..7f7d9f582bf82a5c765c03d11dd4c1594c6c89df 100644 (file)
@@ -439,7 +439,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
        }
 
 #ifndef NDEBUG
-       if (getenv("LUA_METATABLES")) {
+       if (getenv("ARDOUR_LUA_METATABLES")) {
                luabridge::Security::setHideMetatables (false);
        }
 #endif
index 69a23c19127f062167fc6fb1cc313044ced4e7b4..0523c411b5e173d2ef9e7c10e7e0dc06acdd671f 100644 (file)
@@ -958,10 +958,10 @@ AlsaAudioBackend::_start (bool for_latency_measurement)
 
        _midi_device_thread_active = listen_for_midi_device_changes ();
 
-#if 1
-       if (NULL != getenv ("ALSAEXT")) {
+#if 1 // TODO: we need a GUI (and API) for this
+       if (NULL != getenv ("ARDOUR_ALSA_EXT")) {
                boost::char_separator<char> sep (";");
-               boost::tokenizer<boost::char_separator<char> > devs (std::string(getenv ("ALSAEXT")), sep);
+               boost::tokenizer<boost::char_separator<char> > devs (std::string(getenv ("ARDOUR_ALSA_EXT")), sep);
                BOOST_FOREACH (const std::string& tmp, devs) {
                        std::string dev (tmp);
                        std::string::size_type n = dev.find ('@');
index 7cfe2e0db333b996df39e20e6c957158c76d8e92..8b0098616728458501a85d885e649ca69d2012f4 100644 (file)
@@ -153,7 +153,7 @@ CoreMidiIo::CoreMidiIo()
        pthread_mutex_init (&_discovery_lock, 0);
 
 #ifndef NDEBUG
-       const char *p = getenv ("COREMIDIDEBUG");
+       const char *p = getenv ("ARDOUR_COREMIDI_DEBUG");
        if (p && *p) _debug_mode = atoi (p);
 #endif
 }
index af58221a1f12ed33805028203cf32209595ee2fd..b52be1ccffb266ed1a5b6fd96c2e23d67e60ea24 100644 (file)
@@ -43,8 +43,8 @@
 uint32_t
 hardware_concurrency()
 {
-       if (getenv("CONCURRENCY")) {
-               int c = atoi (getenv("CONCURRENCY"));
+       if (getenv("ARDOUR_CONCURRENCY")) {
+               int c = atoi (getenv("ARDOUR_CONCURRENCY"));
                if (c > 0) {
                        return c;
                }
index a9ecf5dad660a844a7d91b0db5bb1383d08d25d4..8dc89f07e1930dfc2733c72397bea2beb69621be 100644 (file)
@@ -74,7 +74,7 @@ FastMeter::FastMeter (long hold, unsigned long dimen, Orientation o, int len,
        last_peak_rect.x = 0;
        last_peak_rect.y = 0;
 
-       no_rgba_overlay = ! Glib::getenv("NO_METER_SHADE").empty();
+       no_rgba_overlay = ! Glib::getenv("ARDOUR_NO_METER_SHADE").empty();
 
        _clr[0] = clr0;
        _clr[1] = clr1;