]> code.delx.au - gnu-emacs/blobdiff - src/sound.c
(math-read-token): Read complement signed numbers.
[gnu-emacs] / src / sound.c
index 8f54a7a5e98e65d134905e8a30d7d6f5a81e4f7f..3747dc8a849a9d052e5e96c203da879637b0868c 100644 (file)
@@ -44,6 +44,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <unistd.h>
 #include <sys/types.h>
 #include <errno.h>
+#include <setjmp.h>
 #include "lisp.h"
 #include "dispextern.h"
 #include "atimer.h"
@@ -1066,12 +1067,6 @@ alsa_configure (sd)
   if (err < 0)
     alsa_sound_perror ("Unable to set avail min for playback", err);
 
-  /* Align all transfers to 1 period */
-  err = snd_pcm_sw_params_set_xfer_align (p->handle, p->swparams,
-                                          p->period_size);
-  if (err < 0)
-    alsa_sound_perror ("Unable to set transfer align for playback", err);
-
   err = snd_pcm_sw_params (p->handle, p->swparams);
   if (err < 0)
     alsa_sound_perror ("Unable to set sw params for playback\n", err);
@@ -1301,14 +1296,14 @@ alsa_init (sd)
 
 /* BEGIN: Windows specific functions */
 
-#define SOUND_WARNING(fun, error, text)                   \
-  {                                               \
-    char buf[1024];                               \
-    char err_string[MAXERRORLENGTH];              \
+#define SOUND_WARNING(fun, error, text)            \
+  {                                                \
+    char buf[1024];                                \
+    char err_string[MAXERRORLENGTH];               \
     fun (error, err_string, sizeof (err_string));  \
-    snprintf (buf, sizeof (buf), "%s\nError: %s",  \
-             text, err_string);                   \
-    sound_warning (buf);                          \
+    _snprintf (buf, sizeof (buf), "%s\nError: %s", \
+              text, err_string);                  \
+    sound_warning (buf);                           \
   }
 
 static int
@@ -1531,13 +1526,13 @@ Internal use only, use `play-sound' instead.  */)
 void
 syms_of_sound ()
 {
-  QCdevice = intern (":device");
+  QCdevice = intern_c_string(":device");
   staticpro (&QCdevice);
-  QCvolume = intern (":volume");
+  QCvolume = intern_c_string (":volume");
   staticpro (&QCvolume);
-  Qsound = intern ("sound");
+  Qsound = intern_c_string ("sound");
   staticpro (&Qsound);
-  Qplay_sound_functions = intern ("play-sound-functions");
+  Qplay_sound_functions = intern_c_string ("play-sound-functions");
   staticpro (&Qplay_sound_functions);
 
   defsubr (&Splay_sound_internal);