diff options
author | Fabian Groffen <grobian@gentoo.org> | 2006-12-11 18:45:44 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2006-12-11 18:45:44 +0000 |
commit | c0962003cfb165e886065f0c3935afbfe2699112 (patch) | |
tree | 5536851f7224f34f5700771939a55ceb1c415daa /gnustep-apps/cynthiune/files | |
parent | +gnustep-apps/cynthiune:arts (diff) | |
download | historical-c0962003cfb165e886065f0c3935afbfe2699112.tar.gz historical-c0962003cfb165e886065f0c3935afbfe2699112.tar.bz2 historical-c0962003cfb165e886065f0c3935afbfe2699112.zip |
Version bump, with flac 1.1.3 support patch. Thanks to Alex Ballier to tell me how to "configure" the package.
Package-Manager: portage-2.1.1-r2
Diffstat (limited to 'gnustep-apps/cynthiune/files')
-rw-r--r-- | gnustep-apps/cynthiune/files/cynthiune-0.9.5-flac-1.1.3.patch | 300 | ||||
-rw-r--r-- | gnustep-apps/cynthiune/files/digest-cynthiune-0.9.5 | 3 |
2 files changed, 303 insertions, 0 deletions
diff --git a/gnustep-apps/cynthiune/files/cynthiune-0.9.5-flac-1.1.3.patch b/gnustep-apps/cynthiune/files/cynthiune-0.9.5-flac-1.1.3.patch new file mode 100644 index 000000000000..a6554bda50c3 --- /dev/null +++ b/gnustep-apps/cynthiune/files/cynthiune-0.9.5-flac-1.1.3.patch @@ -0,0 +1,300 @@ +* Josh Coalson <j_coalson@yahoo.com>: cynthiune patch for upcoming FLAC 1.1.3 + +--- Cynthiune-0.9.5/Bundles/FLAC/FLAC.h ++++ Cynthiune-0.9.5/Bundles/FLAC/FLAC.h +@@ -31,7 +31,11 @@ + + @interface FLAC : NSObject <CynthiuneBundle, Format> + { ++#ifdef LEGACY_FLAC + FLAC__FileDecoder *fileDecoder; ++#else ++ FLAC__StreamDecoder *fileDecoder; ++#endif + + unsigned int bitsPerSample; + unsigned int duration; +--- Cynthiune-0.9.5/Bundles/FLAC/FLAC.m ++++ Cynthiune-0.9.5/Bundles/FLAC/FLAC.m +@@ -34,13 +34,25 @@ + #import <Cynthiune/Format.h> + #import <Cynthiune/utils.h> + ++/* FLAC 1.1.3 has FLAC_API_VERSION_CURRENT == 8 */ ++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8 ++#define LEGACY_FLAC ++#else ++#undef LEGACY_FLAC ++#endif ++ + #import "FLAC.h" + + #define LOCALIZED(X) _b ([FLAC class], X) + + static FLAC__StreamDecoderWriteStatus ++#ifdef LEGACY_FLAC + writeCallback (const FLAC__FileDecoder *fileDecoder, const FLAC__Frame *frame, + const FLAC__int32 * const buffer[], void *clientData) ++#else ++writeCallback (const FLAC__StreamDecoder *fileDecoder, const FLAC__Frame *frame, ++ const FLAC__int32 * const buffer[], void *clientData) ++#endif + { + CFLAC *cStream; + unsigned int sample, channel; +@@ -70,9 +82,15 @@ + } + + static void ++#ifdef LEGACY_FLAC + metadataCallback (const FLAC__FileDecoder *fileDecoder, + const FLAC__StreamMetadata *metadata, + void *clientData) ++#else ++metadataCallback (const FLAC__StreamDecoder *fileDecoder, ++ const FLAC__StreamMetadata *metadata, ++ void *clientData) ++#endif + { + CFLAC *cStream; + +@@ -88,9 +106,15 @@ + } + + static void ++#ifdef LEGACY_FLAC + errorCallback (const FLAC__FileDecoder *fileDecoder, + FLAC__StreamDecoderErrorStatus status, + void *clientData) ++#else ++errorCallback (const FLAC__StreamDecoder *fileDecoder, ++ FLAC__StreamDecoderErrorStatus status, ++ void *clientData) ++#endif + { + NSLog (@"FLAC: received error with status %d", status); + } +@@ -161,6 +185,7 @@ + + - (BOOL) _initializeFileDecoderWithFilename: (NSString *) fileName + { ++#ifdef LEGACY_FLAC + FLAC__file_decoder_set_metadata_ignore_all (fileDecoder); + FLAC__file_decoder_set_metadata_respond (fileDecoder, + FLAC__METADATA_TYPE_STREAMINFO); +@@ -173,13 +198,25 @@ + return (FLAC__file_decoder_set_filename (fileDecoder, [fileName cString]) + && (FLAC__file_decoder_init (fileDecoder) == FLAC__FILE_DECODER_OK) + && FLAC__file_decoder_process_until_end_of_metadata (fileDecoder)); ++#else ++ FLAC__stream_decoder_set_metadata_ignore_all (fileDecoder); ++ FLAC__stream_decoder_set_metadata_respond (fileDecoder, ++ FLAC__METADATA_TYPE_STREAMINFO); ++ return ((FLAC__stream_decoder_init_file (fileDecoder, [fileName cString], ++ writeCallback, metadataCallback, errorCallback, self) == FLAC__STREAM_DECODER_INIT_STATUS_OK) ++ && FLAC__stream_decoder_process_until_end_of_metadata (fileDecoder)); ++#endif + } + + - (BOOL) streamOpen: (NSString *) fileName + { + BOOL result; + ++#ifdef LEGACY_FLAC + fileDecoder = FLAC__file_decoder_new(); ++#else ++ fileDecoder = FLAC__stream_decoder_new(); ++#endif + + if (fileDecoder) + { +@@ -187,7 +224,11 @@ + result = YES; + else + { ++#ifdef LEGACY_FLAC + FLAC__file_decoder_delete (fileDecoder); ++#else ++ FLAC__stream_decoder_delete (fileDecoder); ++#endif + fileDecoder = NULL; + result = NO; + } +@@ -200,7 +241,11 @@ + + - (void) streamClose + { ++#ifdef LEGACY_FLAC + FLAC__file_decoder_delete (fileDecoder); ++#else ++ FLAC__stream_decoder_delete (fileDecoder); ++#endif + fileDecoder = NULL; + } + +@@ -215,7 +260,11 @@ + if (position >= readBufferSize) + { + position = 0; ++#ifdef LEGACY_FLAC + success = FLAC__file_decoder_process_single (fileDecoder); ++#else ++ success = FLAC__stream_decoder_process_single (fileDecoder); ++#endif + } + + if (success) +@@ -251,13 +300,27 @@ + withSize: (unsigned int) bufferSize + { + int readBytes; ++#ifdef LEGACY_FLAC + FLAC__FileDecoderState state; + + state = FLAC__file_decoder_get_state (fileDecoder); ++#else ++ FLAC__StreamDecoderState state; ++ ++ state = FLAC__stream_decoder_get_state (fileDecoder); ++#endif + ++#ifdef LEGACY_FLAC + if (state == FLAC__FILE_DECODER_OK) ++#else ++ if (state < FLAC__STREAM_DECODER_END_OF_STREAM) ++#endif + readBytes = [self _processNextChunk: buffer withSize: bufferSize]; ++#ifdef LEGACY_FLAC + else if (state == FLAC__FILE_DECODER_END_OF_FILE) ++#else ++ else if (state == FLAC__STREAM_DECODER_END_OF_STREAM) ++#endif + readBytes = 0; + else + readBytes = -1; +@@ -272,7 +335,11 @@ + + - (void) seek: (unsigned int) aPos + { ++#ifdef LEGACY_FLAC + FLAC__file_decoder_seek_absolute (fileDecoder, aPos * rate); ++#else ++ FLAC__stream_decoder_seek_absolute (fileDecoder, aPos * rate); ++#endif + } + + - (unsigned int) readChannels +@@ -295,7 +362,11 @@ + if (readBuffer) + free (readBuffer); + if (fileDecoder) ++#ifdef LEGACY_FLAC + FLAC__file_decoder_delete (fileDecoder); ++#else ++ FLAC__stream_decoder_delete (fileDecoder); ++#endif + [super dealloc]; + } + +--- Cynthiune-0.9.5/Bundles/FLACTags/FLACTags.m ++++ Cynthiune-0.9.5/Bundles/FLACTags/FLACTags.m +@@ -33,6 +33,13 @@ + + #import "FLACTags.h" + ++/* FLAC 1.1.3 has FLAC_API_VERSION_CURRENT == 8 */ ++#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8 ++#define LEGACY_FLAC ++#else ++#undef LEGACY_FLAC ++#endif ++ + #define LOCALIZED(X) _b ([FLACTags class], X) + + static inline int +@@ -78,16 +85,27 @@ + } + + static FLAC__StreamDecoderWriteStatus ++#ifdef LEGACY_FLAC + writeCallback (const FLAC__FileDecoder *fileDecoder, const FLAC__Frame *frame, + const FLAC__int32 * const buffer[], void *clientData) ++#else ++writeCallback (const FLAC__StreamDecoder *fileDecoder, const FLAC__Frame *frame, ++ const FLAC__int32 * const buffer[], void *clientData) ++#endif + { + return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; + } + + static void ++#ifdef LEGACY_FLAC + metadataCallback (const FLAC__FileDecoder *fileDecoder, + const FLAC__StreamMetadata *metadata, + void *clientData) ++#else ++metadataCallback (const FLAC__StreamDecoder *fileDecoder, ++ const FLAC__StreamMetadata *metadata, ++ void *clientData) ++#endif + { + unsigned int count; + +@@ -104,9 +122,15 @@ + } + + static void ++#ifdef LEGACY_FLAC + errorCallback (const FLAC__FileDecoder *fileDecoder, + FLAC__StreamDecoderErrorStatus status, + void *clientData) ++#else ++errorCallback (const FLAC__StreamDecoder *fileDecoder, ++ FLAC__StreamDecoderErrorStatus status, ++ void *clientData) ++#endif + { + NSLog (@"FLACTags: received error with status %d", status); + } +@@ -132,14 +156,23 @@ + year: (NSString **) year + ofFilename: (NSString *) filename + { ++#ifdef LEGACY_FLAC + FLAC__FileDecoder *fileDecoder; ++#else ++ FLAC__StreamDecoder *fileDecoder; ++#endif + BOOL result; + NSString **arrayOfValues[] = { title, artist, album, trackNumber, + genre, year }; + ++#ifdef LEGACY_FLAC + fileDecoder = FLAC__file_decoder_new(); ++#else ++ fileDecoder = FLAC__stream_decoder_new(); ++#endif + if (fileDecoder) + { ++#ifdef LEGACY_FLAC + FLAC__file_decoder_set_metadata_ignore_all (fileDecoder); + FLAC__file_decoder_set_metadata_respond (fileDecoder, + FLAC__METADATA_TYPE_VORBIS_COMMENT); +@@ -156,6 +189,17 @@ + && FLAC__file_decoder_process_until_end_of_metadata + (fileDecoder)); + FLAC__file_decoder_delete (fileDecoder); ++#else ++ FLAC__stream_decoder_set_metadata_ignore_all (fileDecoder); ++ FLAC__stream_decoder_set_metadata_respond (fileDecoder, ++ FLAC__METADATA_TYPE_VORBIS_COMMENT); ++ result = ((FLAC__stream_decoder_init_file (fileDecoder, [filename cString], ++ writeCallback, metadataCallback, errorCallback, arrayOfValues) ++ == FLAC__STREAM_DECODER_INIT_STATUS_OK) ++ && FLAC__stream_decoder_process_until_end_of_metadata ++ (fileDecoder)); ++ FLAC__stream_decoder_delete (fileDecoder); ++#endif + } + else + result = NO; diff --git a/gnustep-apps/cynthiune/files/digest-cynthiune-0.9.5 b/gnustep-apps/cynthiune/files/digest-cynthiune-0.9.5 new file mode 100644 index 000000000000..b3ba39c6c118 --- /dev/null +++ b/gnustep-apps/cynthiune/files/digest-cynthiune-0.9.5 @@ -0,0 +1,3 @@ +MD5 99a0366c52bab71e846941dbce987089 Cynthiune-0.9.5.tar.gz 490426 +RMD160 b9dff46275b6b79ebc62655e7de92b9c9aa41274 Cynthiune-0.9.5.tar.gz 490426 +SHA256 e3e036385388556759e3712ea5e595976ec7a4867698dea7c46b46d226122e70 Cynthiune-0.9.5.tar.gz 490426 |