comparison decoders/raw.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 29313c20963d
children b13fafb976be
comparison
equal deleted inserted replaced
46:6e13fcc178da 47:ea58bc3b15d7
50 #if (!defined SOUND_SUPPORTS_RAW) 50 #if (!defined SOUND_SUPPORTS_RAW)
51 #error SOUND_SUPPORTS_RAW must be defined. 51 #error SOUND_SUPPORTS_RAW must be defined.
52 #endif 52 #endif
53 53
54 54
55 static int RAW_init(void);
56 static void RAW_quit(void);
55 static int RAW_open(Sound_Sample *sample, const char *ext); 57 static int RAW_open(Sound_Sample *sample, const char *ext);
56 static void RAW_close(Sound_Sample *sample); 58 static void RAW_close(Sound_Sample *sample);
57 static Uint32 RAW_read(Sound_Sample *sample); 59 static Uint32 RAW_read(Sound_Sample *sample);
58 60
59 const Sound_DecoderFunctions __Sound_DecoderFunctions_RAW = 61 const Sound_DecoderFunctions __Sound_DecoderFunctions_RAW =
63 "Raw audio", 65 "Raw audio",
64 "Ryan C. Gordon <icculus@clutteredmind.org>", 66 "Ryan C. Gordon <icculus@clutteredmind.org>",
65 "http://www.icculus.org/SDL_sound/" 67 "http://www.icculus.org/SDL_sound/"
66 }, 68 },
67 69
68 RAW_open, /* open() method */ 70 RAW_init, /* init() method */
69 RAW_close, /* close() method */ 71 RAW_quit, /* quit() method */
70 RAW_read /* read() method */ 72 RAW_open, /* open() method */
73 RAW_close, /* close() method */
74 RAW_read /* read() method */
71 }; 75 };
76
77
78 static int RAW_init(void)
79 {
80 return(1); /* always succeeds. */
81 } /* RAW_init */
82
83
84 static void RAW_quit(void)
85 {
86 /* it's a no-op. */
87 } /* RAW_quit */
72 88
73 89
74 static int RAW_open(Sound_Sample *sample, const char *ext) 90 static int RAW_open(Sound_Sample *sample, const char *ext)
75 { 91 {
76 /* 92 /*