mirror of
https://github.com/Ryujinx/libsoundio.git
synced 2024-12-22 18:25:35 +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 != EINVAL);
|
||||
assert(err != ENAMETOOLONG);
|
||||
assert(err != ENOENT);
|
||||
destroy_alsa(si);
|
||||
if (err == ENOSPC) {
|
||||
return SoundIoErrorSystemResources;
|
||||
} else {
|
||||
assert(err == ENOMEM);
|
||||
} else if (err == ENOMEM) {
|
||||
return SoundIoErrorNoMem;
|
||||
} else {
|
||||
// Kernel must not have ALSA support.
|
||||
return SoundIoErrorInitAudioBackend;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue