|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
-
-
- #ifndef play_serial_raw_h_
- #define play_serial_raw_h_
-
- #include "Arduino.h"
- #include <AudioStream.h>
- #include <SerialFlash.h>
-
- class AudioPlaySerialflashRaw : public AudioStream
- {
- public:
- AudioPlaySerialflashRaw(void) : AudioStream(0, NULL) { begin(); }
- void begin(void);
- bool play(const char *filename);
- void stop(void);
- bool isPlaying(void) { return playing; }
- uint32_t positionMillis(void);
- uint32_t lengthMillis(void);
- virtual void update(void);
- private:
- SerialFlashFile rawfile;
- uint32_t file_size;
- volatile uint32_t file_offset;
- volatile bool playing;
- };
-
- #endif
|