/* FLAC input plugin for Winamp3\r
- * Copyright (C) 2000,2001 Josh Coalson\r
+ * Copyright (C) 2000,2001,2002 Josh Coalson\r
*\r
* This program is free software; you can redistribute it and/or\r
* modify it under the terms of the GNU General Public License\r
\r
#include "flacpcm.h"\r
extern "C" {\r
-#include "FLAC/utility.h"\r
+#include "FLAC/metadata.h"\r
};\r
\r
\r
if(!reader) return 0;\r
\r
//@@@ to be really "clean" we should go through the reader instead of directly to the file...\r
- if(!FLAC__utility_get_streaminfo(infos->getFilename(), &stream_info))\r
+ if(!FLAC__metadata_get_streaminfo(infos->getFilename(), &stream_info))\r
return 1;\r
\r
id3v1_struct tag;\r
\r
- //@@@ ditto here...\r
bool has_tag = get_id3v1_tag_(infos->getFilename(), &tag);\r
\r
infos->setLength(lengthInMsec());\r
(void)decoder;\r
\r
if(instance->abort_flag)\r
- return FLAC__STREAM_DECODER_WRITE_ABORT;\r
+ return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;\r
\r
for(sample = instance->samples_in_reservoir*channels, wide_sample = 0; wide_sample < wide_samples; wide_sample++)\r
for(channel = 0; channel < channels; channel++, sample++)\r
\r
instance->samples_in_reservoir += wide_samples;\r
\r
- return FLAC__STREAM_DECODER_WRITE_CONTINUE;\r
+ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;\r
}\r
\r
-void FlacPcm::metadataCallback_(const FLAC__SeekableStreamDecoder *decoder, const FLAC__StreamMetaData *metadata, void *client_data)\r
+void FlacPcm::metadataCallback_(const FLAC__SeekableStreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data)\r
{\r
FlacPcm *instance = (FlacPcm*)client_data;\r
(void)decoder;\r
{\r
FlacPcm *instance = (FlacPcm*)client_data;\r
(void)decoder;\r
- if(status != FLAC__STREAM_DECODER_ERROR_LOST_SYNC)\r
+ if(status != FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC)\r
instance->abort_flag = true;\r
}\r
\r
const char *temp;\r
FILE *f = fopen(filename, "rb");\r
memset(tag, 0, sizeof(id3v1_struct));\r
+#if 0\r
+@@@@\r
strcpy(tag->title,"Sonata K.42");\r
strcpy(tag->artist,"Domenico Scarlatti");\r
strcpy(tag->album,"Narcisso Yepes Plays Scarlatti");\r
sprintf(tag->description, "%s - %s", tag->artist, tag->title);\r
+#endif\r
\r
/* set the title and description to the filename by default */\r
temp = strrchr(filename, '/');\r