diff --git a/tools/alsa_in.c b/tools/alsa_in.c index bfdc094..5f7be52 100644 --- a/tools/alsa_in.c +++ b/tools/alsa_in.c @@ -124,8 +124,8 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_ printf("Rate %iHz not available for playback: %s\n", rate, snd_strerror(err)); return err; } - if (err != rate) { - printf("Rate doesn't match (requested %iHz, get %iHz)\n", rate, err); + if (rrate != rate) { + printf("Rate doesn't match (requested %iHz, get %iHz)\n", rate, rrate); return -EINVAL; } /* set the buffer time */ diff --git a/tools/alsa_out.c b/tools/alsa_out.c index a88132f..10f0f9e 100644 --- a/tools/alsa_out.c +++ b/tools/alsa_out.c @@ -144,8 +144,8 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_ printf("Rate %iHz not available for playback: %s\n", rate, snd_strerror(err)); return err; } - if (err != rate) { - printf("Rate doesn't match (requested %iHz, get %iHz)\n", rate, err); + if (rrate != rate) { + printf("Rate doesn't match (requested %iHz, get %iHz)\n", rate, rrate); return -EINVAL; } /* set the buffer time */