use abort() to exit after a "die" call and fix the logic of opening the alsa device -- success was causing it to die, duh.
This commit is contained in:
+3
-2
@@ -299,12 +299,13 @@ int actual_open_alsa_device(void) {
|
||||
// SND_PCM_NONBLOCK);
|
||||
ret = snd_pcm_open(&alsa_handle, alsa_out_dev, SND_PCM_STREAM_PLAYBACK, 0);
|
||||
if (ret < 0) {
|
||||
if (ret == -ENOENT)
|
||||
die("alsa: can't find output device \"%s\".", alsa_out_dev);
|
||||
if (ret == -ENOENT) {
|
||||
die("the alsa output_device \"%s\" can not be found.", alsa_out_dev);
|
||||
} else {
|
||||
char errorstring[1024];
|
||||
strerror_r(-ret, (char *)errorstring, sizeof(errorstring));
|
||||
die("alsa: error %d (\"%s\") opening alsa device \"%s\".", ret, (char *)errorstring, alsa_out_dev);
|
||||
}
|
||||
}
|
||||
|
||||
snd_pcm_hw_params_alloca(&alsa_params);
|
||||
|
||||
Reference in New Issue
Block a user