comparison decoders/ogg.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 0fc0f91b1b84
children cd91e1857b42
comparison
equal deleted inserted replaced
46:6e13fcc178da 47:ea58bc3b15d7
47 47
48 #if (!defined SOUND_SUPPORTS_OGG) 48 #if (!defined SOUND_SUPPORTS_OGG)
49 #error SOUND_SUPPORTS_OGG must be defined. 49 #error SOUND_SUPPORTS_OGG must be defined.
50 #endif 50 #endif
51 51
52 52 static int OGG_init(void);
53 static void OGG_quit(void);
53 static int OGG_open(Sound_Sample *sample, const char *ext); 54 static int OGG_open(Sound_Sample *sample, const char *ext);
54 static void OGG_close(Sound_Sample *sample); 55 static void OGG_close(Sound_Sample *sample);
55 static Uint32 OGG_read(Sound_Sample *sample); 56 static Uint32 OGG_read(Sound_Sample *sample);
56 57
57 const Sound_DecoderFunctions __Sound_DecoderFunctions_OGG = 58 const Sound_DecoderFunctions __Sound_DecoderFunctions_OGG =
61 "Ogg Vorbis audio through VorbisFile", 62 "Ogg Vorbis audio through VorbisFile",
62 "Ryan C. Gordon <icculus@clutteredmind.org>", 63 "Ryan C. Gordon <icculus@clutteredmind.org>",
63 "http://www.icculus.org/SDL_sound/" 64 "http://www.icculus.org/SDL_sound/"
64 }, 65 },
65 66
66 OGG_open, /* open() method */ 67 OGG_init, /* init() method */
67 OGG_close, /* close() method */ 68 OGG_quit, /* quit() method */
68 OGG_read /* read() method */ 69 OGG_open, /* open() method */
70 OGG_close, /* close() method */
71 OGG_read /* read() method */
69 }; 72 };
73
74
75 static int OGG_init(void)
76 {
77 return(1); /* always succeeds. */
78 } /* OGG_init */
79
80
81 static void OGG_quit(void)
82 {
83 /* it's a no-op. */
84 } /* OGG_quit */
85
70 86
71 87
72 /* 88 /*
73 * These are callbacks from vorbisfile that let them read data from 89 * These are callbacks from vorbisfile that let them read data from
74 * a RWops... 90 * a RWops...