PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)

Dependents:   Sensitive

Fork of PokittoLib by Jonne Valola

Revision:
1:4b1511a0a2c2
Parent:
0:e8b8f36b4505
--- a/POKITTO_LIBS/Synth/Synth_mixfuncs.cpp	Mon Sep 18 11:47:51 2017 +0000
+++ b/POKITTO_LIBS/Synth/Synth_mixfuncs.cpp	Mon Sep 18 12:34:05 2017 +0000
@@ -62,11 +62,13 @@
     osc1.output = soundbyte;
     #else
     //OCR2B = osc1.output>>8;
+    #if POK_ENABLE_SOUND > 1
     soundbyte = (((osc1.output>>8) * (osc1.adsrvol >>8 )) >> 8) >> osc1.echodiv; // To output, shift back to 8-bit
     if (osc1.overdrive) soundbyte *= OVERDRIVE;
     if (osc1.kick ) soundbyte >>= 2;
     osc1.output = soundbyte;
     #endif
+    #endif
     }
 }
 
@@ -81,11 +83,13 @@
     osc2.output = soundbyte;
     #else
     //OCR2B = osc2.output>>8;
+    #if POK_ENABLE_SOUND > 1
     soundbyte = (((osc2.output>>8) * (osc2.adsrvol >>8 )) >> 8) >> osc2.echodiv;
     if (osc2.overdrive) soundbyte *= OVERDRIVE;
     if (osc2.kick ) soundbyte >>= 2;
     osc2.output = soundbyte;
     #endif
+    #endif
     }
 }
 
@@ -100,11 +104,13 @@
     osc3.output = soundbyte;
     #else
     //OCR2B = osc3.output>>8;
+    #if POK_ENABLE_SOUND > 1
     soundbyte = (((osc3.output>>8) * (osc3.adsrvol >>8 )) >> 8) >> osc3.echodiv;
     if (osc3.overdrive) soundbyte *= OVERDRIVE;
     if (osc3.kick ) soundbyte >>= 2;
     osc3.output = soundbyte;
     #endif
+    #endif
     }
 }