-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
BoxTonies.h
38 lines (27 loc) · 912 Bytes
/
BoxTonies.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef BoxTonies_h
#define BoxTonies_h
#include "BaseHeader.h"
#include "BoxSD.h"
class BoxTonies {
public:
bool
loadTonieByUid(uint8_t uid[8]),
loadTonieByPath(uint8_t* path);
void logTonieHeader();
struct TonieHeader {
uint8_t hash[20];
uint32_t audioLength; //length in bytes
uint32_t audioId; //id, which is the unix time stamp of file creation
uint32_t audioChapters[99]; //Ogg page numbers for Chapters
uint8_t audioChapterCount;
};
uint8_t currentUid[8];
const char* CONTENT_BASE = "/CONTENT/";
const char* RCONTENT_BASE = "/rCONTENT/";
private:
FileFs tonieFile;
TonieHeader header;
uint64_t readVariant(uint8_t* buffer, uint16_t length, uint8_t& readBytes);
void clearHeader();
};
#endif