mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:25:43 +01:00
alsaloop: fix resample argument parsing
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
5ad13c4825
commit
f956c329aa
2 changed files with 3 additions and 3 deletions
|
@ -81,7 +81,7 @@ static int create_loopback_handle(struct loopback_handle **_handle,
|
||||||
handle->format = SND_PCM_FORMAT_S16_LE;
|
handle->format = SND_PCM_FORMAT_S16_LE;
|
||||||
handle->rate = 48000;
|
handle->rate = 48000;
|
||||||
handle->channels = 2;
|
handle->channels = 2;
|
||||||
handle->resample = 1;
|
handle->resample = 0;
|
||||||
*_handle = handle;
|
*_handle = handle;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,7 @@ static int parse_config(int argc, char *argv[], snd_output_t *output)
|
||||||
arg_effect = 1;
|
arg_effect = 1;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
arg_resample = 0;
|
arg_resample = 1;
|
||||||
break;
|
break;
|
||||||
case 'A':
|
case 'A':
|
||||||
if (strcasecmp(optarg, "sincbest") == 0)
|
if (strcasecmp(optarg, "sincbest") == 0)
|
||||||
|
|
|
@ -108,7 +108,7 @@ static int setparams_stream(struct loopback_handle *lhandle,
|
||||||
rrate = 0;
|
rrate = 0;
|
||||||
snd_pcm_hw_params_get_rate(params, &rrate, 0);
|
snd_pcm_hw_params_get_rate(params, &rrate, 0);
|
||||||
if ((int)rrate != lhandle->rate) {
|
if ((int)rrate != lhandle->rate) {
|
||||||
logit(LOG_CRIT, "Rate does not match (requested %iHz, get %iHz)\n", lhandle->rate, err);
|
logit(LOG_CRIT, "Rate does not match (requested %iHz, got %iHz, resample %i)\n", lhandle->rate, rrate, lhandle->resample);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue