]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/remap_mmx.c
remap: Change remapping function argument type from void to int16_t / float as approp...
[pulseaudio] / src / pulsecore / remap_mmx.c
index ef8c9611f03db82ed7a129132c59d847abd8acf3..51a6da7eb733233f662f8ef8a011c288f9809525 100644 (file)
                 " emms                          \n\t"
 
 #if defined (__i386__) || defined (__amd64__)
-static void remap_mono_to_stereo_s16ne_mmx(pa_remap_t *m, void *dst, const void *src, unsigned n) {
+static void remap_mono_to_stereo_s16ne_mmx(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
     pa_reg_x86 temp, temp2;
 
     __asm__ __volatile__ (
@@ -113,7 +113,7 @@ static void remap_mono_to_stereo_s16ne_mmx(pa_remap_t *m, void *dst, const void
     );
 }
 
-static void remap_mono_to_stereo_float32ne_mmx(pa_remap_t *m, void *dst, const void *src, unsigned n) {
+static void remap_mono_to_stereo_float32ne_mmx(pa_remap_t *m, float *dst, const float *src, unsigned n) {
     pa_reg_x86 temp, temp2;
 
     __asm__ __volatile__ (
@@ -136,16 +136,8 @@ static void init_remap_mmx(pa_remap_t *m) {
             m->map_table_i[0][0] == 0x10000 && m->map_table_i[1][0] == 0x10000) {
 
         pa_log_info("Using MMX mono to stereo remapping");
-        switch (m->format) {
-        case PA_SAMPLE_S16NE:
-            m->do_remap = (pa_do_remap_func_t) remap_mono_to_stereo_s16ne_mmx;
-            break;
-        case PA_SAMPLE_FLOAT32NE:
-            m->do_remap = (pa_do_remap_func_t) remap_mono_to_stereo_float32ne_mmx;
-            break;
-        default:
-            pa_assert_not_reached();
-        }
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_mono_to_stereo_s16ne_mmx,
+            (pa_do_remap_func_t) remap_mono_to_stereo_float32ne_mmx);
     }
 }
 #endif /* defined (__i386__) || defined (__amd64__) */