f40bfc9267
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97 Reviewed-on: http://gerrit.rockbox.org/137 Reviewed-by: Nils Wallménius <nils@rockbox.org> Tested-by: Nils Wallménius <nils@rockbox.org>
31 lines
656 B
C
31 lines
656 B
C
// M3U entries parser, with support for subtrack information
|
|
|
|
// Game_Music_Emu 0.5.2
|
|
#ifndef M3U_PLAYLIST_H
|
|
#define M3U_PLAYILST_H
|
|
|
|
#include "blargg_common.h"
|
|
|
|
struct entry_t
|
|
{
|
|
unsigned char track; // 1-based
|
|
int length; // milliseconds
|
|
};
|
|
|
|
/* Short version of the m3u playlist */
|
|
struct M3u_Playlist
|
|
{
|
|
unsigned char size;
|
|
struct entry_t *entries;
|
|
};
|
|
|
|
static inline void M3u_load_data(struct M3u_Playlist* this, void *addr)
|
|
{
|
|
if( addr == NULL ) return;
|
|
/* m3u entries data must be at offset 100,
|
|
the first 99 bytes are used by metadata info */
|
|
this->size = *(unsigned char *)(addr + 99);
|
|
this->entries = (struct entry_t *)(addr+100);
|
|
}
|
|
|
|
#endif
|