changeset 29385:f9ae25067fe0

Fix 24bit audio playback. The reordering channels code had reoccurring bug where in switch(samplesize) block the case 3 (3 bytes) doesn't end with break; leading to execution of the next case 4 too. This mangles the already processed data and causes massive memory corruption.
author iive
date Sun, 19 Jul 2009 09:55:29 +0000
parents 36a9b369cd9d
children 9ccfc57f0eff
files libaf/reorder_ch.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libaf/reorder_ch.c	Sat Jul 18 15:07:26 2009 +0000
+++ b/libaf/reorder_ch.c	Sun Jul 19 09:55:29 2009 +0000
@@ -453,6 +453,7 @@
             src_8[i+s2*3+1] = tmp1;
             src_8[i+s2*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {
@@ -547,6 +548,7 @@
             src_8[i+s3*3+1] = tmp1;
             src_8[i+s3*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {
@@ -695,6 +697,7 @@
             src_8[i+s4*3+1] = tmp1;
             src_8[i+s4*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {
@@ -787,6 +790,7 @@
             src_8[i+s4*3+1] = tmp1;
             src_8[i+s4*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {
@@ -873,6 +877,7 @@
             src_8[i+s5*3+1] = tmp1;
             src_8[i+s5*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {
@@ -959,6 +964,7 @@
             src_8[i+s5*3+1] = tmp1;
             src_8[i+s5*3+2] = tmp2;
         }
+        break;
     }
     case 4:
     {