ref: 8ecf51975485a076db1fe5a9d708e64fc08c700e
parent: 7faab63822413b15459d55970ce155de19197bf3
author: cbagwell <cbagwell>
date: Mon Sep 19 09:58:42 EDT 2005
Back out snd_pcm_set_rate_resample since that is only in recent ALSA libraries.
--- a/configure
+++ b/configure
@@ -2852,9 +2852,6 @@
CPPFLAGS="$CPPFLAGS -mno-cygwin"
LDFLAGS="$LDFLAGS -mno-cygwin"
;;
- *linux* )
- CPPFLAGS="$CPPFLAGS -I/lib/modules/`uname -r`/build/include"
- ;;
esac
if test "$GCC" = yes; then
--- a/configure.in
+++ b/configure.in
@@ -73,9 +73,6 @@
CPPFLAGS="$CPPFLAGS -mno-cygwin"
LDFLAGS="$LDFLAGS -mno-cygwin"
;;
- *linux* )
- CPPFLAGS="$CPPFLAGS -I/lib/modules/`uname -r`/build/include"
- ;;
esac
dnl Extra CFLAGS if we have gcc
--- a/src/alsa.c
+++ b/src/alsa.c
@@ -90,6 +90,7 @@
}
/* set hardware resampling */
+#if 0
rate = 0;
err = snd_pcm_hw_params_set_rate_resample(alsa->pcm_handle, hw_params,
rate);
@@ -97,6 +98,7 @@
st_fail_errno(ft, ST_EPERM, "Resampling setup failed for playback");
return ST_EOF;
}
+#endif
if ((err = snd_pcm_hw_params_set_access(alsa->pcm_handle, hw_params,
SND_PCM_ACCESS_RW_INTERLEAVED)) < 0)
@@ -135,10 +137,10 @@
snd_pcm_hw_params_get_rate_min(hw_params, &min_rate, &dir);
snd_pcm_hw_params_get_rate_max(hw_params, &max_rate, &dir);
- if (rate < min_rate)
+ if (min_rate != -1 && rate < min_rate)
rate = min_rate;
else
- if (rate > max_rate)
+ if (max_rate != -1 && rate > max_rate)
rate = max_rate;
if (rate != ft->info.rate)
{