From 3cc4ee8029f9e48c618719af9df9c35c3505e201 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 21 Feb 2016 12:44:54 -0500 Subject: alsa: allow environment variable ARDOUR_ALSA_DEVICE to identify a single, arbitrary ALSA PCM name as the only available/allowed device --- libs/ardouralsautil/devicelist.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs/ardouralsautil/devicelist.cc') diff --git a/libs/ardouralsautil/devicelist.cc b/libs/ardouralsautil/devicelist.cc index 3fdb1401af..f642733182 100644 --- a/libs/ardouralsautil/devicelist.cc +++ b/libs/ardouralsautil/devicelist.cc @@ -18,6 +18,8 @@ */ #include +#include + #include "pbd/convert.h" #include "ardouralsautil/devicelist.h" @@ -34,6 +36,12 @@ ARDOUR::get_alsa_audio_device_names (std::map& devices string devname; int cardnum = -1; int device = -1; + const char* fixed_name; + + if ((fixed_name = g_getenv ("ARDOUR_ALSA_DEVICE"))) { + devices.insert (make_pair (fixed_name, fixed_name)); + return; + } assert (duplex > 0); -- cgit v1.2.3