mirror of https://github.com/snes9xgit/snes9x.git
Add error message if /dev/dsp fails to open
This commit is contained in:
parent
2f4ed1143a
commit
33929f5b65
|
@ -1442,7 +1442,10 @@ bool8 S9xOpenSoundDevice (void)
|
||||||
|
|
||||||
so.sound_fd = open(sound_device, O_WRONLY | O_NONBLOCK);
|
so.sound_fd = open(sound_device, O_WRONLY | O_NONBLOCK);
|
||||||
if (so.sound_fd == -1)
|
if (so.sound_fd == -1)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ERROR: Failed to open sound device %s for writing.\n", sound_device);
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
J = log2(unixSettings.SoundFragmentSize) | (3 << 16);
|
J = log2(unixSettings.SoundFragmentSize) | (3 << 16);
|
||||||
if (ioctl(so.sound_fd, SNDCTL_DSP_SETFRAGMENT, &J) == -1)
|
if (ioctl(so.sound_fd, SNDCTL_DSP_SETFRAGMENT, &J) == -1)
|
||||||
|
|
Loading…
Reference in New Issue