Improvements to device selection
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user