blob: 81ce96be3bb8581df6c054e6e69831a03ae08e80 (
plain) (
blame)
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
|
#ifndef library_h
#define library_h
#include "memory.h"
typedef struct {
char path[256];
char name[64];
char artist[64];
char album[64];
} Song;
typedef struct {
Song* songs;
int* indices;
int cap, cnt;
} Library;
typedef struct {
Song* song;
void* f;
int
seek,
samples,
channels,
play,
has_art
;
unsigned long long cs, ms;
unsigned cover[album_cover_w * album_cover_h];
} Player;
void build_library(
Arena* a,
Library* lib,
const char* path
);
int get_song_meta(const char* path, Song* s);
void play_song(Player* p, Song* song);
void play_seek(Player* p, float v);
void init_player(Player* p);
void deinit_player(Player* p);
#endif
|