summaryrefslogtreecommitdiff
path: root/src/pulsecore/remap_mmx.c
diff options
context:
space:
mode:
authorPeter Meerwald <p.meerwald@bct-electronic.com>2013-03-28 14:46:49 +0100
committerTanu Kaskinen <tanuk@iki.fi>2013-03-29 10:48:26 +0200
commit578d2ce5c8affbd0f8268085d709081f62521706 (patch)
treec094ce79ebbb72e42aaa585bde68fc8040efd62b /src/pulsecore/remap_mmx.c
parent1d045af0a224ed92d9903da5d6c2aa6dd485db3b (diff)
remap: fix check when to apply specialized code path
the specialized code path just duplicate samples, so are only applicable if the volume in map_table is == 1.0 (or == 0x10000); don't use them for volumes >= 1.0 compare the integer version of the volume stored in map_table; comparing floats is ugly (als leads to compiler warnings) Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Diffstat (limited to 'src/pulsecore/remap_mmx.c')
-rw-r--r--src/pulsecore/remap_mmx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pulsecore/remap_mmx.c b/src/pulsecore/remap_mmx.c
index 9a69ada44..5b3f0f9c3 100644
--- a/src/pulsecore/remap_mmx.c
+++ b/src/pulsecore/remap_mmx.c
@@ -25,6 +25,7 @@
#endif
#include <pulse/sample.h>
+#include <pulse/volume.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
@@ -139,7 +140,7 @@ static void init_remap_mmx(pa_remap_t *m) {
/* find some common channel remappings, fall back to full matrix operation. */
if (n_ic == 1 && n_oc == 2 &&
- m->map_table_f[0][0] >= 1.0 && m->map_table_f[1][0] >= 1.0) {
+ m->map_table_i[0][0] == PA_VOLUME_NORM && m->map_table_i[1][0] == PA_VOLUME_NORM) {
m->do_remap = (pa_do_remap_func_t) remap_mono_to_stereo_mmx;
pa_log_info("Using MMX mono to stereo remapping");
}