mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Speculative tweak to offer non-duplex as well as full-duplex ALSA cards in the engine dialogue. Should fix #3327.
git-svn-id: svn://localhost/ardour2/branches/3.0@7447 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e2b5f355fb
commit
9a6042dbc8
1 changed files with 0 additions and 17 deletions
|
|
@ -771,28 +771,11 @@ EngineControl::enumerate_alsa_devices ()
|
||||||
|
|
||||||
while (snd_ctl_pcm_next_device (handle, &device) >= 0 && device >= 0) {
|
while (snd_ctl_pcm_next_device (handle, &device) >= 0 && device >= 0) {
|
||||||
|
|
||||||
bool have_playback = false;
|
|
||||||
bool have_capture = false;
|
|
||||||
|
|
||||||
/* find duplex devices only */
|
|
||||||
|
|
||||||
snd_pcm_info_set_device (pcminfo, device);
|
|
||||||
snd_pcm_info_set_subdevice (pcminfo, 0);
|
|
||||||
snd_pcm_info_set_stream (pcminfo, SND_PCM_STREAM_CAPTURE);
|
|
||||||
|
|
||||||
if (snd_ctl_pcm_info (handle, pcminfo) >= 0) {
|
|
||||||
have_capture = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
snd_pcm_info_set_device (pcminfo, device);
|
snd_pcm_info_set_device (pcminfo, device);
|
||||||
snd_pcm_info_set_subdevice (pcminfo, 0);
|
snd_pcm_info_set_subdevice (pcminfo, 0);
|
||||||
snd_pcm_info_set_stream (pcminfo, SND_PCM_STREAM_PLAYBACK);
|
snd_pcm_info_set_stream (pcminfo, SND_PCM_STREAM_PLAYBACK);
|
||||||
|
|
||||||
if (snd_ctl_pcm_info (handle, pcminfo) >= 0) {
|
if (snd_ctl_pcm_info (handle, pcminfo) >= 0) {
|
||||||
have_playback = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (have_capture && have_playback) {
|
|
||||||
devs.push_back (snd_pcm_info_get_name (pcminfo));
|
devs.push_back (snd_pcm_info_get_name (pcminfo));
|
||||||
devname += ',';
|
devname += ',';
|
||||||
devname += to_string (device, std::dec);
|
devname += to_string (device, std::dec);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue