diff options
author | Gerd Moellmann <gerd@gnu.org> | 2000-12-06 13:32:18 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2000-12-06 13:32:18 +0000 |
commit | 3887b4498e3d7233f86745c5784e09ccfa5a9145 (patch) | |
tree | 7228a2270f0bd03752446ef13fbbc2696b3d4f13 /src/sound.c | |
parent | 92700a0fb8c5188dff91babe192420549e3ed1d3 (diff) | |
download | emacs-3887b4498e3d7233f86745c5784e09ccfa5a9145.tar.gz |
(vox_configure): Set volume for left and right channel.
(sound_cleanup): Return nil.
Diffstat (limited to 'src/sound.c')
-rw-r--r-- | src/sound.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/sound.c b/src/sound.c index 521f1fdce68..fc3adbdba6b 100644 --- a/src/sound.c +++ b/src/sound.c @@ -360,6 +360,8 @@ sound_cleanup (arg) if (current_sound->fd > 0) emacs_close (current_sound->fd); } + + return Qnil; } @@ -787,9 +789,13 @@ vox_configure (sd) && 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"); + } } |