-
Notifications
You must be signed in to change notification settings - Fork 1
/
play_list.h
43 lines (31 loc) · 878 Bytes
/
play_list.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
#ifndef __PLAY_LIST_H__
#define __PLAY_LIST_H__
#include <rtthread.h>
enum play_list_mode
{
PLAY_LIST_SINGLE,
PLAY_LIST_REPEAT,
PLAY_LIST_RANDOM
};
struct play_item
{
char title[40];
char *fn;
rt_uint32_t duration;
};
void play_list_clear(void);
struct play_item *play_list_start(void);
rt_uint32_t play_list_items(void);
struct play_item* play_list_item(rt_uint32_t n);
struct play_item* play_list_current(void);
void play_list_set_current(rt_uint16_t current);
rt_uint16_t play_list_get_current(void);
struct play_item* play_list_next(int mode);
struct play_item* play_list_prev(int mode);
int play_list_get_mode(void);
void play_list_set_mode(int mode);
void play_list_append(char* fn);
void play_list_append_radio(const char* url, const char* station);
void play_list_append_directory(const char* path);
void play_list_append_m3u(const char* file);
#endif