forked from toniebox-reverse-engineering/hackiebox_cfw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BoxPlayer.h
53 lines (43 loc) · 1010 Bytes
/
BoxPlayer.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef BoxPlayer_h
#define BoxPlayer_h
#include "BaseHeader.h"
class BoxPlayer {
public:
enum class PLAYER_EVENT {
};
enum class PLAYER_MODE {
NONE = 0x0,
FILE = 0x1,
DIR = 0x2
};
enum class PLAYER_FLAGS {
NONE = 0x0,
LOOP = 0x1,
RANDOM = 0x2
};
void
begin(),
loop();
void
play(),
pause(),
stop(),
next(),
previous(),
rewind(),
songEnded();
bool
playDir(const char* path, PLAYER_FLAGS flags),
playFile(const char* file, PLAYER_FLAGS flags);
bool
isPlaying(),
isStopped();
private:
PLAYER_MODE _mode;
PLAYER_FLAGS _flags;
char _dirPath[256];
uint8_t _currentSongId;
uint8_t _dirSongCount;
bool _play(const char* path);
};
#endif