mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 02:15:42 +01:00
Don't show invalid plug example in the error message of aplay
Don't show invalid examples of usage with plug prefix in the error message of aplay/arecord.
This commit is contained in:
parent
68f4d7736d
commit
2516c6c43e
1 changed files with 8 additions and 1 deletions
|
@ -916,8 +916,15 @@ static void set_params(void)
|
|||
assert(err >= 0);
|
||||
if ((float)rate * 1.05 < hwparams.rate || (float)rate * 0.95 > hwparams.rate) {
|
||||
if (!quiet_mode) {
|
||||
char plugex[64];
|
||||
fprintf(stderr, _("Warning: rate is not accurate (requested = %iHz, got = %iHz)\n"), rate, hwparams.rate);
|
||||
fprintf(stderr, _(" please, try the plug plugin (-Dplug:%s)\n"), snd_pcm_name(handle));
|
||||
if (strchr(snd_pcm_name(handle), ':'))
|
||||
*plugex = 0;
|
||||
else
|
||||
snprintf(plugex, sizeof(plugex), "(-Dplug:%s)",
|
||||
snd_pcm_name(handle));
|
||||
fprintf(stderr, _(" please, try the plug plugin %s\n"),
|
||||
plugex);
|
||||
}
|
||||
}
|
||||
rate = hwparams.rate;
|
||||
|
|
Loading…
Reference in a new issue