bugfixes
[libpicofe.git] / linux / sndout_oss.c
index ccadbba..4d8e58b 100644 (file)
@@ -44,10 +44,14 @@ int sndout_oss_start(int rate, int frame_samples, int stereo)
        if (sounddev == -1)
        {
                perror("open(\"/dev/dsp\")");
-               return -1;
+               sounddev = open("/dev/dsp1", O_WRONLY|O_ASYNC);
+               if (sounddev == -1) {
+                       perror("open(\"/dev/dsp1\")");
+                       return -1;
+               }
        }
 
-       // calculate buffer size. We one to fit 1 frame worth of sound data.
+       // calculate buffer size. We want to fit 1 frame worth of sound data.
        // Also ignore mono because both GP2X and Wiz mixes mono to stereo anyway.
        bsize = frame_samples << 2;