Improvements to device selection

This commit is contained in:
Jonas Kvinge
2018-06-07 19:38:40 +02:00
parent d45f8672cd
commit 60b55b6d7d
10 changed files with 66 additions and 57 deletions

View File

@@ -60,9 +60,9 @@ QList<DeviceFinder::Device> AlsaDeviceFinder::ListDevices() {
result = snd_card_next(&card);
if (result < 0) {
qLog(Error) << "Unable to get soundcard:" << snd_strerror(result);
return ret;
break;
}
if (card < 0) return ret;
if (card < 0) break;
char name[32];
sprintf(name, "hw:%d", card);
@@ -109,9 +109,6 @@ QList<DeviceFinder::Device> AlsaDeviceFinder::ListDevices() {
snd_ctl_close(handle);
}
snd_pcm_info_free(pcminfo); pcminfo = NULL;
snd_ctl_card_info_free(cardinfo); cardinfo = NULL;
snd_config_update_free_global();
return ret;