Elements used in the Balls and Things games for the RETRO.

Dependents:   RETRO_BallsAndPaddle RETRO_BallAndHoles

Revision:
0:3d0db4e183ee
Child:
1:71185a0aadfc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SoundFX.h	Fri Feb 06 09:51:06 2015 +0000
@@ -0,0 +1,31 @@
+#pragma once
+#include "mbed.h"
+#include "MusicEngine.h"
+
+class SoundFX
+{
+    public:
+        SoundFX();
+        void checkPwm();
+        void reset();
+        void beep(int nDuration=1);
+        void beepShort();
+        void beepLong();
+        void beepLow();
+        void play(char *szPlay);
+        void playTune();        
+        void setMute(bool fMute);
+        bool getMute();
+
+        void musicCompleted(void);
+
+    private:
+        static const int BOUNCE1_SOUND_TICKS = 1;
+        static const int BOUNCE2_SOUND_TICKS = 2;
+
+//        PwmOut pwm;
+//        int pwmTicksLeft;
+        bool fMute;
+        MusicEngine music;
+        
+};