diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-07 20:01:04 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-07 20:01:04 +0000 |
commit | acb0917556fc33681c1df5a530cf754193e67705 (patch) | |
tree | 052a47097009a210e4aed9c207bd6aa4828cc000 /apps/codecs/libgme/m3u_playlist.h | |
parent | 93c6f1329a5691a8be158cefe15641bd1daf9ef8 (diff) | |
download | rockbox-acb0917556fc33681c1df5a530cf754193e67705.tar.gz rockbox-acb0917556fc33681c1df5a530cf754193e67705.zip |
Submit initial patch from FS#12176. Adds support for several new game music formats (AY, GBS, HES, KSS, SGC, VGM and VGZ) and replaces the current NSF and NSFE with a new implementation based on a port of the Game Music Emu library 'GME'. This first submit does not cover the full functionality provided by the author's original patch: Coleco-SGV is not supported, some GME-specific m3u-support has been removed and IRAM is not used yet. Further changes are very likely to follow this submit. Thanks to Mauricio Garrido.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30264 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libgme/m3u_playlist.h')
-rw-r--r-- | apps/codecs/libgme/m3u_playlist.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/apps/codecs/libgme/m3u_playlist.h b/apps/codecs/libgme/m3u_playlist.h new file mode 100644 index 0000000000..06a5d3024b --- /dev/null +++ b/apps/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 | |||
9 | struct entry_t | ||
10 | { | ||
11 | unsigned char track; // 1-based | ||
12 | int length; // milliseconds | ||
13 | }; | ||
14 | |||
15 | /* Short version of the m3u playlist */ | ||
16 | struct M3u_Playlist | ||
17 | { | ||
18 | unsigned char size; | ||
19 | struct entry_t *entries; | ||
20 | }; | ||
21 | |||
22 | static 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 | ||