13
0

alsa: allow environment variable ARDOUR_ALSA_DEVICE to identify a single, arbitrary ALSA PCM name as the only available/allowed device

This commit is contained in:
Paul Davis 2016-02-21 12:44:54 -05:00
parent 2d18283379
commit 3cc4ee8029

View File

@ -18,6 +18,8 @@
*/
#include <alsa/asoundlib.h>
#include <glib.h>
#include "pbd/convert.h"
#include "ardouralsautil/devicelist.h"
@ -34,6 +36,12 @@ ARDOUR::get_alsa_audio_device_names (std::map<std::string, std::string>& 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<string,string> (fixed_name, fixed_name));
return;
}
assert (duplex > 0);