diff ppl.c @ 190:87b46e61f2c4

Make it possible to mute channels.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 06 Oct 2012 17:48:19 +0300
parents 1f8f4d7cb33b
children 4568c479541c
line wrap: on
line diff
--- a/ppl.c	Sat Oct 06 16:49:06 2012 +0300
+++ b/ppl.c	Sat Oct 06 17:48:19 2012 +0300
@@ -658,7 +658,17 @@
     jvmSetCallback(engine.dev, jmpExec, engine.plr);
     jmpSetModule(engine.plr, engine.mod);
     jmpPlayOrder(engine.plr, optStartOrder);
-    jvmSetGlobalVol(engine.dev, 150);
+    jvmSetGlobalVol(engine.dev, 64);
+
+    if (optMuteOChannels >= 0 && optMuteOChannels < engine.mod->nchannels)
+    {
+        int i;
+        for (i = 0; i < engine.mod->nchannels; i++)
+            jvmMute(engine.dev, i, TRUE);
+
+        jvmMute(engine.dev, optMuteOChannels, FALSE);
+        engine.actChannel = optMuteOChannels;
+    }
 
     // Initialize video
     if (!dmInitializeVideo())