Undo the horrible mistake of paying attention to 4Front's documentation.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2000-12-10 10:56:49 +00:00
parent c8ee33715b
commit 6569283738

View file

@ -84,13 +84,13 @@ SNDDMA_Init (void)
snd_inited = 0;
// open /dev/dsp, confirm capability to mmap, and get size of dma buffer
audio_fd = open ("/dev/dsp", O_WRONLY);
audio_fd = open ("/dev/dsp", O_RDWR);
if (audio_fd < 0) { // Failed open, retry up to 3 times
// if it's busy
while ((audio_fd < 0) && retries-- &&
((errno == EAGAIN) || (errno == EBUSY))) {
sleep (1);
audio_fd = open ("/dev/dsp", O_WRONLY);
audio_fd = open ("/dev/dsp", O_RDWR);
}
if (audio_fd < 0) {
perror ("/dev/dsp");