# HG changeset patch # User William Pitcock # Date 1198261045 21600 # Node ID b71d8bee88826e75baa3d783e63430203d053111 # Parent 98fa8fe789a434b375821958fc994a412f03a244 OSS: use SNDCTL_DSP_SYNC, as not all OSS versions have SNDCTL_DSP_RESET. Reported by Michal on the forums. diff -r 98fa8fe789a4 -r b71d8bee8882 src/OSS/audio.c --- a/src/OSS/audio.c Fri Dec 21 16:51:56 2007 +0100 +++ b/src/OSS/audio.c Fri Dec 21 12:17:25 2007 -0600 @@ -494,12 +494,8 @@ if (do_pause && !paused) { do_pause = FALSE; paused = TRUE; - /* - * We lose some data here that is sent to the - * soundcard, but not yet played. I don't - * think this is worth fixing. - */ - ioctl(fd, SNDCTL_DSP_RESET, 0); + + ioctl(fd, SNDCTL_DSP_SYNC, 0); } else if (unpause && paused) { unpause = FALSE; @@ -516,7 +512,7 @@ * the driver to get fucked up by a reset */ - ioctl(fd, SNDCTL_DSP_RESET, 0); + ioctl(fd, SNDCTL_DSP_SYNC, 0); close(fd); fd = open(device_name, O_WRONLY); oss_set_audio_params(); @@ -529,7 +525,7 @@ } - ioctl(fd, SNDCTL_DSP_RESET, 0); + ioctl(fd, SNDCTL_DSP_SYNC, 0); close(fd); g_free(buffer); return NULL; @@ -542,7 +538,7 @@ struct timeval tv; fd_set set; - ioctl(fd, SNDCTL_DSP_RESET, 0); + ioctl(fd, SNDCTL_DSP_SYNC, 0); frag = (NFRAGS << 16) | fragsize; ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &frag); /*