summaryrefslogtreecommitdiff
path: root/library.h
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-06-13 20:23:37 +1000
committerquou <quou@disroot.org>2024-06-13 20:23:37 +1000
commit9dad4016ef52ae71c0325ea9d078e499c484d51f (patch)
tree43c352394b76d33537738dbdff2f5359bbc44df0 /library.h
parent71272f110fd00dc65bf5f028781eebb9969819b2 (diff)
playlists and stuffHEADmaster
Diffstat (limited to 'library.h')
-rw-r--r--library.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/library.h b/library.h
index 81ce96b..cbb8df6 100644
--- a/library.h
+++ b/library.h
@@ -4,6 +4,7 @@
#include "memory.h"
typedef struct {
+ int track;
char path[256];
char name[64];
char artist[64];
@@ -13,7 +14,8 @@ typedef struct {
typedef struct {
Song* songs;
int* indices;
- int cap, cnt;
+ int* filtered;
+ int cap, cnt, fcnt;
} Library;
typedef struct {
@@ -30,14 +32,19 @@ typedef struct {
unsigned cover[album_cover_w * album_cover_h];
} Player;
+Song* find_song(Library* l, const char* path);
void build_library(
Arena* a,
Library* lib,
const char* path
);
+void filter_library(
+ Library* l,
+ const char* str
+);
int get_song_meta(const char* path, Song* s);
-void play_song(Player* p, Song* song);
+int play_song(Player* p, Song* song);
void play_seek(Player* p, float v);
void init_player(Player* p);
void deinit_player(Player* p);