From 9dad4016ef52ae71c0325ea9d078e499c484d51f Mon Sep 17 00:00:00 2001 From: quou Date: Thu, 13 Jun 2024 20:23:37 +1000 Subject: playlists and stuff --- library.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'library.h') 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); -- cgit v1.2.3-54-g00ecf