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:
parent
2d18283379
commit
3cc4ee8029
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user