diff options
| author | Gerd Moellmann | 2000-12-06 13:32:18 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-12-06 13:32:18 +0000 |
| commit | 3887b4498e3d7233f86745c5784e09ccfa5a9145 (patch) | |
| tree | 7228a2270f0bd03752446ef13fbbc2696b3d4f13 /src | |
| parent | 92700a0fb8c5188dff91babe192420549e3ed1d3 (diff) | |
| download | emacs-3887b4498e3d7233f86745c5784e09ccfa5a9145.tar.gz emacs-3887b4498e3d7233f86745c5784e09ccfa5a9145.zip | |
(vox_configure): Set volume for left and right channel.
(sound_cleanup): Return nil.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/sound.c | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1d6b3cec057..1278056121e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2000-12-06 Gerd Moellmann <gerd@gnu.org> | 1 | 2000-12-06 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * sound.c (vox_configure): Set volume for left and right channel. | ||
| 4 | (sound_cleanup): Return nil. | ||
| 5 | |||
| 3 | * xdisp.c (move_it_by_lines): Fix paren typo. | 6 | * xdisp.c (move_it_by_lines): Fix paren typo. |
| 4 | 7 | ||
| 5 | * xterm.c (x_load_font): Don't use the font's max_bounds for | 8 | * xterm.c (x_load_font): Don't use the font's max_bounds for |
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) | |||
| 360 | if (current_sound->fd > 0) | 360 | if (current_sound->fd > 0) |
| 361 | emacs_close (current_sound->fd); | 361 | emacs_close (current_sound->fd); |
| 362 | } | 362 | } |
| 363 | |||
| 364 | return Qnil; | ||
| 363 | } | 365 | } |
| 364 | 366 | ||
| 365 | 367 | ||
| @@ -787,9 +789,13 @@ vox_configure (sd) | |||
| 787 | && ioctl (sd->fd, SNDCTL_DSP_STEREO, &sd->channels) < 0) | 789 | && ioctl (sd->fd, SNDCTL_DSP_STEREO, &sd->channels) < 0) |
| 788 | sound_perror ("Setting channels"); | 790 | sound_perror ("Setting channels"); |
| 789 | 791 | ||
| 790 | if (sd->volume > 0 | 792 | if (sd->volume > 0) |
| 791 | && ioctl (sd->fd, SOUND_MIXER_WRITE_PCM, &sd->volume) < 0) | 793 | { |
| 792 | sound_perror ("Setting volume"); | 794 | int volume = sd->volume & 0xff; |
| 795 | volume |= volume << 8; | ||
| 796 | if (ioctl (sd->fd, SOUND_MIXER_WRITE_PCM, &volume) < 0) | ||
| 797 | sound_perror ("Setting volume"); | ||
| 798 | } | ||
| 793 | } | 799 | } |
| 794 | 800 | ||
| 795 | 801 | ||