mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
Hide Dummy backend from optimized release builds
Prepare to bundle session-utils with releases. Session-utils use libardour which needs an Engine. "Dummy" is the only engine that always works
This commit is contained in:
parent
b997232aad
commit
74ba1b2691
1 changed files with 12 additions and 0 deletions
|
|
@ -775,12 +775,24 @@ AudioEngine::backend_discover (const string& path)
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool running_from_source_tree ()
|
||||||
|
{
|
||||||
|
// dup ARDOUR_UI_UTILS::running_from_source_tree ()
|
||||||
|
gchar const *x = g_getenv ("ARDOUR_THEMES_PATH");
|
||||||
|
return x && (string (x).find ("gtk2_ardour") != string::npos);
|
||||||
|
}
|
||||||
|
|
||||||
vector<const AudioBackendInfo*>
|
vector<const AudioBackendInfo*>
|
||||||
AudioEngine::available_backends() const
|
AudioEngine::available_backends() const
|
||||||
{
|
{
|
||||||
vector<const AudioBackendInfo*> r;
|
vector<const AudioBackendInfo*> r;
|
||||||
|
|
||||||
for (BackendMap::const_iterator i = _backends.begin(); i != _backends.end(); ++i) {
|
for (BackendMap::const_iterator i = _backends.begin(); i != _backends.end(); ++i) {
|
||||||
|
#ifdef NDEBUG
|
||||||
|
if (i->first == "None (Dummy)" && !running_from_source_tree ()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
r.push_back (i->second);
|
r.push_back (i->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue