X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=drivers%2Fgp2x%2Fminimal.c;h=1ac51293b6f1f70ff2190e0c634d0d38aaddde8e;hp=9716e5b9f5216ec651969670febb38fc7e09ddf5;hb=e6ee752982da44a60a9a6b5916d7642ba2dd8b9e;hpb=2a6855a31daf79cad83545b1eeee646e10481e5e diff --git a/drivers/gp2x/minimal.c b/drivers/gp2x/minimal.c index 9716e5b..1ac5129 100644 --- a/drivers/gp2x/minimal.c +++ b/drivers/gp2x/minimal.c @@ -219,7 +219,10 @@ void gp2x_start_sound(int rate, int bits, int stereo) if (sounddev > 0) close(sounddev); sounddev = open("/dev/dsp", O_WRONLY|O_ASYNC); if (sounddev == -1) + { printf("open(\"/dev/dsp\") failed with %i\n", errno); + return; + } ioctl(sounddev, SNDCTL_DSP_SPEED, &rate); ioctl(sounddev, SNDCTL_DSP_SETFMT, &bits);