Prefix all env variable with "ARDOUR_"

In particular "CONCURRENCY" can be problematic. But in general
it's good practice to use a namespace prefix for app-specifics.
This commit is contained in:
Robin Gareus 2019-07-26 16:44:29 +02:00
parent b759fb883e
commit 78fc6d6651
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
6 changed files with 9 additions and 9 deletions

View 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

View 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

View 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 ('@');

View 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
}

View 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;
}

View 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;