comparison decoders/flac.c @ 221:c9772a9f5271

Initial implementation or stubs for rewind method. Other cleanups.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 17 Jan 2002 20:53:53 +0000
parents 47cc2de2ae36
children d3dc34315ac7
comparison
equal deleted inserted replaced
220:ef72f3c490e7 221:c9772a9f5271
51 static int FLAC_init(void); 51 static int FLAC_init(void);
52 static void FLAC_quit(void); 52 static void FLAC_quit(void);
53 static int FLAC_open(Sound_Sample *sample, const char *ext); 53 static int FLAC_open(Sound_Sample *sample, const char *ext);
54 static void FLAC_close(Sound_Sample *sample); 54 static void FLAC_close(Sound_Sample *sample);
55 static Uint32 FLAC_read(Sound_Sample *sample); 55 static Uint32 FLAC_read(Sound_Sample *sample);
56 static int FLAC_rewind(Sound_Sample *sample);
56 57
57 static const char *extensions_flac[] = { "FLAC", "FLA", NULL }; 58 static const char *extensions_flac[] = { "FLAC", "FLA", NULL };
58 59
59 const Sound_DecoderFunctions __Sound_DecoderFunctions_FLAC = 60 const Sound_DecoderFunctions __Sound_DecoderFunctions_FLAC =
60 { 61 {
63 "Free Lossless Audio Codec", 64 "Free Lossless Audio Codec",
64 "Torbjörn Andersson <d91tan@Update.UU.SE>", 65 "Torbjörn Andersson <d91tan@Update.UU.SE>",
65 "http://flac.sourceforge.net/" 66 "http://flac.sourceforge.net/"
66 }, 67 },
67 68
68 FLAC_init, /* init() method */ 69 FLAC_init, /* init() method */
69 FLAC_quit, /* quit() method */ 70 FLAC_quit, /* quit() method */
70 FLAC_open, /* open() method */ 71 FLAC_open, /* open() method */
71 FLAC_close, /* close() method */ 72 FLAC_close, /* close() method */
72 FLAC_read /* read() method */ 73 FLAC_read, /* read() method */
74 FLAC_rewind /* rewind() method */
73 }; 75 };
74 76
75 /* This is what we store in our internal->decoder_private field. */ 77 /* This is what we store in our internal->decoder_private field. */
76 typedef struct 78 typedef struct
77 { 79 {
358 return(0); 360 return(0);
359 361
360 return(f->frame_size); 362 return(f->frame_size);
361 } /* FLAC_read */ 363 } /* FLAC_read */
362 364
365
366 static int FLAC_rewind(Sound_Sample *sample)
367 {
368 /* !!! FIXME. */
369 SNDDBG(("FLAC_rewind(): Write me!\n"));
370 assert(0);
371 return(0);
372 } /* FLAC_rewind */
373
363 #endif /* SOUND_SUPPORTS_FLAC */ 374 #endif /* SOUND_SUPPORTS_FLAC */
364 375
365 376
366 /* end of flac.c ... */ 377 /* end of flac.c ... */