Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: YATTT sd_map_test cPong SnowDemo ... more
PokittoLib
Library for programming Pokitto hardware
How to Use
- Import this library to online compiler (see button "import" on the right hand side
- DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
- Change My_settings.h according to your project
- Start coding!
Diff: POKITTO_CORE/PokittoSound.cpp
- Revision:
- 12:162abc242b3a
- Parent:
- 11:aa12eb46aa02
--- 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
}