1 /* 2 * Music File Reference List IO 3 */ 4 #ifndef MUSICLISTIO_H 5 #define MUSICLISTIO_H 6 7 #include <sys/types.h> 8 #include "sound.h" 9 10 11 /* 12 * Music Reference Flags: 13 */ 14 #define SAR_MUSIC_REF_FLAGS_REPEAT (1 << 1) 15 #define SAR_MUSIC_REF_FLAGS_FADE_IN (1 << 2) 16 #define SAR_MUSIC_REF_FLAGS_FADE_OUT (1 << 3) 17 18 /* 19 * Music Reference: 20 */ 21 typedef struct { 22 23 int id; /* One of SAR_MUSIC_ID_* */ 24 char *filename; 25 unsigned int flags; /* Any of SAR_MUSIC_REF_FLAGS_* */ 26 27 } sar_music_ref_struct; 28 #define SAR_MUSIC_REF(p) ((sar_music_ref_struct *)(p)) 29 30 31 extern sar_music_ref_struct *SARMusicMatchPtr( 32 sar_music_ref_struct **ml, int total, 33 int id, int *music_ref_num 34 ); 35 36 extern void SARMusicListDeleteAll( 37 sar_music_ref_struct ***ml, int *total 38 ); 39 extern int SARMusicListLoadFromFile( 40 const char *filename, 41 sar_music_ref_struct ***ml, int *total 42 ); 43 44 #endif /* MUSICLISTIO_H */ 45