]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsaloop: fix resample argument parsing
authorJaroslav Kysela <perex@perex.cz>
Wed, 6 Oct 2010 22:12:38 +0000 (00:12 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 6 Oct 2010 22:12:38 +0000 (00:12 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsaloop/alsaloop.c
alsaloop/pcmjob.c

index 48bd21a2f061d12dd80137ec8eb8ee8d152539a6..6fb9c2a474359a82fbafb95f08fae5a501ec92fb 100644 (file)
@@ -81,7 +81,7 @@ static int create_loopback_handle(struct loopback_handle **_handle,
        handle->format = SND_PCM_FORMAT_S16_LE;
        handle->rate = 48000;
        handle->channels = 2;
-       handle->resample = 1;
+       handle->resample = 0;
        *_handle = handle;
        return 0;
 }
@@ -384,7 +384,7 @@ static int parse_config(int argc, char *argv[], snd_output_t *output)
                        arg_effect = 1;
                        break;
                case 'n':
-                       arg_resample = 0;
+                       arg_resample = 1;
                        break;
                case 'A':
                        if (strcasecmp(optarg, "sincbest") == 0)
index 51d9ea60c9fb6ecda05fd0ba06cb9554cc9aadb1..4ad752d7a461543a5baf001184b51015036ce088 100644 (file)
@@ -108,7 +108,7 @@ static int setparams_stream(struct loopback_handle *lhandle,
        rrate = 0;
        snd_pcm_hw_params_get_rate(params, &rrate, 0);
        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 0;