+2001-06-27 Gerd Moellmann <gerd@gnu.org>
+
+ * sound.c (vox_configure, vox_close): Turn off atimers
+ around ioctls.
+
2001-06-26 Gerd Moellmann <gerd@gnu.org>
* keyboard.c (read_char) <non_reread>: Record the previous idle
#include <sys/types.h>
#include <dispextern.h>
#include <errno.h>
+#include <atimer.h>
/* FreeBSD has machine/soundcard.h. Voxware sound driver docs mention
sys/soundcard.h. So, let's try whatever's there. */
{
/* Open the sound file. */
s.fd = openp (Fcons (Vdata_directory, Qnil),
- attrs[SOUND_FILE], "", &file, 0);
+ attrs[SOUND_FILE], "", &file, 0);
if (s.fd < 0)
sound_perror ("Open sound file");
xassert (sd->fd >= 0);
+ turn_on_atimers (0);
+
val = sd->format;
if (ioctl (sd->fd, SNDCTL_DSP_SETFMT, &sd->format) < 0
|| val != sd->format)
/* This may fail if there is no mixer. Ignore the failure. */
ioctl (sd->fd, SOUND_MIXER_WRITE_PCM, &volume);
}
+
+ turn_on_atimers (1);
}
if (sd->fd >= 0)
{
/* Flush sound data, and reset the device. */
+ turn_on_atimers (0);
ioctl (sd->fd, SNDCTL_DSP_SYNC, NULL);
+ turn_on_atimers (1);
/* Close the device. */
emacs_close (sd->fd);