Mercurial > emacs
changeset 70955:d42f132da9a8
* sound.c (alsa_configure): Move get period/buffer_size after
setting hwparams.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Fri, 26 May 2006 06:29:32 +0000 |
parents | 973afe644ddf |
children | 5fd02ab03d96 |
files | src/ChangeLog src/sound.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri May 26 05:38:50 2006 +0000 +++ b/src/ChangeLog Fri May 26 06:29:32 2006 +0000 @@ -1,3 +1,8 @@ +2006-05-26 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * sound.c (alsa_configure): Move get period/buffer_size after + setting hwparams. + 2006-05-26 Kenichi Handa <handa@m17n.org> * coding.c (Ffind_operation_coding_system): Allow (FILENAME
--- a/src/sound.c Fri May 26 05:38:50 2006 +0000 +++ b/src/sound.c Fri May 26 06:29:32 2006 +0000 @@ -1019,6 +1019,9 @@ if ((err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val)) < 0) alsa_sound_perror ("Could not set channel count", err); + if ((err = snd_pcm_hw_params (p->handle, p->hwparams)) < 0) + alsa_sound_perror ("Could not set parameters", err); + err = snd_pcm_hw_params_get_period_size (p->hwparams, &p->period_size, &dir); if (err < 0) @@ -1028,9 +1031,6 @@ if (err < 0) alsa_sound_perror("Unable to get buffer size for playback", err); - if ((err = snd_pcm_hw_params (p->handle, p->hwparams)) < 0) - alsa_sound_perror ("Could not set parameters", err); - err = snd_pcm_sw_params_current (p->handle, p->swparams); if (err < 0) alsa_sound_perror ("Unable to determine current swparams for playback",