Mercurial > SDL_sound_CoreAudio
comparison decoders/skeleton.c @ 47:ea58bc3b15d7
Added init() and quit() methods.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 22 Sep 2001 14:41:38 +0000 |
parents | d9b9d60cf9a9 |
children | b13fafb976be |
comparison
equal
deleted
inserted
replaced
46:6e13fcc178da | 47:ea58bc3b15d7 |
---|---|
41 #if (!defined SOUND_SUPPORTS_FMT) | 41 #if (!defined SOUND_SUPPORTS_FMT) |
42 #error SOUND_SUPPORTS_FMT must be defined. | 42 #error SOUND_SUPPORTS_FMT must be defined. |
43 #endif | 43 #endif |
44 | 44 |
45 | 45 |
46 static int FMT_init(void); | |
47 static void FMT_quit(void); | |
46 static int FMT_open(Sound_Sample *sample, const char *ext); | 48 static int FMT_open(Sound_Sample *sample, const char *ext); |
47 static void FMT_close(Sound_Sample *sample); | 49 static void FMT_close(Sound_Sample *sample); |
48 static Uint32 FMT_read(Sound_Sample *sample); | 50 static Uint32 FMT_read(Sound_Sample *sample); |
49 | 51 |
50 const Sound_DecoderFunctions __Sound_DecoderFunctions_FMT = | 52 const Sound_DecoderFunctions __Sound_DecoderFunctions_FMT = |
54 "FMT audio format description", | 56 "FMT audio format description", |
55 "Ryan C. Gordon <icculus@clutteredmind.org>", | 57 "Ryan C. Gordon <icculus@clutteredmind.org>", |
56 "http://www.icculus.org/SDL_sound/" | 58 "http://www.icculus.org/SDL_sound/" |
57 }, | 59 }, |
58 | 60 |
61 FMT_init, /* init() method */ | |
62 FMT_quit, /* quit() method */ | |
59 FMT_open, /* open() method */ | 63 FMT_open, /* open() method */ |
60 FMT_close, /* close() method */ | 64 FMT_close, /* close() method */ |
61 FMT_read /* read() method */ | 65 FMT_read /* read() method */ |
62 }; | 66 }; |
67 | |
68 | |
69 static int FMT_init(void) | |
70 { | |
71 /* do any global decoder/library initialization you need here. */ | |
72 | |
73 return(1); /* initialization successful. */ | |
74 } /* FMT_init */ | |
75 | |
76 | |
77 static void FMT_quit(void) | |
78 { | |
79 /* do any global decoder/library cleanup you need here. */ | |
80 } /* FMT_quit */ | |
63 | 81 |
64 | 82 |
65 static int FMT_open(Sound_Sample *sample, const char *ext) | 83 static int FMT_open(Sound_Sample *sample, const char *ext) |
66 { | 84 { |
67 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; | 85 Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; |