]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/remap_mmx.c
remap: Make resampler's remap structure more self-contained
[pulseaudio] / src / pulsecore / remap_mmx.c
index 9a69ada44e0b1381cd1203a0cd213d99f970d397..3d49045a6ec8987255f3c1d295455e8daedf52a9 100644 (file)
@@ -25,6 +25,7 @@
 #endif
 
 #include <pulse/sample.h>
+#include <pulse/volume.h>
 #include <pulsecore/log.h>
 #include <pulsecore/macro.h>
 
 static void remap_mono_to_stereo_mmx(pa_remap_t *m, void *dst, const void *src, unsigned n) {
     pa_reg_x86 temp, temp2;
 
-    switch (*m->format) {
+    switch (m->format) {
         case PA_SAMPLE_FLOAT32NE:
         {
             __asm__ __volatile__ (
@@ -134,12 +135,12 @@ static void remap_mono_to_stereo_mmx(pa_remap_t *m, void *dst, const void *src,
 static void init_remap_mmx(pa_remap_t *m) {
     unsigned n_oc, n_ic;
 
-    n_oc = m->o_ss->channels;
-    n_ic = m->i_ss->channels;
+    n_oc = m->o_ss.channels;
+    n_ic = m->i_ss.channels;
 
     /* 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] == 0x10000 && m->map_table_i[1][0] == 0x10000) {
         m->do_remap = (pa_do_remap_func_t) remap_mono_to_stereo_mmx;
         pa_log_info("Using MMX mono to stereo remapping");
     }