changeset 34255:cb2b0d1799db

(vox_configure): Set volume for left and right channel. (sound_cleanup): Return nil.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 06 Dec 2000 13:31:48 +0000
parents eb9ce988e870
children 82991c789888
files src/sound.c
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/sound.c	Wed Dec 06 11:57:32 2000 +0000
+++ b/src/sound.c	Wed Dec 06 13:31:48 2000 +0000
@@ -360,6 +360,8 @@
       if (current_sound->fd > 0)
 	emacs_close (current_sound->fd);
     }
+
+  return Qnil;
 }
 
 
@@ -787,9 +789,13 @@
       && ioctl (sd->fd, SNDCTL_DSP_STEREO, &sd->channels) < 0)
     sound_perror ("Setting channels");
 
-  if (sd->volume > 0
-      && ioctl (sd->fd, SOUND_MIXER_WRITE_PCM, &sd->volume) < 0)
-    sound_perror ("Setting volume");
+  if (sd->volume > 0)
+    {
+      int volume = sd->volume & 0xff;
+      volume |= volume << 8;
+      if (ioctl (sd->fd, SOUND_MIXER_WRITE_PCM, &volume) < 0)
+	sound_perror ("Setting volume");
+    }
 }