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;