Mercurial > SDL_sound_CoreAudio
comparison decoders/mpglib.c @ 306:c97be6e1bd27
Added framework for Sound_Seek() support.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 21 Apr 2002 18:39:47 +0000 |
parents | ee6e1f8bfae9 |
children | 31cc49d7d0ce |
comparison
equal
deleted
inserted
replaced
305:c345a40a8a99 | 306:c97be6e1bd27 |
---|---|
25 * The SMPEG decoder plays back more forms of MPEGs, and may behave better or | 25 * The SMPEG decoder plays back more forms of MPEGs, and may behave better or |
26 * worse under various conditions. mpglib is (apparently) more efficient than | 26 * worse under various conditions. mpglib is (apparently) more efficient than |
27 * SMPEG, and, again, doesn't need an external library. You should test both | 27 * SMPEG, and, again, doesn't need an external library. You should test both |
28 * decoders and use what you find works best for you. | 28 * decoders and use what you find works best for you. |
29 * | 29 * |
30 * mpglib is part of mpg123, which can be found in its original form at: | 30 * mpglib is an LGPL'd portion of mpg123, which can be found in its original |
31 * http://www.mpg123.de/ | 31 * form at: http://www.mpg123.de/ |
32 * | 32 * |
33 * Please see the file COPYING in the source's root directory. The included | 33 * Please see the file COPYING in the source's root directory. The included |
34 * source code for mpglib falls under the LGPL, which is the same license as | 34 * source code for mpglib falls under the LGPL, which is the same license as |
35 * SDL_sound (so you can consider it a single work). | 35 * SDL_sound (so you can consider it a single work). |
36 * | 36 * |
59 static void MPGLIB_quit(void); | 59 static void MPGLIB_quit(void); |
60 static int MPGLIB_open(Sound_Sample *sample, const char *ext); | 60 static int MPGLIB_open(Sound_Sample *sample, const char *ext); |
61 static void MPGLIB_close(Sound_Sample *sample); | 61 static void MPGLIB_close(Sound_Sample *sample); |
62 static Uint32 MPGLIB_read(Sound_Sample *sample); | 62 static Uint32 MPGLIB_read(Sound_Sample *sample); |
63 static int MPGLIB_rewind(Sound_Sample *sample); | 63 static int MPGLIB_rewind(Sound_Sample *sample); |
64 static int MPGLIB_seek(Sound_Sample *sample, Uint32 ms); | |
64 | 65 |
65 static const char *extensions_mpglib[] = { "MP3", NULL }; | 66 static const char *extensions_mpglib[] = { "MP3", NULL }; |
66 const Sound_DecoderFunctions __Sound_DecoderFunctions_MPGLIB = | 67 const Sound_DecoderFunctions __Sound_DecoderFunctions_MPGLIB = |
67 { | 68 { |
68 { | 69 { |
75 MPGLIB_init, /* init() method */ | 76 MPGLIB_init, /* init() method */ |
76 MPGLIB_quit, /* quit() method */ | 77 MPGLIB_quit, /* quit() method */ |
77 MPGLIB_open, /* open() method */ | 78 MPGLIB_open, /* open() method */ |
78 MPGLIB_close, /* close() method */ | 79 MPGLIB_close, /* close() method */ |
79 MPGLIB_read, /* read() method */ | 80 MPGLIB_read, /* read() method */ |
80 MPGLIB_rewind /* rewind() method */ | 81 MPGLIB_rewind, /* rewind() method */ |
82 MPGLIB_seek /* seek() method */ | |
81 }; | 83 }; |
82 | 84 |
83 | 85 |
84 /* this is what we store in our internal->decoder_private field... */ | 86 /* this is what we store in our internal->decoder_private field... */ |
85 typedef struct | 87 typedef struct |
284 mpg->outpos = mpg->outleft = 0; | 286 mpg->outpos = mpg->outleft = 0; |
285 return(1); | 287 return(1); |
286 } /* MPGLIB_rewind */ | 288 } /* MPGLIB_rewind */ |
287 | 289 |
288 | 290 |
291 static int MPGLIB_seek(Sound_Sample *sample, Uint32 ms) | |
292 { | |
293 BAIL_MACRO("!!! FIXME: Not implemented", 0); | |
294 } /* MPGLIB_seek */ | |
295 | |
289 #endif /* SOUND_SUPPORTS_MPGLIB */ | 296 #endif /* SOUND_SUPPORTS_MPGLIB */ |
290 | 297 |
291 | 298 |
292 /* end of mpglib.c ... */ | 299 /* end of mpglib.c ... */ |
293 | 300 |