mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
Fixed small bug in 'format change' section
This commit is contained in:
parent
78dc424b72
commit
a581f75a8c
1 changed files with 2 additions and 0 deletions
|
|
@ -487,6 +487,7 @@ int snd_pcm_plugin_params(snd_pcm_t *pcm, snd_pcm_channel_params_t *params)
|
||||||
|
|
||||||
/* format change */
|
/* format change */
|
||||||
if (srcparams.format.format != dstparams->format.format) {
|
if (srcparams.format.format != dstparams->format.format) {
|
||||||
|
tmpparams.format.format = dstparams->format.format;
|
||||||
switch (params->format.format) {
|
switch (params->format.format) {
|
||||||
case SND_PCM_SFMT_MU_LAW:
|
case SND_PCM_SFMT_MU_LAW:
|
||||||
err = snd_pcm_plugin_build_mulaw(&srcparams.format,
|
err = snd_pcm_plugin_build_mulaw(&srcparams.format,
|
||||||
|
|
@ -605,6 +606,7 @@ int snd_pcm_plugin_params(snd_pcm_t *pcm, snd_pcm_channel_params_t *params)
|
||||||
} else {
|
} else {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
// printf("requested format: format = %i, rate = %i, voices = %i\n", hwparams.format.format, hwparams.format.rate, hwparams.format.voices);
|
||||||
err = snd_pcm_channel_params(pcm, &hwparams);
|
err = snd_pcm_channel_params(pcm, &hwparams);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue