From f40bfc9267b13b54e6379dfe7539447662879d24 Mon Sep 17 00:00:00 2001 From: Sean Bartell Date: Sat, 25 Jun 2011 21:32:25 -0400 Subject: Add codecs to librbcodec. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97 Reviewed-on: http://gerrit.rockbox.org/137 Reviewed-by: Nils Wallménius Tested-by: Nils Wallménius --- lib/rbcodec/codecs/libgme/m3u_playlist.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lib/rbcodec/codecs/libgme/m3u_playlist.h (limited to 'lib/rbcodec/codecs/libgme/m3u_playlist.h') diff --git a/lib/rbcodec/codecs/libgme/m3u_playlist.h b/lib/rbcodec/codecs/libgme/m3u_playlist.h new file mode 100644 index 0000000000..06a5d3024b --- /dev/null +++ b/lib/rbcodec/codecs/libgme/m3u_playlist.h @@ -0,0 +1,31 @@ +// 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 -- cgit v1.2.3