Jonne Valola / PokittoLib Featured

Dependents:   YATTT sd_map_test cPong SnowDemo ... more

PokittoLib

Library for programming Pokitto hardware

How to Use

  1. Import this library to online compiler (see button "import" on the right hand side
  2. DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
  3. Change My_settings.h according to your project
  4. Start coding!
Revision:
12:162abc242b3a
Parent:
11:aa12eb46aa02
diff -r aa12eb46aa02 -r 162abc242b3a POKITTO_CORE/PokittoSound.cpp
--- a/POKITTO_CORE/PokittoSound.cpp	Wed Oct 18 08:35:20 2017 +0000
+++ b/POKITTO_CORE/PokittoSound.cpp	Wed Oct 18 20:20:09 2017 +0000
@@ -253,6 +253,7 @@
 void Sound::begin() {
 #if POK_ENABLE_SOUND > 0
 soundInit();
+ampEnable(true);
 #endif
 #if (NUM_CHANNELS > 0)
 #if POK_ENABLE_SOUND > 0
@@ -783,7 +784,7 @@
 	#ifndef POK_SIM
 	volume = (volume / 2)-10;
 	if (volume<0) volume = 0;
-	#if POK_ENABLE_SOUND > 1
+	#if POK_ENABLE_SOUND > 0
 	setHWvolume(volume);
 	#endif
 	#endif
@@ -842,7 +843,7 @@
     #ifdef POK_SIM
     return core.ampIsOn();
     #else
-    #if POK_ENABLE_SOUND > 1
+    #if POK_ENABLE_SOUND > 0
     return Pokitto::ampIsOn();
     #endif
     #endif // POK_SIM
@@ -853,7 +854,7 @@
     #ifdef POK_SIM
     core.ampEnable(v);
     #else
-    #if POK_ENABLE_SOUND > 1
+    #if POK_ENABLE_SOUND > 0
     Pokitto::ampEnable(v);
     #endif
     #endif // POK_SIM
@@ -876,7 +877,7 @@
 }
 
 void Sound::pauseMusicStream() {
-    #if POK_ENABLE_SOUND > 1
+    #if POK_ENABLE_SOUND > 0
     pokPauseStream();
     #endif
 }