(vox_configure): Set volume for left and right channel.

(sound_cleanup): Return nil.
This commit is contained in:
Gerd Moellmann 2000-12-06 13:32:18 +00:00
parent 92700a0fb8
commit 3887b4498e
2 changed files with 12 additions and 3 deletions

View file

@ -1,5 +1,8 @@
2000-12-06 Gerd Moellmann <gerd@gnu.org>
* sound.c (vox_configure): Set volume for left and right channel.
(sound_cleanup): Return nil.
* xdisp.c (move_it_by_lines): Fix paren typo.
* xterm.c (x_load_font): Don't use the font's max_bounds for

View file

@ -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");
}
}