From: Jan Djärv Date: Fri, 26 May 2006 06:29:32 +0000 (+0000) Subject: * sound.c (alsa_configure): Move get period/buffer_size after X-Git-Tag: emacs-pretest-22.0.90~2299 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=07a7837c9f9412b09095ae79018c007b2a8fb10e;p=emacs.git * sound.c (alsa_configure): Move get period/buffer_size after setting hwparams. --- diff --git a/src/ChangeLog b/src/ChangeLog index e375eae460d..afad63728e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Jan Dj,Ad(Brv + + * sound.c (alsa_configure): Move get period/buffer_size after + setting hwparams. + 2006-05-26 Kenichi Handa * coding.c (Ffind_operation_coding_system): Allow (FILENAME diff --git a/src/sound.c b/src/sound.c index 2ceefd3bce3..6317b6c6279 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1019,6 +1019,9 @@ alsa_configure (sd) 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 @@ alsa_configure (sd) 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",