summaryrefslogtreecommitdiff
path: root/games/scummvm
diff options
context:
space:
mode:
authoradam <adam>2007-07-01 10:12:02 +0000
committeradam <adam>2007-07-01 10:12:02 +0000
commit974bc785187553c093445d80b52d9e9c85917bb0 (patch)
treea96bad223403b6e482e788a84b08823b8ab9578d /games/scummvm
parent6d284fef256e2685f941d26014069818b2d30563 (diff)
downloadpkgsrc-974bc785187553c093445d80b52d9e9c85917bb0.tar.gz
Changes 0.10.0:
New Games: - Added Cinematique evo 1 engine. Currently only Future Wars is supported. - Added Touche: The Adventures of the Fifth Musketeer engine. - Added support for Gobliins 2. - Added support for Simon the Sorcerer's Puzzle Pack. - Added support for Ween: The Prophecy. - Added support for Bargon Attack. - Added Sierra AGI engine. - Added support for Goblins 3. - Added Parallaction engine. Currently only Nippon Safes Inc. is supported. General: - Added dialog which allows the user to select the GUI theme on runtime. - Added 'Mass Add' feature to the Launcher, which allows you to scan for all games in all subdirectories of a given directory (to use it, press shift then click on "Add Game"). - Improved the way the auto detector generates target names, it now takes a game's variant, language and platform into account. - Improved compression for DXA movies. - Keyboard repeat is now handled in a centralized way, rather than on a case-by-case basis. (Simply put, all engines now have keyboard repeat.)
Diffstat (limited to 'games/scummvm')
-rw-r--r--games/scummvm/Makefile7
-rw-r--r--games/scummvm/PLIST7
-rw-r--r--games/scummvm/distinfo17
-rw-r--r--games/scummvm/patches/patch-aa14
-rw-r--r--games/scummvm/patches/patch-ab13
-rw-r--r--games/scummvm/patches/patch-ac20
-rw-r--r--games/scummvm/patches/patch-ad10
-rw-r--r--games/scummvm/patches/patch-ae25
-rw-r--r--games/scummvm/patches/patch-af451
9 files changed, 33 insertions, 531 deletions
diff --git a/games/scummvm/Makefile b/games/scummvm/Makefile
index a55e1201017..d43f2d17027 100644
--- a/games/scummvm/Makefile
+++ b/games/scummvm/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.49 2007/02/26 11:22:28 drochner Exp $
+# $NetBSD: Makefile,v 1.50 2007/07/01 10:12:02 adam Exp $
-DISTNAME= scummvm-0.9.1
-PKGREVISION= 3
+DISTNAME= scummvm-0.10.0
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=scummvm/}
EXTRACT_SUFX= .tar.bz2
@@ -14,8 +13,8 @@ USE_DIRS+= xdg-1.1
USE_LANGUAGES= c c++
USE_TOOLS+= gmake
HAS_CONFIGURE= yes
+CONFIGURE_ARGS+= --mandir=${PREFIX:Q}/${PKGMANDIR:Q}
CONFIGURE_ARGS+= --prefix=${PREFIX:Q}
-CONFIGURE_ARGS+= --enable-agi
UNLIMIT_RESOURCES= datasize
diff --git a/games/scummvm/PLIST b/games/scummvm/PLIST
index e069927f2c9..84df9957a1c 100644
--- a/games/scummvm/PLIST
+++ b/games/scummvm/PLIST
@@ -1,9 +1,14 @@
-@comment $NetBSD: PLIST,v 1.4 2005/03/29 08:48:31 adam Exp $
+@comment $NetBSD: PLIST,v 1.5 2007/07/01 10:12:02 adam Exp $
bin/scummvm
man/man6/scummvm.6
share/doc/scummvm/AUTHORS
share/doc/scummvm/COPYING
+share/doc/scummvm/COPYRIGHT
share/doc/scummvm/NEWS
share/doc/scummvm/README
share/pixmaps/scummvm.xpm
+share/scummvm/classic080.ini
+share/scummvm/modern.ini
+share/scummvm/modern.zip
+@dirrm share/scummvm
@dirrm share/doc/scummvm
diff --git a/games/scummvm/distinfo b/games/scummvm/distinfo
index 647651b0273..2643a38e94f 100644
--- a/games/scummvm/distinfo
+++ b/games/scummvm/distinfo
@@ -1,11 +1,8 @@
-$NetBSD: distinfo,v 1.25 2007/01/13 14:20:25 wiz Exp $
+$NetBSD: distinfo,v 1.26 2007/07/01 10:12:02 adam Exp $
-SHA1 (scummvm-0.9.1.tar.bz2) = 6fcd00903f13fbafab65b432458e097f0e0d5d83
-RMD160 (scummvm-0.9.1.tar.bz2) = c77a7fa4251b6f6ee303dc35049671547dffed7a
-Size (scummvm-0.9.1.tar.bz2) = 4514100 bytes
-SHA1 (patch-aa) = a0a0bfc0ddddb2c54044e2e667e6a8d2e5529a1c
-SHA1 (patch-ab) = 8769804560a8410da0a6f9e95a987fa6be630a6d
-SHA1 (patch-ac) = 28764fefc214073610d94a236728f5c6b40d54ae
-SHA1 (patch-ad) = 56a6e4e931a30fe3f394fc84ef7e84e49a9370e4
-SHA1 (patch-ae) = 7251b705af68e601006a2eb2d12cdc1fe171c1cf
-SHA1 (patch-af) = e2efa1f075118bb6bbb789090ed1a29d6b917102
+SHA1 (scummvm-0.10.0.tar.bz2) = f0c4885300ea8d6a804eb4f3ece86f85bab44e6d
+RMD160 (scummvm-0.10.0.tar.bz2) = 6de5ecbf1006f47287fd665acaf6af1fdaf27b8b
+Size (scummvm-0.10.0.tar.bz2) = 4756977 bytes
+SHA1 (patch-aa) = 438f42038670feb28a784cb3ae8859d0c350503d
+SHA1 (patch-ac) = 4ea76bbfed8fe57173dc4f0c42e0fcba18cee2f3
+SHA1 (patch-ad) = a38f54b18fc1e330913980f7b9c50eb0daec378c
diff --git a/games/scummvm/patches/patch-aa b/games/scummvm/patches/patch-aa
index 2cc5d49e52d..5598f91dd3d 100644
--- a/games/scummvm/patches/patch-aa
+++ b/games/scummvm/patches/patch-aa
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.16 2006/07/03 12:25:05 adam Exp $
+$NetBSD: patch-aa,v 1.17 2007/07/01 10:12:02 adam Exp $
---- Makefile.orig 2006-06-21 23:19:07.000000000 +0200
+--- Makefile.orig 2007-06-16 23:45:09.000000000 +0200
+++ Makefile
@@ -9,7 +9,7 @@ srcdir ?= .
DEFINES := -DHAVE_CONFIG_H
@@ -11,13 +11,3 @@ $NetBSD: patch-aa,v 1.16 2006/07/03 12:25:05 adam Exp $
OBJS :=
MODULES :=
-@@ -18,8 +18,7 @@ MODULE_DIRS :=
- # Load the make rules generated by configure
- include config.mak
-
--CXXFLAGS:= -Wall $(CXXFLAGS)
--CXXFLAGS+= -O -Wuninitialized
-+CXXFLAGS+= -Wall -Wuninitialized
- CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
- # Even more warnings...
- CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
diff --git a/games/scummvm/patches/patch-ab b/games/scummvm/patches/patch-ab
deleted file mode 100644
index 1c81d2cbdb3..00000000000
--- a/games/scummvm/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.6 2006/07/03 12:25:05 adam Exp $
-
---- common.rules.orig 2006-06-21 23:19:07.000000000 +0200
-+++ common.rules
-@@ -27,6 +27,8 @@ MODULE_LIB-$(MODULE) := $(MODULE)/lib$(n
- # If not building as a plugin, add the object files to the main OBJS list
- OBJS += $(MODULE_LIB-$(MODULE))
-
-+CPPFLAGS+= -I$(BUILDLINK_DIR)/include
-+
- # Convenience library target
- $(MODULE_LIB-$(MODULE)): $(MODULE_OBJS-$(MODULE))
- -$(RM) $@
diff --git a/games/scummvm/patches/patch-ac b/games/scummvm/patches/patch-ac
index ae9e0e04032..ab42f492dcc 100644
--- a/games/scummvm/patches/patch-ac
+++ b/games/scummvm/patches/patch-ac
@@ -1,8 +1,8 @@
-$NetBSD: patch-ac,v 1.3 2006/07/04 17:21:11 tron Exp $
+$NetBSD: patch-ac,v 1.4 2007/07/01 10:12:03 adam Exp $
---- common/unzip.h.orig 2006-06-21 22:16:01.000000000 +0100
-+++ common/unzip.h 2006-07-04 17:44:56.000000000 +0100
-@@ -135,9 +135,9 @@
+--- common/unzip.h.orig 2007-06-16 23:27:34.000000000 +0200
++++ common/unzip.h
+@@ -138,9 +138,9 @@ typedef struct unz_file_info_s
tm_unz tmu_date;
} unz_file_info;
@@ -14,7 +14,7 @@ $NetBSD: patch-ac,v 1.3 2006/07/04 17:21:11 tron Exp $
/*
Compare two filename (fileName1,fileName2).
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
-@@ -148,7 +148,7 @@
+@@ -151,7 +151,7 @@ extern int ZEXPORT unzStringFileNameComp
*/
@@ -23,7 +23,7 @@ $NetBSD: patch-ac,v 1.3 2006/07/04 17:21:11 tron Exp $
/*
Open a Zip file. path contain the full pathname (by example,
on a Windows NT computer "c:\\zlib\\zlib111.zip" or on an Unix computer
-@@ -159,24 +159,24 @@
+@@ -162,24 +162,24 @@ extern unzFile ZEXPORT unzOpen OF((const
of this unzip package.
*/
@@ -53,7 +53,7 @@ $NetBSD: patch-ac,v 1.3 2006/07/04 17:21:11 tron Exp $
/*
Get the global comment string of the ZipFile, in the szComment buffer.
uSizeBuf is the size of the szComment buffer.
-@@ -187,22 +187,22 @@
+@@ -190,22 +190,22 @@ extern int ZEXPORT unzGetGlobalComment O
/***************************************************************************/
/* Unzip package allow you browse the directory of the zipfile */
@@ -80,7 +80,7 @@ $NetBSD: patch-ac,v 1.3 2006/07/04 17:21:11 tron Exp $
/*
Try locate the file szFileName in the zipfile.
For the iCaseSensitivity signification, see unzStringFileNameCompare
-@@ -213,14 +213,14 @@
+@@ -216,14 +216,14 @@ extern int ZEXPORT unzLocateFile OF((unz
*/
@@ -97,7 +97,7 @@ $NetBSD: patch-ac,v 1.3 2006/07/04 17:21:11 tron Exp $
/*
Get Info about the current file
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
-@@ -239,22 +239,22 @@
+@@ -242,22 +242,22 @@ extern int ZEXPORT unzGetCurrentFileInfo
from it, and close it (you can close it before reading all the file)
*/
@@ -124,7 +124,7 @@ $NetBSD: patch-ac,v 1.3 2006/07/04 17:21:11 tron Exp $
/*
Read bytes from the current file (opened by unzOpenCurrentFile)
buf contain buffer where data must be copied
-@@ -266,19 +266,19 @@
+@@ -269,19 +269,19 @@ extern int ZEXPORT unzReadCurrentFile OF
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
*/
diff --git a/games/scummvm/patches/patch-ad b/games/scummvm/patches/patch-ad
index f0a4d59279a..ebddd153511 100644
--- a/games/scummvm/patches/patch-ad
+++ b/games/scummvm/patches/patch-ad
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.1 2006/07/04 17:21:11 tron Exp $
+$NetBSD: patch-ad,v 1.2 2007/07/01 10:12:03 adam Exp $
---- common/unzip.cpp.orig 2006-06-21 22:16:01.000000000 +0100
-+++ common/unzip.cpp 2006-07-04 18:00:21.000000000 +0100
-@@ -452,7 +452,7 @@
+--- common/unzip.cpp.orig 2007-06-16 23:27:34.000000000 +0200
++++ common/unzip.cpp
+@@ -455,7 +455,7 @@ local void unzlocal_DosDateToTmuDate (uL
/*
Get Info about the current file in the zipfile, with internal only info
*/
@@ -11,7 +11,7 @@ $NetBSD: patch-ad,v 1.1 2006/07/04 17:21:11 tron Exp $
unz_file_info *pfile_info,
unz_file_info_internal
*pfile_info_internal,
-@@ -461,7 +461,7 @@
+@@ -464,7 +464,7 @@ local int unzlocal_GetCurrentFileInfoInt
void *extraField,
uLong extraFieldBufferSize,
char *szComment,
diff --git a/games/scummvm/patches/patch-ae b/games/scummvm/patches/patch-ae
deleted file mode 100644
index 246339c48a7..00000000000
--- a/games/scummvm/patches/patch-ae
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-ae,v 1.1 2007/01/13 14:20:25 wiz Exp $
-
---- configure.orig 2006-10-22 21:01:09.000000000 +0000
-+++ configure
-@@ -1099,15 +1099,15 @@ echocheck "FLAC >= 1.0.1"
- if test "$_flac" = auto ; then
- _flac=no
- cat > $TMPC << EOF
--#include <FLAC/seekable_stream_decoder.h>
--int main(void) { FLAC__seekable_stream_decoder_init( 0 ); return 0; }
-+#include <FLAC/format.h>
-+int main(void) { return FLAC__STREAM_SYNC_LEN >> 30; /* guaranteed to be 0 */ }
- EOF
-- cc_check $LDFLAGS $CXXFLAGS $FLAC_CFLAGS $FLAC_LIBS \
-- -lFLAC -lm && _flac=yes
-+ cc_check $LDFLAGS $CXXFLAGS $FLAC_CFLAGS $FLAC_LIBS $OGG_CFLAGS $OGG_LIBS \
-+ -lFLAC -logg -lm && _flac=yes
- fi
- if test "$_flac" = yes ; then
- _def_flac='#define USE_FLAC'
-- LIBS="$LIBS $FLAC_LIBS -lFLAC"
-+ LIBS="$LIBS $FLAC_LIBS $OGG_LIBS -lFLAC -logg"
- INCLUDES="$INCLUDES $FLAC_CFLAGS"
- else
- _def_flac='#undef USE_FLAC'
diff --git a/games/scummvm/patches/patch-af b/games/scummvm/patches/patch-af
deleted file mode 100644
index 3003c32298b..00000000000
--- a/games/scummvm/patches/patch-af
+++ /dev/null
@@ -1,451 +0,0 @@
-$NetBSD: patch-af,v 1.1 2007/01/13 14:20:25 wiz Exp $
-
---- sound/flac.cpp.orig 2006-10-22 21:12:03.000000000 +0000
-+++ sound/flac.cpp
-@@ -31,7 +31,18 @@
- #include "sound/audiocd.h"
-
- #define FLAC__NO_DLL // that MS-magic gave me headaches - just link the library you like
-+#include <FLAC/export.h>
-+// check if we have FLAC >= 1.1.3; LEGACY_FLAC code can be removed once FLAC-1.1.3 propagates everywhere
-+#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8
-+#define LEGACY_FLAC
-+#else
-+#undef LEGACY_FLAC
-+#endif
-+#ifdef LEGACY_FLAC
- #include <FLAC/seekable_stream_decoder.h>
-+#else
-+#include <FLAC/stream_decoder.h>
-+#endif
-
-
- using Common::File;
-@@ -67,7 +78,11 @@ public:
-
- const FLAC__StreamMetadata_StreamInfo& getStreamInfo() const {return _streaminfo;}
-
-+#ifdef LEGACY_FLAC
- inline FLAC__SeekableStreamDecoderState getState() const;
-+#else
-+ inline FLAC__StreamDecoderState getState() const;
-+#endif
- inline FLAC__StreamDecoderState getStreamDecoderState() const;
-
-
-@@ -81,18 +96,30 @@ public:
- inline void setLastSample(FLAC__uint64 absoluteSample);
-
- protected:
-+#ifdef LEGACY_FLAC
- inline ::FLAC__SeekableStreamDecoderReadStatus callbackRead(FLAC__byte buffer[], uint *bytes);
- inline ::FLAC__SeekableStreamDecoderSeekStatus callbackSeek(FLAC__uint64 absoluteByteOffset);
- inline ::FLAC__SeekableStreamDecoderTellStatus callbackTell(FLAC__uint64 *absoluteByteOffset);
- inline ::FLAC__SeekableStreamDecoderLengthStatus callbackLength(FLAC__uint64 *streamLength);
-+#else
-+ inline ::FLAC__StreamDecoderReadStatus callbackRead(FLAC__byte buffer[], size_t *bytes);
-+ inline ::FLAC__StreamDecoderSeekStatus callbackSeek(FLAC__uint64 absoluteByteOffset);
-+ inline ::FLAC__StreamDecoderTellStatus callbackTell(FLAC__uint64 *absoluteByteOffset);
-+ inline ::FLAC__StreamDecoderLengthStatus callbackLength(FLAC__uint64 *streamLength);
-+#endif
- inline bool callbackEOF();
- inline ::FLAC__StreamDecoderWriteStatus callbackWrite(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]);
- inline void callbackMetadata(const ::FLAC__StreamMetadata *metadata);
- inline void callbackError(::FLAC__StreamDecoderErrorStatus status);
-
-+#ifdef LEGACY_FLAC
- ::FLAC__SeekableStreamDecoder *_decoder;
-+#else
-+ ::FLAC__StreamDecoder *_decoder;
-+#endif
-
- private:
-+#ifdef LEGACY_FLAC
- static ::FLAC__SeekableStreamDecoderReadStatus callWrapRead(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__byte buffer[], uint *bytes, void *clientData);
- static ::FLAC__SeekableStreamDecoderSeekStatus callWrapSeek(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 absoluteByteOffset, void *clientData);
- static ::FLAC__SeekableStreamDecoderTellStatus callWrapTell(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *absoluteByteOffset, void *clientData);
-@@ -101,6 +128,16 @@ private:
- static ::FLAC__StreamDecoderWriteStatus callWrapWrite(const ::FLAC__SeekableStreamDecoder *decoder, const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *clientData);
- static void callWrapMetadata(const ::FLAC__SeekableStreamDecoder *decoder, const ::FLAC__StreamMetadata *metadata, void *clientData);
- static void callWrapError(const ::FLAC__SeekableStreamDecoder *decoder, ::FLAC__StreamDecoderErrorStatus status, void *clientData);
-+#else
-+ static ::FLAC__StreamDecoderReadStatus callWrapRead(const ::FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *clientData);
-+ static ::FLAC__StreamDecoderSeekStatus callWrapSeek(const ::FLAC__StreamDecoder *decoder, FLAC__uint64 absoluteByteOffset, void *clientData);
-+ static ::FLAC__StreamDecoderTellStatus callWrapTell(const ::FLAC__StreamDecoder *decoder, FLAC__uint64 *absoluteByteOffset, void *clientData);
-+ static ::FLAC__StreamDecoderLengthStatus callWrapLength(const ::FLAC__StreamDecoder *decoder, FLAC__uint64 *streamLength, void *clientData);
-+ static FLAC__bool callWrapEOF(const ::FLAC__StreamDecoder *decoder, void *clientData);
-+ static ::FLAC__StreamDecoderWriteStatus callWrapWrite(const ::FLAC__StreamDecoder *decoder, const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *clientData);
-+ static void callWrapMetadata(const ::FLAC__StreamDecoder *decoder, const ::FLAC__StreamMetadata *metadata, void *clientData);
-+ static void callWrapError(const ::FLAC__StreamDecoder *decoder, ::FLAC__StreamDecoderErrorStatus status, void *clientData);
-+#endif
- // Private and undefined so you can't use them:
- FlacInputStream(const FlacInputStream &);
- void operator=(const FlacInputStream &);
-@@ -157,7 +194,12 @@ private:
- };
-
- FlacInputStream::FlacInputStream(File *sourceFile, const uint32 fileStart)
-- : _decoder(::FLAC__seekable_stream_decoder_new()), _firstSample(0), _lastSample(0),
-+#ifdef LEGACY_FLAC
-+ : _decoder(::FLAC__seekable_stream_decoder_new()),
-+#else
-+ : _decoder(::FLAC__stream_decoder_new()),
-+#endif
-+ _firstSample(0), _lastSample(0),
- _outBuffer(NULL), _requestedSamples(0), _lastSampleWritten(true),
- _methodConvertBuffers(&FlacInputStream::convertBuffersGeneric)
- {
-@@ -178,7 +220,12 @@ FlacInputStream::FlacInputStream(File *s
- }
-
- FlacInputStream::FlacInputStream(File *sourceFile, const uint32 fileStart, const uint32 fileStop)
-- : _decoder(::FLAC__seekable_stream_decoder_new()), _firstSample(0), _lastSample(0),
-+#ifdef LEGACY_FLAC
-+ : _decoder(::FLAC__seekable_stream_decoder_new()),
-+#else
-+ : _decoder(::FLAC__stream_decoder_new()),
-+#endif
-+ _firstSample(0), _lastSample(0),
- _outBuffer(NULL), _requestedSamples(0), _lastSampleWritten(true),
- _methodConvertBuffers(&FlacInputStream::convertBuffersGeneric)
- {
-@@ -201,8 +248,13 @@ FlacInputStream::FlacInputStream(File *s
-
- FlacInputStream::~FlacInputStream() {
- if (_decoder != NULL) {
-+#ifdef LEGACY_FLAC
- (void) ::FLAC__seekable_stream_decoder_finish(_decoder);
- ::FLAC__seekable_stream_decoder_delete(_decoder);
-+#else
-+ (void) ::FLAC__stream_decoder_finish(_decoder);
-+ ::FLAC__stream_decoder_delete(_decoder);
-+#endif
- }
- if (_preBuffer.bufData != NULL)
- delete[] _preBuffer.bufData;
-@@ -210,14 +262,27 @@ FlacInputStream::~FlacInputStream() {
- _fileInfo.fileHandle->decRef();
- }
-
--inline FLAC__SeekableStreamDecoderState FlacInputStream::getState() const {
-+#ifdef LEGACY_FLAC
-+inline FLAC__SeekableStreamDecoderState FlacInputStream::getState() const
-+#else
-+inline FLAC__StreamDecoderState FlacInputStream::getState() const
-+#endif
-+{
- assert(isValid());
-+#ifdef LEGACY_FLAC
- return ::FLAC__seekable_stream_decoder_get_state(_decoder);
-+#else
-+ return ::FLAC__stream_decoder_get_state(_decoder);
-+#endif
- }
-
- inline FLAC__StreamDecoderState FlacInputStream::getStreamDecoderState() const {
- assert(isValid());
-+#ifdef LEGACY_FLAC
- return ::FLAC__seekable_stream_decoder_get_stream_decoder_state(_decoder);
-+#else
-+ return ::FLAC__stream_decoder_get_state(_decoder);
-+#endif
- }
-
- bool FlacInputStream::init() {
-@@ -229,6 +294,7 @@ bool FlacInputStream::init() {
- _lastSampleWritten = false;
- _methodConvertBuffers = &FlacInputStream::convertBuffersGeneric;
-
-+#ifdef LEGACY_FLAC
- ::FLAC__seekable_stream_decoder_set_read_callback(_decoder, &FlacInputStream::callWrapRead);
- ::FLAC__seekable_stream_decoder_set_seek_callback(_decoder, &FlacInputStream::callWrapSeek);
- ::FLAC__seekable_stream_decoder_set_tell_callback(_decoder, &FlacInputStream::callWrapTell);
-@@ -247,6 +313,27 @@ bool FlacInputStream::init() {
- }
- }
- }
-+#else
-+ if (::FLAC__stream_decoder_init_stream(
-+ _decoder,
-+ &FlacInputStream::callWrapRead,
-+ &FlacInputStream::callWrapSeek,
-+ &FlacInputStream::callWrapTell,
-+ &FlacInputStream::callWrapLength,
-+ &FlacInputStream::callWrapEOF,
-+ &FlacInputStream::callWrapWrite,
-+ &FlacInputStream::callWrapMetadata,
-+ &FlacInputStream::callWrapError,
-+ (void*)this
-+ ) == FLAC__STREAM_DECODER_INIT_STATUS_OK) {
-+ if (processUntilEndOfMetadata() && _streaminfo.channels > 0) {
-+ if (_firstSample == 0 || 0 != ::FLAC__stream_decoder_seek_absolute(_decoder, _firstSample)) {
-+ // FLAC__StreamDecoderState state = getStreamDecoderState();
-+ return true; // no error occured
-+ }
-+ }
-+ }
-+#endif
-
- warning("FlacInputStream: could not create an Audiostream from File %s", _fileInfo.fileHandle->name());
- return false;
-@@ -255,28 +342,48 @@ bool FlacInputStream::init() {
- bool FlacInputStream::finish() {
- assert(isValid());
- deleteBuffer();
-+#ifdef LEGACY_FLAC
- return 0 != ::FLAC__seekable_stream_decoder_finish(_decoder);
-+#else
-+ return 0 != ::FLAC__stream_decoder_finish(_decoder);
-+#endif
- }
-
- bool FlacInputStream::flush() {
- assert(isValid());
- flushBuffer();
-+#ifdef LEGACY_FLAC
- return 0 != ::FLAC__seekable_stream_decoder_flush(_decoder);
-+#else
-+ return 0 != ::FLAC__stream_decoder_flush(_decoder);
-+#endif
- }
-
- inline bool FlacInputStream::processSingleBlock() {
- assert(isValid());
-+#ifdef LEGACY_FLAC
- return 0 != ::FLAC__seekable_stream_decoder_process_single(_decoder);
-+#else
-+ return 0 != ::FLAC__stream_decoder_process_single(_decoder);
-+#endif
- }
-
- inline bool FlacInputStream::processUntilEndOfMetadata() {
- assert(isValid());
-+#ifdef LEGACY_FLAC
- return 0 != ::FLAC__seekable_stream_decoder_process_until_end_of_metadata(_decoder);
-+#else
-+ return 0 != ::FLAC__stream_decoder_process_until_end_of_metadata(_decoder);
-+#endif
- }
-
- bool FlacInputStream::seekAbsolute(FLAC__uint64 sample) {
- assert(isValid());
-+#ifdef LEGACY_FLAC
- const bool result = (0 != ::FLAC__seekable_stream_decoder_seek_absolute(_decoder, sample));
-+#else
-+ const bool result = (0 != ::FLAC__stream_decoder_seek_absolute(_decoder, sample));
-+#endif
- if (result) {
- flushBuffer();
- _lastSampleWritten = (_lastSample != 0 && sample >= _lastSample); // only set if we are SURE
-@@ -349,11 +456,20 @@ int FlacInputStream::readBuffer(int16 *b
- return decoderOk ? samples : -1;
- }
-
--inline ::FLAC__SeekableStreamDecoderReadStatus FlacInputStream::callbackRead(FLAC__byte buffer[], uint *bytes) {
-+#ifdef LEGACY_FLAC
-+inline ::FLAC__SeekableStreamDecoderReadStatus FlacInputStream::callbackRead(FLAC__byte buffer[], uint *bytes)
-+#else
-+inline ::FLAC__StreamDecoderReadStatus FlacInputStream::callbackRead(FLAC__byte buffer[], size_t *bytes)
-+#endif
-+{
- assert(_fileInfo.fileHandle != NULL);
-
- if (*bytes == 0)
-+#ifdef LEGACY_FLAC
- return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR; /* abort to avoid a deadlock */
-+#else
-+ return FLAC__STREAM_DECODER_READ_STATUS_ABORT; /* abort to avoid a deadlock */
-+#endif
-
- const uint32 length = MIN(_fileInfo.fileEndPos - _fileInfo.filePos, static_cast<uint32>(*bytes));
-
-@@ -361,11 +477,19 @@ inline ::FLAC__SeekableStreamDecoderRead
- const uint32 bytesRead = _fileInfo.fileHandle->read(buffer, length);
-
- if (bytesRead == 0 && _fileInfo.fileHandle->ioFailed())
-+#ifdef LEGACY_FLAC
- return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_ERROR;
-+#else
-+ return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
-+#endif
-
- _fileInfo.filePos += bytesRead;
- *bytes = static_cast<uint>(bytesRead);
-+#ifdef LEGACY_FLAC
- return FLAC__SEEKABLE_STREAM_DECODER_READ_STATUS_OK;
-+#else
-+ return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
-+#endif
- }
-
- inline void FlacInputStream::setLastSample(FLAC__uint64 absoluteSample) {
-@@ -637,30 +761,60 @@ inline ::FLAC__StreamDecoderWriteStatus
- return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
- }
-
--inline ::FLAC__SeekableStreamDecoderSeekStatus FlacInputStream::callbackSeek(FLAC__uint64 absoluteByteOffset) {
-+#ifdef LEGACY_FLAC
-+inline ::FLAC__SeekableStreamDecoderSeekStatus FlacInputStream::callbackSeek(FLAC__uint64 absoluteByteOffset)
-+#else
-+inline ::FLAC__StreamDecoderSeekStatus FlacInputStream::callbackSeek(FLAC__uint64 absoluteByteOffset)
-+#endif
-+{
- FLAC__uint64 newPos = absoluteByteOffset + _fileInfo.fileStartPos;
- const bool result = (newPos < _fileInfo.fileEndPos);
-
- if (result)
- _fileInfo.filePos = static_cast<uint32>(newPos);
-
-+#ifdef LEGACY_FLAC
- return result ? FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_OK : FLAC__SEEKABLE_STREAM_DECODER_SEEK_STATUS_ERROR;
--
-+#else
-+ return result ? FLAC__STREAM_DECODER_SEEK_STATUS_OK : FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
-+#endif
- }
-
--inline ::FLAC__SeekableStreamDecoderTellStatus FlacInputStream::callbackTell(FLAC__uint64 *absoluteByteOffset) {
-+#ifdef LEGACY_FLAC
-+inline ::FLAC__SeekableStreamDecoderTellStatus FlacInputStream::callbackTell(FLAC__uint64 *absoluteByteOffset)
-+#else
-+inline ::FLAC__StreamDecoderTellStatus FlacInputStream::callbackTell(FLAC__uint64 *absoluteByteOffset)
-+#endif
-+{
- /*if ()
- return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_ERROR;*/
- *absoluteByteOffset = static_cast<FLAC__uint64>(_fileInfo.filePos-_fileInfo.fileStartPos);
-+#ifdef LEGACY_FLAC
- return FLAC__SEEKABLE_STREAM_DECODER_TELL_STATUS_OK;
-+#else
-+ return FLAC__STREAM_DECODER_TELL_STATUS_OK;
-+#endif
- }
-
--inline ::FLAC__SeekableStreamDecoderLengthStatus FlacInputStream::callbackLength(FLAC__uint64 *streamLength) {
-+#ifdef LEGACY_FLAC
-+inline ::FLAC__SeekableStreamDecoderLengthStatus FlacInputStream::callbackLength(FLAC__uint64 *streamLength)
-+#else
-+inline ::FLAC__StreamDecoderLengthStatus FlacInputStream::callbackLength(FLAC__uint64 *streamLength)
-+#endif
-+{
- if (_fileInfo.fileStartPos > _fileInfo.fileEndPos)
-+#ifdef LEGACY_FLAC
- return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR;
-+#else
-+ return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;
-+#endif
-
- *streamLength = static_cast<FLAC__uint64>(_fileInfo.fileEndPos - _fileInfo.fileStartPos);
-+#ifdef LEGACY_FLAC
- return FLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK;
-+#else
-+ return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
-+#endif
- }
-
- inline bool FlacInputStream::callbackEOF() {
-@@ -682,56 +836,96 @@ inline void FlacInputStream::callbackErr
- }
-
- /* Static Callback Wrappers */
--::FLAC__SeekableStreamDecoderReadStatus FlacInputStream::callWrapRead(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__byte buffer[], uint *bytes, void *clientData) {
-+#ifdef LEGACY_FLAC
-+::FLAC__SeekableStreamDecoderReadStatus FlacInputStream::callWrapRead(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__byte buffer[], uint *bytes, void *clientData)
-+#else
-+::FLAC__StreamDecoderReadStatus FlacInputStream::callWrapRead(const ::FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *clientData)
-+#endif
-+{
- assert(0 != clientData);
- FlacInputStream *instance = reinterpret_cast<FlacInputStream *>(clientData);
- assert(0 != instance);
- return instance->callbackRead(buffer, bytes);
- }
-
--::FLAC__SeekableStreamDecoderSeekStatus FlacInputStream::callWrapSeek(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 absoluteByteOffset, void *clientData) {
-+#ifdef LEGACY_FLAC
-+::FLAC__SeekableStreamDecoderSeekStatus FlacInputStream::callWrapSeek(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 absoluteByteOffset, void *clientData)
-+#else
-+::FLAC__StreamDecoderSeekStatus FlacInputStream::callWrapSeek(const ::FLAC__StreamDecoder *decoder, FLAC__uint64 absoluteByteOffset, void *clientData)
-+#endif
-+{
- assert(0 != clientData);
- FlacInputStream *instance = reinterpret_cast<FlacInputStream *>(clientData);
- assert(0 != instance);
- return instance->callbackSeek(absoluteByteOffset);
- }
-
--::FLAC__SeekableStreamDecoderTellStatus FlacInputStream::callWrapTell(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *absoluteByteOffset, void *clientData) {
-+#ifdef LEGACY_FLAC
-+::FLAC__SeekableStreamDecoderTellStatus FlacInputStream::callWrapTell(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *absoluteByteOffset, void *clientData)
-+#else
-+::FLAC__StreamDecoderTellStatus FlacInputStream::callWrapTell(const ::FLAC__StreamDecoder *decoder, FLAC__uint64 *absoluteByteOffset, void *clientData)
-+#endif
-+{
- assert(0 != clientData);
- FlacInputStream *instance = reinterpret_cast<FlacInputStream *>(clientData);
- assert(0 != instance);
- return instance->callbackTell(absoluteByteOffset);
- }
-
--::FLAC__SeekableStreamDecoderLengthStatus FlacInputStream::callWrapLength(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *streamLength, void *clientData) {
-+#ifdef LEGACY_FLAC
-+::FLAC__SeekableStreamDecoderLengthStatus FlacInputStream::callWrapLength(const ::FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *streamLength, void *clientData)
-+#else
-+::FLAC__StreamDecoderLengthStatus FlacInputStream::callWrapLength(const ::FLAC__StreamDecoder *decoder, FLAC__uint64 *streamLength, void *clientData)
-+#endif
-+{
- assert(0 != clientData);
- FlacInputStream *instance = reinterpret_cast<FlacInputStream *>(clientData);
- assert(0 != instance);
- return instance->callbackLength(streamLength);
- }
-
--FLAC__bool FlacInputStream::callWrapEOF(const ::FLAC__SeekableStreamDecoder *decoder, void *clientData) {
-+#ifdef LEGACY_FLAC
-+FLAC__bool FlacInputStream::callWrapEOF(const ::FLAC__SeekableStreamDecoder *decoder, void *clientData)
-+#else
-+FLAC__bool FlacInputStream::callWrapEOF(const ::FLAC__StreamDecoder *decoder, void *clientData)
-+#endif
-+{
- assert(0 != clientData);
- FlacInputStream *instance = reinterpret_cast<FlacInputStream *>(clientData);
- assert(0 != instance);
- return instance->callbackEOF();
- }
-
--::FLAC__StreamDecoderWriteStatus FlacInputStream::callWrapWrite(const ::FLAC__SeekableStreamDecoder *decoder, const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *clientData) {
-+#ifdef LEGACY_FLAC
-+::FLAC__StreamDecoderWriteStatus FlacInputStream::callWrapWrite(const ::FLAC__SeekableStreamDecoder *decoder, const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *clientData)
-+#else
-+::FLAC__StreamDecoderWriteStatus FlacInputStream::callWrapWrite(const ::FLAC__StreamDecoder *decoder, const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[], void *clientData)
-+#endif
-+{
- assert(0 != clientData);
- FlacInputStream *instance = reinterpret_cast<FlacInputStream *>(clientData);
- assert(0 != instance);
- return instance->callbackWrite(frame, buffer);
- }
-
--void FlacInputStream::callWrapMetadata(const ::FLAC__SeekableStreamDecoder *decoder, const ::FLAC__StreamMetadata *metadata, void *clientData) {
-+#ifdef LEGACY_FLAC
-+void FlacInputStream::callWrapMetadata(const ::FLAC__SeekableStreamDecoder *decoder, const ::FLAC__StreamMetadata *metadata, void *clientData)
-+#else
-+void FlacInputStream::callWrapMetadata(const ::FLAC__StreamDecoder *decoder, const ::FLAC__StreamMetadata *metadata, void *clientData)
-+#endif
-+{
- assert(0 != clientData);
- FlacInputStream *instance = reinterpret_cast<FlacInputStream *>(clientData);
- assert(0 != instance);
- instance->callbackMetadata(metadata);
- }
-
--void FlacInputStream::callWrapError(const ::FLAC__SeekableStreamDecoder *decoder, ::FLAC__StreamDecoderErrorStatus status, void *clientData) {
-+#ifdef LEGACY_FLAC
-+void FlacInputStream::callWrapError(const ::FLAC__SeekableStreamDecoder *decoder, ::FLAC__StreamDecoderErrorStatus status, void *clientData)
-+#else
-+void FlacInputStream::callWrapError(const ::FLAC__StreamDecoder *decoder, ::FLAC__StreamDecoderErrorStatus status, void *clientData)
-+#endif
-+{
- assert(0 != clientData);
- FlacInputStream *instance = reinterpret_cast<FlacInputStream *>(clientData);
- assert(0 != instance);