]> code.delx.au - pulseaudio/commitdiff
remap: Don't use PA_VOLUME_NORM
authorPeter Meerwald <p.meerwald@bct-electronic.com>
Wed, 16 Apr 2014 17:24:01 +0000 (19:24 +0200)
committerPeter Meerwald <pmeerw@pmeerw.net>
Mon, 28 Apr 2014 22:00:06 +0000 (00:00 +0200)
remapping operates on channel contributions, not volumes

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
src/pulsecore/remap.c
src/pulsecore/remap_mmx.c
src/pulsecore/remap_sse.c

index 8585e341d3aefa75c3d2f276d793440280fa8180..da72a620c4124a684145c40781fb3626299853e9 100644 (file)
@@ -169,7 +169,7 @@ static void init_remap_c(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_i[0][0] == PA_VOLUME_NORM && m->map_table_i[1][0] == PA_VOLUME_NORM) {
+            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_c;
         pa_log_info("Using mono to stereo remapping");
     } else {
index 5b3f0f9c3e5a8264c110696a7d8e159b92a9db94..bf611a1bcc96f394e5e24893cee087c58e5b5af2 100644 (file)
@@ -140,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_i[0][0] == PA_VOLUME_NORM && m->map_table_i[1][0] == PA_VOLUME_NORM) {
+            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");
     }
index 883172351f219b8ee01ba7d2519994f7886b3a43..f43ecb7ca8d311bd70f96baf4de8530cb063b7c9 100644 (file)
@@ -139,7 +139,7 @@ static void init_remap_sse2(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_i[0][0] == PA_VOLUME_NORM && m->map_table_i[1][0] == PA_VOLUME_NORM) {
+            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_sse2;
         pa_log_info("Using SSE2 mono to stereo remapping");
     }