aboutsummaryrefslogtreecommitdiff
path: root/audio/rezound
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2008-04-07 20:37:23 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2008-04-07 20:37:23 +0000
commitfc6f8996911202c6df18b1ee15a9cb205ba4ea49 (patch)
tree539cb57de0e25c0fcfd062eb36d849e1f96fdb90 /audio/rezound
parente736f59941a3e760ba36b76c2472497f04a3d7da (diff)
downloadports-fc6f8996911202c6df18b1ee15a9cb205ba4ea49.tar.gz
ports-fc6f8996911202c6df18b1ee15a9cb205ba4ea49.zip
Update to FLAC 1.2.1. This version includes two and a half years
worth of changes and an altered API. Bump the revision of all ports that depend on libFLAC and adapt to the new API where necessary. Some patches from Debian, Gentoo, OpenBSD, and upstream repositories. PR: 119476
Notes
Notes: svn path=/head/; revision=210771
Diffstat (limited to 'audio/rezound')
-rw-r--r--audio/rezound/Makefile4
-rw-r--r--audio/rezound/files/patch-src_backend_CFLACSoundTranslator.cpp69
2 files changed, 71 insertions, 2 deletions
diff --git a/audio/rezound/Makefile b/audio/rezound/Makefile
index 2e4d3706e6e7..70b296e2d5a7 100644
--- a/audio/rezound/Makefile
+++ b/audio/rezound/Makefile
@@ -7,7 +7,7 @@
PORTNAME= rezound
DISTVERSION= 0.12.3beta
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -72,7 +72,7 @@ LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis
.endif
.if defined(WITH_FLAC)
-LIB_DEPENDS+= FLAC.7:${PORTSDIR}/audio/flac
+LIB_DEPENDS+= FLAC.10:${PORTSDIR}/audio/flac
.endif
.if defined(WITH_FFTW)
diff --git a/audio/rezound/files/patch-src_backend_CFLACSoundTranslator.cpp b/audio/rezound/files/patch-src_backend_CFLACSoundTranslator.cpp
new file mode 100644
index 000000000000..b1dcb2555817
--- /dev/null
+++ b/audio/rezound/files/patch-src_backend_CFLACSoundTranslator.cpp
@@ -0,0 +1,69 @@
+--- src/backend/CFLACSoundTranslator.cpp.orig 2005-05-01 06:39:38.000000000 +0200
++++ src/backend/CFLACSoundTranslator.cpp 2008-03-28 18:08:28.000000000 +0100
+@@ -75,15 +75,15 @@ public:
+ for(unsigned t=0;t<MAX_CHANNELS;t++)
+ accessers[t]=NULL;
+
+- set_filename(filename.c_str());
++ //set_filename(filename.c_str());
+
+ set_metadata_ignore_all();
+ //set_metadata_respond(FLAC__METADATA_TYPE_VORBIS_COMMENT);
+ //set_metadata_respond(FLAC__METADATA_TYPE_CUESHEET);
+
+- State s=init();
+- if(s!=FLAC__FILE_DECODER_OK)
+- throw runtime_error(string(__func__)+" -- "+s.as_cstring());
++ FLAC__StreamDecoderInitStatus s=init(filename.c_str());
++ if(s!=FLAC__STREAM_DECODER_INIT_STATUS_OK)
++ throw runtime_error(string(__func__)+" -- "+FLAC__StreamDecoderInitStatusString[s]);
+ }
+
+ virtual ~MyFLACDecoderFile()
+@@ -170,7 +170,7 @@ protected:
+
+ // update status bar and detect user cancel
+ FLAC__uint64 filePosition;
+- FLAC__file_decoder_get_decode_position(decoder_, &filePosition);
++ FLAC__stream_decoder_get_decode_position(decoder_, &filePosition);
+ return statusBar.update(filePosition) ? FLAC__STREAM_DECODER_WRITE_STATUS_ABORT : FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+ }
+
+@@ -215,7 +215,7 @@ private:
+ bool CFLACSoundTranslator::onLoadSound(const string filename,CSound *sound) const
+ {
+ MyFLACDecoderFile f(filename,sound);
+- return f.process_until_end_of_file();
++ return f.process_until_end_of_stream();
+ }
+
+
+@@ -258,7 +258,7 @@ bool CFLACSoundTranslator::onSaveSound(c
+
+ MyFLACEncoderFile f(saveLength);
+
+- f.set_filename(filename.c_str());
++ //f.set_filename(filename.c_str());
+
+ f.set_channels(sound->getChannelCount());
+
+@@ -274,8 +274,8 @@ bool CFLACSoundTranslator::onSaveSound(c
+ //f.set_metadata(...) // ??? to do to set cues and user notes, etc
+
+
+- MyFLACEncoderFile::State s=f.init();
+- if(s==FLAC__STREAM_ENCODER_OK)
++ FLAC__StreamEncoderInitStatus s=f.init(filename.c_str());
++ if(s==FLAC__STREAM_ENCODER_INIT_STATUS_OK)
+ {
+ #define BUFFER_SIZE 65536
+ TAutoBuffer<FLAC__int32> buffers[MAX_CHANNELS];
+@@ -328,7 +328,7 @@ bool CFLACSoundTranslator::onSaveSound(c
+ return true;
+ }
+ else
+- throw runtime_error(string(__func__)+" -- error creating FLAC encoder -- "+s.as_cstring());
++ throw runtime_error(string(__func__)+" -- error creating FLAC encoder -- "+FLAC__StreamEncoderInitStatusString[s]);
+
+ }
+