Wave playing code, based on Big Mouth Billy Bass, but cleaned up and capable of playing more bitrates and sample sizes.

Dependents:   Bouncing_Betty FinaliseWavePlayer SDWavePlayer FYPFinalProgram ... more

Files at this revision

API Documentation at this revision

Comitter:
sravet
Date:
Tue Jan 18 03:57:27 2011 +0000
Parent:
0:62c18ade9a60
Commit message:
Maybe the Doxygen works this time?

Changed in this revision

wave_player.h Show annotated file Show diff for this revision Revisions of this file
--- a/wave_player.h	Tue Jan 18 03:41:02 2011 +0000
+++ b/wave_player.h	Tue Jan 18 03:57:27 2011 +0000
@@ -9,10 +9,17 @@
   short sig_bps;
 } FMT_STRUCT;
 
-/** wave file player class, taking a pointer to an AnalogOut object.
+
+/** wave file player class.
  *
  * Example:
  * @code
+ * #include <mbed.h>
+ * #include <wave_player.h>
+ *
+ * AnalogOut DACout(p18);
+ * wave_player waver(&DACout);
+ *
  * int main() {
  *  FILE *wave_file;
  *  
@@ -28,7 +35,7 @@
 public:
 /** Create a wave player using a pointer to the given AnalogOut object.
  *
- * @param dac AnalogOut object to which the samples are sent.
+ * @param _dac pointer to an AnalogOut object to which the samples are sent.
  */
 wave_player(AnalogOut *_dac);
 
@@ -62,6 +69,4 @@
 short DAC_on;
 };
 
-//void play_wave(FILE *wavefile,AnalogOut *dac);
-//void dac_out();