aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sound.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sound.c b/src/sound.c
index 6f955a7d691..6f8e3ecb308 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1015,14 +1015,14 @@ alsa_configure (sd)
1015 1015
1016 val = sd->format; 1016 val = sd->format;
1017 err = snd_pcm_hw_params_set_format (p->handle, p->hwparams, val); 1017 err = snd_pcm_hw_params_set_format (p->handle, p->hwparams, val);
1018 if (err < 0) 1018 if (err < 0)
1019 alsa_sound_perror ("Could not set sound format", err); 1019 alsa_sound_perror ("Could not set sound format", err);
1020 1020
1021 uval = sd->sample_rate; 1021 uval = sd->sample_rate;
1022 err = snd_pcm_hw_params_set_rate_near (p->handle, p->hwparams, &uval, 0); 1022 err = snd_pcm_hw_params_set_rate_near (p->handle, p->hwparams, &uval, 0);
1023 if (err < 0) 1023 if (err < 0)
1024 alsa_sound_perror ("Could not set sample rate", err); 1024 alsa_sound_perror ("Could not set sample rate", err);
1025 1025
1026 val = sd->channels; 1026 val = sd->channels;
1027 err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val); 1027 err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val);
1028 if (err < 0) 1028 if (err < 0)
@@ -1072,11 +1072,11 @@ alsa_configure (sd)
1072 p->hwparams = NULL; 1072 p->hwparams = NULL;
1073 snd_pcm_sw_params_free (p->swparams); 1073 snd_pcm_sw_params_free (p->swparams);
1074 p->swparams = NULL; 1074 p->swparams = NULL;
1075 1075
1076 err = snd_pcm_prepare (p->handle); 1076 err = snd_pcm_prepare (p->handle);
1077 if (err < 0) 1077 if (err < 0)
1078 alsa_sound_perror ("Could not prepare audio interface for use", err); 1078 alsa_sound_perror ("Could not prepare audio interface for use", err);
1079 1079
1080 if (sd->volume > 0) 1080 if (sd->volume > 0)
1081 { 1081 {
1082 int chn; 1082 int chn;
@@ -1098,7 +1098,7 @@ alsa_configure (sd)
1098 long pmin, pmax; 1098 long pmin, pmax;
1099 snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax); 1099 snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax);
1100 long vol = pmin + (sd->volume * (pmax - pmin)) / 100; 1100 long vol = pmin + (sd->volume * (pmax - pmin)) / 100;
1101 1101
1102 for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++) 1102 for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++)
1103 snd_mixer_selem_set_playback_volume (e, chn, vol); 1103 snd_mixer_selem_set_playback_volume (e, chn, vol);
1104 } 1104 }
@@ -1230,9 +1230,9 @@ alsa_write (sd, buffer, nbytes)
1230 err); 1230 err);
1231 } 1231 }
1232 } 1232 }
1233 else 1233 else
1234 alsa_sound_perror ("Error writing to sound device", err); 1234 alsa_sound_perror ("Error writing to sound device", err);
1235 1235
1236 } 1236 }
1237 else 1237 else
1238 nwritten += err * fact; 1238 nwritten += err * fact;
@@ -1374,7 +1374,7 @@ do_play_sound (psz_file, ui_volume)
1374DEFUN ("play-sound-internal", Fplay_sound_internal, Splay_sound_internal, 1, 1, 0, 1374DEFUN ("play-sound-internal", Fplay_sound_internal, Splay_sound_internal, 1, 1, 0,
1375 doc: /* Play sound SOUND. 1375 doc: /* Play sound SOUND.
1376 1376
1377Internal use only, use `play-sound' instead.\n */) 1377Internal use only, use `play-sound' instead. */)
1378 (sound) 1378 (sound)
1379 Lisp_Object sound; 1379 Lisp_Object sound;
1380{ 1380{