summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libgme/m3u_playlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libgme/m3u_playlist.h')
-rw-r--r--lib/rbcodec/codecs/libgme/m3u_playlist.h31
1 files changed, 31 insertions, 0 deletions
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 @@
1// M3U entries parser, with support for subtrack information
2
3// Game_Music_Emu 0.5.2
4#ifndef M3U_PLAYLIST_H
5#define M3U_PLAYILST_H
6
7#include "blargg_common.h"
8
9struct entry_t
10{
11 unsigned char track; // 1-based
12 int length; // milliseconds
13};
14
15/* Short version of the m3u playlist */
16struct M3u_Playlist
17{
18 unsigned char size;
19 struct entry_t *entries;
20};
21
22static inline void M3u_load_data(struct M3u_Playlist* this, void *addr)
23{
24 if( addr == NULL ) return;
25 /* m3u entries data must be at offset 100,
26 the first 99 bytes are used by metadata info */
27 this->size = *(unsigned char *)(addr + 99);
28 this->entries = (struct entry_t *)(addr+100);
29}
30
31#endif