diff jssmix.c @ 49:033c660c25f5

Restructure module playing, removing 8bit sample mixing (output can still be 8bit, but samples are internally upconverted to 16bit after module loading.) Also prepare for floating point mixing support.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 01 Oct 2012 02:51:41 +0300
parents f3407a58e01e
children 36e2f910219c
line wrap: on
line diff
--- a/jssmix.c	Mon Oct 01 01:29:26 2012 +0300
+++ b/jssmix.c	Mon Oct 01 02:51:41 2012 +0300
@@ -9,7 +9,7 @@
 
 #ifdef DM_USE_C
 #define JMIXER_HEADER
-#include "jmix_c.in.c"
+#include "jmix_c_in.c"
 #undef JMIXER_HEADER
 #endif
 
@@ -17,7 +17,7 @@
 
 #ifdef DM_USE_SIMD
 #define JMIXER_HEADER
-#include "jmix_mmx.in.c"
+#include "jmix_mmx_in.c"
 #undef JMIXER_HEADER
 #endif
 
@@ -85,7 +85,7 @@
 JSSMixer *jvmInit(const int outFormat, const int outChannels, const int outFreq, const int mixerID)
 {
     JSSMixer *mixer;
-    int mixerIdx, v, i;
+    int mixerIdx;
 
     // Check settings
     if (outChannels < 1)
@@ -155,15 +155,6 @@
         "Could not allocate mixing addition buffer.\n");
     }
     
-    // Initialize 8-bit volume table
-    for (v = jsetMinVol; v < jsetMaxVol; v++)
-    {
-        for (i = 0; i < 256; i++)
-        {
-            mixer->volTab8[v][i] = (v * (i - 128));
-        }
-    }
-
     return mixer;
 }