mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2025-01-03 20:25:29 +00:00
ALSA: be ready for /dev/snd to not be available
If this occurs, the system has no ALSA support in the kernel, and it is appropriate for the backend to fail. closes #6
This commit is contained in:
parent
85c2190675
commit
918183adc6
|
@ -1814,13 +1814,14 @@ int soundio_alsa_init(SoundIoPrivate *si) {
|
||||||
assert(err != EFAULT);
|
assert(err != EFAULT);
|
||||||
assert(err != EINVAL);
|
assert(err != EINVAL);
|
||||||
assert(err != ENAMETOOLONG);
|
assert(err != ENAMETOOLONG);
|
||||||
assert(err != ENOENT);
|
|
||||||
destroy_alsa(si);
|
destroy_alsa(si);
|
||||||
if (err == ENOSPC) {
|
if (err == ENOSPC) {
|
||||||
return SoundIoErrorSystemResources;
|
return SoundIoErrorSystemResources;
|
||||||
} else {
|
} else if (err == ENOMEM) {
|
||||||
assert(err == ENOMEM);
|
|
||||||
return SoundIoErrorNoMem;
|
return SoundIoErrorNoMem;
|
||||||
|
} else {
|
||||||
|
// Kernel must not have ALSA support.
|
||||||
|
return SoundIoErrorInitAudioBackend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue