summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-08-25 23:32:37 +0000
committerLennart Poettering <lennart@poettering.net>2007-08-25 23:32:37 +0000
commit89fcd51b7b458d7c541a0f08cfffcc67df73acf6 (patch)
treefa2f52f44acb2e7080ee1e75eb27a4efea342c25
parentf82067f6de5ecabf7c0e062b6a376651e5e829f5 (diff)
enable -ffast-math for gcc
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1720 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--configure.ac2
-rw-r--r--src/pulsecore/resampler.c25
2 files changed, 16 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index d9983309..718ebbff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,7 +93,7 @@ if test "x$GCC" = "xyes" ; then
# We use gnu99 instead of c99 because many have interpreted the standard
# in a way that int64_t isn't defined on non-64 bit platforms.
- DESIRED_FLAGS="-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter"
+ DESIRED_FLAGS="-std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -ffast-math"
for flag in $DESIRED_FLAGS ; do
AC_MSG_CHECKING([whether $CC accepts $flag])
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index dd379b8a..c1af401c 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -741,13 +741,14 @@ static void speex_update_rates(pa_resampler *r) {
static void speex_free(pa_resampler *r) {
pa_assert(r);
- if (r->speex.state) {
- if (r->resample_method >= PA_RESAMPLER_SPEEX_FIXED_BASE && r->resample_method <= PA_RESAMPLER_SPEEX_FIXED_MAX)
- paspfx_resampler_destroy(r->speex.state);
- else {
- pa_assert(r->resample_method >= PA_RESAMPLER_SPEEX_FLOAT_BASE && r->resample_method <= PA_RESAMPLER_SPEEX_FLOAT_MAX);
- paspfl_resampler_destroy(r->speex.state);
- }
+ if (!r->speex.state)
+ return;
+
+ if (r->resample_method >= PA_RESAMPLER_SPEEX_FIXED_BASE && r->resample_method <= PA_RESAMPLER_SPEEX_FIXED_MAX)
+ paspfx_resampler_destroy(r->speex.state);
+ else {
+ pa_assert(r->resample_method >= PA_RESAMPLER_SPEEX_FLOAT_BASE && r->resample_method <= PA_RESAMPLER_SPEEX_FLOAT_MAX);
+ paspfl_resampler_destroy(r->speex.state);
}
}
@@ -761,20 +762,24 @@ static int speex_init(pa_resampler *r) {
if (r->resample_method >= PA_RESAMPLER_SPEEX_FIXED_BASE && r->resample_method <= PA_RESAMPLER_SPEEX_FIXED_MAX) {
q = r->resample_method - PA_RESAMPLER_SPEEX_FIXED_BASE;
- r->impl_resample = speex_resample_int;
+ pa_log_info("Choosing speex quality setting %i.", q);
+
if (!(r->speex.state = paspfx_resampler_init(r->o_ss.channels, r->i_ss.rate, r->o_ss.rate, q, &err)))
return -1;
+ r->impl_resample = speex_resample_int;
} else {
pa_assert(r->resample_method >= PA_RESAMPLER_SPEEX_FLOAT_BASE && r->resample_method <= PA_RESAMPLER_SPEEX_FLOAT_MAX);
q = r->resample_method - PA_RESAMPLER_SPEEX_FLOAT_BASE;
- r->impl_resample = speex_resample_float;
+ pa_log_info("Choosing speex quality setting %i.", q);
+
if (!(r->speex.state = paspfl_resampler_init(r->o_ss.channels, r->i_ss.rate, r->o_ss.rate, q, &err)))
return -1;
+
+ r->impl_resample = speex_resample_float;
}
-
return 0;
}