diff mod2wav.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 281b080e8c44
children 182e5fac93f5
line wrap: on
line diff
--- a/mod2wav.c	Mon Oct 01 01:29:26 2012 +0300
+++ b/mod2wav.c	Mon Oct 01 02:51:41 2012 +0300
@@ -278,6 +278,14 @@
         return 3;
     }
 
+    // Try to convert it
+    if ((result = jssConvertModuleForPlaying(m)) != DMERR_OK)
+    {
+        fprintf(stderr, "Could not convert module for playing, %d: %s\n",
+            result, dmErrorStr(result));
+        return 3;
+    }
+
     // Open mixer
     d = jvmInit(optOutFormat, optOutChannels, optOutFreq, JMIX_AUTO);
     if (!d)