ref: 15bbd2716b29f0a8ea91b5d7326135921b1a676d
parent: 16704130c9deceb62298e8237f66c3df30471a30
author: cbagwell <cbagwell>
date: Sun Sep 18 20:06:51 EDT 2005
Using ALSA's resample routines until find problem with sox's.
--- a/src/alsa.c
+++ b/src/alsa.c
@@ -90,7 +90,7 @@
}
/* set hardware resampling */
- rate = 0;
+ rate = 1;
err = snd_pcm_hw_params_set_rate_resample(alsa->pcm_handle, hw_params,
rate);
if (err < 0) {
@@ -131,10 +131,11 @@
return ST_EOF;
}
+ rate = ft->info.rate;
+#if 0
snd_pcm_hw_params_get_rate_min(hw_params, &min_rate, &dir);
snd_pcm_hw_params_get_rate_max(hw_params, &max_rate, &dir);
- rate = ft->info.rate;
if (rate < min_rate)
rate = min_rate;
else
@@ -145,7 +146,7 @@
st_report("alsa: Hardware does not support %d. Forcing sample rate to %d.", ft->info.rate, rate);
ft->info.rate = rate;
}
-
+#endif
dir = 0;
if ((err = snd_pcm_hw_params_set_rate_near(alsa->pcm_handle,
hw_params,