]> code.delx.au - gnu-emacs/blobdiff - src/sound.c
* lisp/window.el (display-buffer--action-function-custom-type):
[gnu-emacs] / src / sound.c
index 794c8e64e54fdf80cad36e052af1070fc003a9a5..362c04b7d4089b10c1996fa61a773a0f474bce98 100644 (file)
@@ -1013,7 +1013,7 @@ alsa_configure (struct sound_device *sd)
 
   err = snd_pcm_hw_params_get_buffer_size (p->hwparams, &buffer_size);
   if (err < 0)
-    alsa_sound_perror("Unable to get buffer size for playback", err);
+    alsa_sound_perror ("Unable to get buffer size for playback", err);
 
   err = snd_pcm_sw_params_current (p->handle, p->swparams);
   if (err < 0)
@@ -1071,7 +1071,7 @@ alsa_configure (struct sound_device *sd)
                       snd_mixer_selem_set_playback_volume (e, chn, vol);
                   }
               }
-          snd_mixer_close(handle);
+          snd_mixer_close (handle);
         }
     }
 }
@@ -1182,7 +1182,7 @@ alsa_write (struct sound_device *sd, const char *buffer, EMACS_INT nbytes)
           else if (err == -ESTRPIPE)
             {
               while ((err = snd_pcm_resume (p->handle)) == -EAGAIN)
-                sleep(1);      /* wait until the suspend flag is released */
+                sleep (1);     /* wait until the suspend flag is released */
               if (err < 0)
                 {
                   err = snd_pcm_prepare (p->handle);
@@ -1447,7 +1447,7 @@ Internal use only, use `play-sound' instead.  */)
     }
   else if (FLOATP (attrs[SOUND_VOLUME]))
     {
-      ui_volume_tmp = (unsigned long) XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
+      ui_volume_tmp = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
     }
   /*
     Based on some experiments I have conducted, a value of 100 or less
@@ -1477,14 +1477,10 @@ Internal use only, use `play-sound' instead.  */)
 void
 syms_of_sound (void)
 {
-  QCdevice = intern_c_string(":device");
-  staticpro (&QCdevice);
-  QCvolume = intern_c_string (":volume");
-  staticpro (&QCvolume);
-  Qsound = intern_c_string ("sound");
-  staticpro (&Qsound);
-  Qplay_sound_functions = intern_c_string ("play-sound-functions");
-  staticpro (&Qplay_sound_functions);
+  DEFSYM (QCdevice, ":device");
+  DEFSYM (QCvolume, ":volume");
+  DEFSYM (Qsound, "sound");
+  DEFSYM (Qplay_sound_functions, "play-sound-functions");
 
   defsubr (&Splay_sound_internal);
 }