1
1
/* Game music emulator library C interface (also usable from C++) */
2
2
3
- /* Game_Music_Emu 0.6.3 */
3
+ /* Game_Music_Emu 0.6.4 */
4
4
#ifndef GME_H
5
5
#define GME_H
6
6
7
7
#ifdef __cplusplus
8
8
extern "C" {
9
9
#endif
10
10
11
- #define GME_VERSION 0x000603 /* 1 byte major, 1 byte minor, 1 byte patch-level */
11
+ #define GME_VERSION 0x000604 /* 1 byte major, 1 byte minor, 1 byte patch-level */
12
12
13
13
/* Error string returned by library functions, or NULL if no error (success) */
14
14
typedef const char * gme_err_t ;
@@ -57,6 +57,11 @@ BLARGG_EXPORT void gme_delete( Music_Emu* );
57
57
Fade time can be changed while track is playing. */
58
58
BLARGG_EXPORT void gme_set_fade ( Music_Emu * , int start_msec );
59
59
60
+ /** See gme_set_fade.
61
+ * @since 0.6.4
62
+ */
63
+ BLARGG_EXPORT void gme_set_fade_msecs ( Music_Emu * , int start_msec , int length_msecs );
64
+
60
65
/**
61
66
* If do_autoload_limit is nonzero, then automatically load track length
62
67
* metadata (if present) and terminate playback once the track length has been
@@ -67,12 +72,13 @@ BLARGG_EXPORT void gme_set_fade( Music_Emu*, int start_msec );
67
72
*
68
73
* By default, playback limits are loaded and applied.
69
74
*
70
- * @since 0.6.2
75
+ * @since 0.6.3
71
76
*/
72
77
BLARGG_EXPORT void gme_set_autoload_playback_limit ( Music_Emu * , int do_autoload_limit );
73
78
74
79
/** See gme_set_autoload_playback_limit.
75
- * @since 0.6.2
80
+ * (This was actually added in 0.6.3, but wasn't exported because of a typo.)
81
+ * @since 0.6.4
76
82
*/
77
83
BLARGG_EXPORT int gme_autoload_playback_limit ( Music_Emu const * );
78
84
@@ -123,13 +129,16 @@ struct gme_info_t
123
129
int length ; /* total length, if file specifies it */
124
130
int intro_length ; /* length of song up to looping section */
125
131
int loop_length ; /* length of looping section */
126
-
132
+
127
133
/* Length if available, otherwise intro_length+loop_length*2 if available,
128
134
otherwise a default of 150000 (2.5 minutes). */
129
135
int play_length ;
130
-
131
- int i4 ,i5 ,i6 ,i7 ,i8 ,i9 ,i10 ,i11 ,i12 ,i13 ,i14 ,i15 ; /* reserved */
132
-
136
+
137
+ /* fade length in milliseconds; -1 if unknown */
138
+ int fade_length ;
139
+
140
+ int i5 ,i6 ,i7 ,i8 ,i9 ,i10 ,i11 ,i12 ,i13 ,i14 ,i15 ; /* reserved */
141
+
133
142
/* empty string ("") if not available */
134
143
const char * system ;
135
144
const char * game ;
@@ -138,7 +147,7 @@ struct gme_info_t
138
147
const char * copyright ;
139
148
const char * comment ;
140
149
const char * dumper ;
141
-
150
+
142
151
const char * s7 ,* s8 ,* s9 ,* s10 ,* s11 ,* s12 ,* s13 ,* s14 ,* s15 ; /* reserved */
143
152
};
144
153
@@ -170,13 +179,17 @@ BLARGG_EXPORT void gme_mute_voice( Music_Emu*, int index, int mute );
170
179
voices, 0 unmutes them all, 0x01 mutes just the first voice, etc. */
171
180
BLARGG_EXPORT void gme_mute_voices ( Music_Emu * , int muting_mask );
172
181
182
+ /* Disable/Enable echo effect for SPC files */
183
+ /* Available since 0.6.4 */
184
+ BLARGG_EXPORT void gme_disable_echo ( Music_Emu * , int disable );
185
+
173
186
/* Frequency equalizer parameters (see gme.txt) */
174
187
/* Implementers: If modified, also adjust Music_Emu::make_equalizer as needed */
175
188
typedef struct gme_equalizer_t
176
189
{
177
190
double treble ; /* -50.0 = muffled, 0 = flat, +5.0 = extra-crisp */
178
191
double bass ; /* 1 = full bass, 90 = average, 16000 = almost no bass */
179
-
192
+
180
193
double d2 ,d3 ,d4 ,d5 ,d6 ,d7 ,d8 ,d9 ; /* reserved */
181
194
} gme_equalizer_t ;
182
195
@@ -224,7 +237,7 @@ BLARGG_EXPORT int gme_type_multitrack( gme_type_t );
224
237
225
238
/* whether the pcm output retrieved by gme_play() will have all 8 voices rendered to their
226
239
* individual stereo channel or (if false) these voices get mixed into one single stereo channel
227
- * @since 0.6.2 */
240
+ * @since 0.6.3 */
228
241
BLARGG_EXPORT int gme_multi_channel ( Music_Emu const * );
229
242
230
243
/******** Advanced file loading ********/
@@ -248,7 +261,7 @@ BLARGG_EXPORT gme_type_t gme_identify_extension( const char path_or_extension []
248
261
* Get typical file extension for a given music type. This is not a replacement
249
262
* for a file content identification library (but see gme_identify_header).
250
263
*
251
- * @since 0.6.2
264
+ * @since 0.6.3
252
265
*/
253
266
BLARGG_EXPORT const char * gme_type_extension ( gme_type_t music_type );
254
267
@@ -263,7 +276,7 @@ BLARGG_EXPORT Music_Emu* gme_new_emu( gme_type_t, int sample_rate );
263
276
/* Create new multichannel emulator and set sample rate. Returns NULL if out of memory.
264
277
* If you only need track information, pass gme_info_only for sample_rate.
265
278
* (see gme_multi_channel for more information on multichannel support)
266
- * @since 0.6.2
279
+ * @since 0.6.3
267
280
*/
268
281
BLARGG_EXPORT Music_Emu * gme_new_emu_multi_channel ( gme_type_t , int sample_rate );
269
282
@@ -273,6 +286,17 @@ BLARGG_EXPORT gme_err_t gme_load_file( Music_Emu*, const char path [] );
273
286
/* Load music file from memory into emulator. Makes a copy of data passed. */
274
287
BLARGG_EXPORT gme_err_t gme_load_data ( Music_Emu * , void const * data , long size );
275
288
289
+ /* Load multiple single-track music files from memory into emulator.
290
+ * @since 0.6.4
291
+ */
292
+ BLARGG_EXPORT gme_err_t gme_load_tracks ( Music_Emu * me ,
293
+ void const * data , long * sizes , int count );
294
+
295
+ /* Return the fixed track count of an emu file type
296
+ * @since 0.6.4
297
+ */
298
+ BLARGG_EXPORT int gme_fixed_track_count ( gme_type_t );
299
+
276
300
/* Load music file using custom data reader function that will be called to
277
301
read file data. Most emulators load the entire file in one read call. */
278
302
typedef gme_err_t (* gme_reader_t )( void * your_data , void * out , int count );
0 commit comments