forked from pool/alsa-utils
Takashi Iwai
3331bcfb82
* A few alsactl init fix patches: * amixer control-id parse fix * new aloop utility * robusitfy speaker-test * misc clean up, translation updates - Use systemd for openSUSE 11.4 - Put udev rules into this package instead of alsa.rpm OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=23
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
From f956c329aa1271c89cf13a01d1bcea8fae6b03f8 Mon Sep 17 00:00:00 2001
|
|
From: Jaroslav Kysela <perex@perex.cz>
|
|
Date: Thu, 7 Oct 2010 00:12:38 +0200
|
|
Subject: [PATCH 21/38] alsaloop: fix resample argument parsing
|
|
|
|
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
---
|
|
alsaloop/alsaloop.c | 4 ++--
|
|
alsaloop/pcmjob.c | 2 +-
|
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/alsaloop/alsaloop.c b/alsaloop/alsaloop.c
|
|
index 48bd21a..6fb9c2a 100644
|
|
--- a/alsaloop/alsaloop.c
|
|
+++ b/alsaloop/alsaloop.c
|
|
@@ -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)
|
|
diff --git a/alsaloop/pcmjob.c b/alsaloop/pcmjob.c
|
|
index 51d9ea6..4ad752d 100644
|
|
--- a/alsaloop/pcmjob.c
|
|
+++ b/alsaloop/pcmjob.c
|
|
@@ -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;
|
|
--
|
|
1.7.3.1
|
|
|