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.
Fork of PokittoLib by
Diff: POKITTO_CORE/PokittoSound.cpp
- Revision:
- 1:4b1511a0a2c2
- Parent:
- 0:e8b8f36b4505
- Child:
- 2:968589ca3484
--- a/POKITTO_CORE/PokittoSound.cpp Mon Sep 18 11:47:51 2017 +0000
+++ b/POKITTO_CORE/PokittoSound.cpp Mon Sep 18 12:34:05 2017 +0000
@@ -43,7 +43,7 @@
*
* License for Gamebuino-identical code:
*
- * (C) Copyright 2014 Aurélien Rodot. All rights reserved.
+ * (C) Copyright 2014 Aur�lien Rodot. All rights reserved.
*
* This file is part of the Gamebuino Library (http://gamebuino.com)
*
@@ -250,7 +250,9 @@
}
void Sound::begin() {
+#if POK_ENABLE_SOUND > 1
soundInit();
+#endif
#if (NUM_CHANNELS > 0)
#if POK_ENABLE_SOUND > 0
#if POK_GBSOUND > 0
@@ -725,8 +727,8 @@
}
#endif
dac_write((uint8_t)output); //direct hardware mixing baby !
+ soundbyte = output;
#endif //POK_ENABLE_SOUND
- soundbyte = output;
#else
/** SIMULATOR **/
#if POK_STREAMING_MUSIC
@@ -839,7 +841,9 @@
#ifdef POK_SIM
return core.ampIsOn();
#else
+ #if POK_ENABLE_SOUND > 1
return Pokitto::ampIsOn();
+ #endif
#endif // POK_SIM
}
@@ -847,7 +851,9 @@
#ifdef POK_SIM
core.ampEnable(v);
#else
+ #if POK_ENABLE_SOUND > 1
Pokitto::ampEnable(v);
+ #endif
#endif // POK_SIM
}
@@ -868,7 +874,9 @@
}
void Sound::pauseMusicStream() {
+ #if POK_ENABLE_SOUND > 1
pokPauseStream();
+ #endif
}
int Sound::playMusicStream(char* filename, uint8_t options)
