diff options
| author | Jan Djärv | 2006-05-26 06:29:32 +0000 |
|---|---|---|
| committer | Jan Djärv | 2006-05-26 06:29:32 +0000 |
| commit | 07a7837c9f9412b09095ae79018c007b2a8fb10e (patch) | |
| tree | 8ecdc28c2793580d80d2aa42db13fea9de46f356 /src | |
| parent | 438cb727a73f37bdf25feb91949713de325f7ba5 (diff) | |
| download | emacs-07a7837c9f9412b09095ae79018c007b2a8fb10e.tar.gz emacs-07a7837c9f9412b09095ae79018c007b2a8fb10e.zip | |
* sound.c (alsa_configure): Move get period/buffer_size after
setting hwparams.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/sound.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e375eae460d..afad63728e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-05-26 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * sound.c (alsa_configure): Move get period/buffer_size after | ||
| 4 | setting hwparams. | ||
| 5 | |||
| 1 | 2006-05-26 Kenichi Handa <handa@m17n.org> | 6 | 2006-05-26 Kenichi Handa <handa@m17n.org> |
| 2 | 7 | ||
| 3 | * coding.c (Ffind_operation_coding_system): Allow (FILENAME | 8 | * 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) | |||
| 1019 | if ((err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val)) < 0) | 1019 | if ((err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val)) < 0) |
| 1020 | alsa_sound_perror ("Could not set channel count", err); | 1020 | alsa_sound_perror ("Could not set channel count", err); |
| 1021 | 1021 | ||
| 1022 | if ((err = snd_pcm_hw_params (p->handle, p->hwparams)) < 0) | ||
| 1023 | alsa_sound_perror ("Could not set parameters", err); | ||
| 1024 | |||
| 1022 | 1025 | ||
| 1023 | err = snd_pcm_hw_params_get_period_size (p->hwparams, &p->period_size, &dir); | 1026 | err = snd_pcm_hw_params_get_period_size (p->hwparams, &p->period_size, &dir); |
| 1024 | if (err < 0) | 1027 | if (err < 0) |
| @@ -1028,9 +1031,6 @@ alsa_configure (sd) | |||
| 1028 | if (err < 0) | 1031 | if (err < 0) |
| 1029 | alsa_sound_perror("Unable to get buffer size for playback", err); | 1032 | alsa_sound_perror("Unable to get buffer size for playback", err); |
| 1030 | 1033 | ||
| 1031 | if ((err = snd_pcm_hw_params (p->handle, p->hwparams)) < 0) | ||
| 1032 | alsa_sound_perror ("Could not set parameters", err); | ||
| 1033 | |||
| 1034 | err = snd_pcm_sw_params_current (p->handle, p->swparams); | 1034 | err = snd_pcm_sw_params_current (p->handle, p->swparams); |
| 1035 | if (err < 0) | 1035 | if (err < 0) |
| 1036 | alsa_sound_perror ("Unable to determine current swparams for playback", | 1036 | alsa_sound_perror ("Unable to determine current swparams for playback", |