Index: /mppenc/branches/zorg/src/config.h
===================================================================
--- /mppenc/branches/zorg/src/config.h	(revision 47)
+++ /mppenc/branches/zorg/src/config.h	(revision 47)
@@ -0,0 +1,53 @@
+/*
+ * Musepack audio compression
+ * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/* Determine Endianess of the machine */
+
+#define HAVE_LITTLE_ENDIAN  1234
+#define HAVE_BIG_ENDIAN     4321
+
+#define ENDIAN              HAVE_LITTLE_ENDIAN
+
+
+/* Test the fast float-to-int rounding trick works */
+
+#define HAVE_IEEE754_FLOAT
+#define HAVE_IEEE754_DOUBLE
+
+
+/* Test the presence of a 80-bit floating point type for writing AIFF headers */
+
+#define HAVE_IEEE854_LONGDOUBLE
+
+
+/* parsed values from file "version" */
+
+#ifndef MPPDEC_VERSION
+# define MPPDEC_VERSION   "1.15v"
+#endif
+
+#define MPPDEC_BUILD  "--Alpha--"
+
+#ifndef MPPENC_VERSION
+# define MPPENC_VERSION   "1.15w-1"
+#endif
+
+#define MPPENC_BUILD  "--Alpha--"
+
+/* end of config.h */
Index: /mppenc/branches/zorg/src/encode_sv7.c
===================================================================
--- /mppenc/branches/zorg/src/encode_sv7.c	(revision 46)
+++ /mppenc/branches/zorg/src/encode_sv7.c	(revision 47)
@@ -93,5 +93,6 @@
     WriteBits ( 1            ,  1 );    // true gapless: used?
     WriteBits ( SamplesRest  , 11 );    // true gapless: valid samples in last frame
-    WriteBits ( 0            , 20 );
+    WriteBits ( 1            , 1 );		// we now support fast seeking
+    WriteBits ( 0            , 19 );
 
     WriteBits ( (MPPENC_VERSION[0]&15)*100 + (MPPENC_VERSION[2]&15)*10 + (MPPENC_VERSION[3]&15),
@@ -109,5 +110,5 @@
 #define ENCODE_SCF1( new, old, rll )                         \
         d = new - old + 7;                                   \
-        if ( d <= 14u  &&  (rll < 32  || (int)new < 0 ) ) {  \
+        if ( d <= 14u  && rll < 32) {                        \
             WriteBits ( Table[d].Code, Table[d].Length );    \
         }                                                    \
@@ -242,5 +243,5 @@
             case 2:
                 ENCODE_SCF1 ( SCF_Index_L[n][0], SCF_Last_L[n]    , DSCF_RLL_L[n] );
-                ENCODE_SCFn ( SCF_Index_L[n][2], SCF_Index_L[n][1], DSCF_RLL_L[n] );
+                ENCODE_SCFn ( SCF_Index_L[n][2], SCF_Index_L[n][0], DSCF_RLL_L[n] );
                 SCF_Last_L[n] = SCF_Index_L[n][2];
                 break;
@@ -251,5 +252,6 @@
             }
         }
-        DSCF_RLL_L[n]++;        // Increased counters for SCF that haven't been initialized again
+        if (DSCF_RLL_L[n] <= 32)
+            DSCF_RLL_L[n]++;        // Increased counters for SCF that haven't been initialized again
 
         if ( Res_R[n] ) {
@@ -268,5 +270,5 @@
             case 2:
                 ENCODE_SCF1 ( SCF_Index_R[n][0], SCF_Last_R[n]    , DSCF_RLL_R[n] );
-                ENCODE_SCFn ( SCF_Index_R[n][2], SCF_Index_R[n][1], DSCF_RLL_R[n] );
+                ENCODE_SCFn ( SCF_Index_R[n][2], SCF_Index_R[n][0], DSCF_RLL_R[n] );
                 SCF_Last_R[n] = SCF_Index_R[n][2];
                 break;
@@ -277,5 +279,6 @@
             }
         }
-        DSCF_RLL_R[n]++;          // Increased counters for SCF that haven't been freshly initialized
+        if (DSCF_RLL_R[n] <= 32)
+            DSCF_RLL_R[n]++;          // Increased counters for SCF that haven't been freshly initialized
     }
 
Index: /mppenc/branches/zorg/src/mpp.h
===================================================================
--- /mppenc/branches/zorg/src/mpp.h	(revision 47)
+++ /mppenc/branches/zorg/src/mpp.h	(revision 47)
@@ -0,0 +1,194 @@
+/*
+ * Musepack audio compression
+ * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/******************************************************
+ *                                                    *
+ *            Source Compile configuration            *
+ *                                                    *
+ ******************************************************/
+
+
+#if !defined(__APPLE__)
+// use optimized assembler routines for Pentium III/K6-2/Athlon (only 32 bit OS, Intel x86 and no MAKE_xxBITS)
+// you need the NASM assembler on your system, the program becomes a little bit larger and decoding
+// on AMD K6-2 (x3), AMD K6-III (x3), AMD Duron (x1.7), AMD Athlon (x1.7), Pentium III (x2) and Pentium 4 (x1.8) becomes faster
+#define USE_ASM
+
+// Open Sound System support (only Unix with OSS support)
+// If your Operating System supports the Open Sound System, you can output to /dev/dsp* and
+// instead of writing a file the program plays the file via this sound device.
+// on some systems you also must link the libossaudio library, so maybe you also must edit the Makefile
+#define USE_OSS_AUDIO
+
+// Enlightenment Sound Daemon support (only Unix with ESD support)
+// If your Operating System supports the Enlightenment Sound Daemon you can output to /dev/esd and
+// instead of writing a file the program plays the file via this sound device.
+// you also must link the libesd library, so maybe you also must edit the Makefile
+//#define USE_ESD_AUDIO
+
+#endif
+
+// native Sun Onboard-Audio support (only SunOS)
+// If you have a Sun Workstation with Onboard-Audio, you can output to /dev/audio and
+// instead of writing a file the program plays the file via this sound device.
+// Some machines lacking librt.a so you are unable to link a static executable with realtime-support.
+// Although you can still perfectly use the dynamic executable.
+//#define USE_SUN_AUDIO
+
+// Sound support for SGI Irix
+// If you have a SGI Workstation running IRIX, you can output to /dev/audio and
+// instead of writing a file the program plays the file via this sound device.
+//#define USE_IRIX_AUDIO
+
+// Audio support for Windows (WAVE OUT) (only Windows)
+// If you have a Windows based system and if you also want to play files directly instead of only writing audio files,
+// then define the next item
+#define USE_WIN_AUDIO
+
+// Buffersize for Windows Audio in 4.5 KByte units
+// Only needed for Windows+USE_WIN_AUDIO
+// Good values are 8...32 for fast machines and 128...512 for slow machines
+// large values decrease average performance a little bit, increase memory
+// consumption (1 Block = 4.5 KByte), but increase buffering, so it takes a
+// longer time to get a dropout. Note that I don't have a 486/80...133, so
+// I don't know anything about their performance.
+// (Attention: 512 = additional 2.3 MByte of memory)
+#define MAX_WAVEBLOCKS    40
+
+// increase priority if destination is an audio device
+// this increases the priority of the decoder when playing the file directly to a sound card to reduce/prevent
+// dropouts during the playback due to CPU time shortage
+#define USE_NICE
+
+// use realtime scheduling if destination is an audio device
+// This sets the program to real time priority when playing the file directly to a sound card.
+// Now it should be really difficult to get dropouts (file IO and other realtime programs are the remaining weak points)
+#define USE_REALTIME
+
+// use ANSI-Escape sequences to structure output
+#define USE_ANSI_ESCAPE
+
+// Use termios for reading values from keyboard without echo and ENTER
+#define USE_TERMIOS
+
+// if none of the next three macros MAKE_xxBIT is defined,
+// normal non-dithered and non-shaped 16 bit PCM output is generated
+
+// create 16 bit Output
+// output is 16 bit wide, you can also dither and noise shape
+//#define MAKE_16BIT
+
+// create 24 bit Output
+// output is 24 bit wide instead of 16 bit wide, you can also dither and noise shape
+//#define MAKE_24BIT
+
+// create 32 bit Output
+// output is 32 bit wide instead of 16 bit wide, you can also dither and noise shape
+//#define MAKE_32BIT
+
+// Select subset of function used for file I/O:
+//   1: ANSI via file pointer (FILE*)
+//   2: POSIX via file handle (int or HANDLE)
+//   3: POSIX like lowest level function of Turbo/Borland C
+//   4: WinAMP 3: running inside WinAMP
+// Try to use '2', if this doesn't work, try '1'. '3' is for Borland compilers.
+#ifndef FILEIO
+# if   defined MPP_ENCODER
+#  define FILEIO      1             // mppenc still uses buffered ANSI-I/O
+# elif defined MPP_DECODER
+#  define FILEIO      2
+# else
+#   error Neigher MPP_DECODER nor MPP_ENCODER is defined. Abort.
+# endif
+#endif
+
+// the POSIX function read() can return less bytes than requested not only at the end of the file.
+// if this happens, the following macro must be defined:
+#define HAVE_INCOMPLETE_READ
+
+// use a shorter Huffman_t  representation, may be faster
+// use for performance tuning
+#define USE_HUFF_PACK
+
+// use shorter representation for SCF_Index[][] and Res[], may be faster
+// use for performance tuning
+#define USE_ARRAY_PACK
+
+// use the System 5 timer for profiling
+// otherwise a special piece of code for Turbo-C is used or the Timestamp Counter on Intel IA32/gcc systems.
+// Both is highly non-portable. This solution is more portable (you only need a SYS 5 compatible system,
+// but also much much more inaccurate.
+//#define USE_SYSV_TIMER
+
+// do a memory shift every n subband samples, otherwise only increment pointer (6, 12, 18 and 36 are good values)
+// use for performance tuning
+#define VIRT_SHIFT    18
+
+// selects InputBuff size, size is 4 * 2^IBUFLOG2 bytes (11...14 are good values)
+// use for performance tuning
+// can also be used to eliminate disk performance issue while tuning the program
+// (set to a value, so the test cases are fully read before decoding
+#define IBUFLOG2      14
+
+// Dump contents of MPEGplus files (only for development), 0x00 no dump
+// Bit 0: maxband, Bit 1: msbits, Bit 2: allocation/resolution, Bit 3: SCF
+// Bit 4: Subsamples, Bit 5: Datenrate, Bit 6: Bitusage der Sektionen
+//#define DUMPSELECT    0xFF
+
+// 16 bit and 32 bit accesses must be aligned, otherwise a bus error occures.
+// try this if you get bus errors
+//#define MUST_ALIGNED
+
+// Experimental: use http/ftp streaming
+#define USE_HTTP
+
+// _use setargv module
+#define USE_ARGV
+
+
+// Use IPv4 and IPv6
+//#define USE_IPv4_6
+// Use only IPv6
+//#define USE_IPv6
+
+// compile StreamVersion 8 decoding (always disable, no usabiltity)
+// do not edit
+//#define USE_SV8
+
+// disables assert()
+// assert() is for development only and decreases speed and increases the size of the program
+#ifndef NDEBUG
+# define NDEBUG
+#endif
+
+// Some other tracing (only for development)
+// do not edit
+//#define DEBUG
+
+// Some tracings of popen()
+// do not edit
+//#define DEBUG2
+
+// activate simple profiler
+//#define PROFILE
+
+// make debug output in tags.c stfu
+#define STFU
+
+/* end of mpp.h */
Index: /mppenc/branches/zorg/src/mppdec.h
===================================================================
--- /mppenc/branches/zorg/src/mppdec.h	(revision 47)
+++ /mppenc/branches/zorg/src/mppdec.h	(revision 47)
@@ -0,0 +1,1172 @@
+/*
+ * Musepack audio compression
+ * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+//// Macros typical for Compilers:
+//
+//  __TURBOC__          Turbo-C, Borland-C
+//  __BORLANDC__        Borland-C
+//  __ZTC__             Zortech-C
+//  _MSC_VER            Microsoft-C
+//  __EMX__             Eberhard Mattes EMX (GNU based)
+//  __GNUC__            GNU C based compiler (also Cygwin)
+//  __CYGWIN__          Cygnus Windows C-Compiler (GNU based)
+//  __APPLE_CC__        Apple GCC (GNU based)
+
+
+//// Macros typical for Operating Systems
+//
+//  __linux__           Linux
+//  __bsdi__            BSDi
+//  __FreeBSD__         FreeBSD
+//  __NetBSD__          NetBSD
+//  __OpenBSD__         OpenBSD
+//  __unix__            Unix ????????
+//  _WIN16              16 bit-Windows
+//  _WIN32              32 bit-Windows (WIN32 is wrong, not defined by not MSC) (also __GNUC__ + _WIN32 is possible)
+//  _HPUX_SOURCE        HP-UX
+//  __BEOS__            BeOS
+//  __APPLE__           Apple Mac OS X (only when using Apple GCC)
+//  ???????             MS-DOS and relatives
+
+
+//// Macros typical for special conformances
+//                      System 5 Release 4 (SVr4)
+//                      System 5 ID     (SVID)
+//                      POSIX 1.0
+//                      POSIX 1.0b
+//                      X/OPEN
+//                      BSD 4.3
+//                      BSD 4.4
+//                      ANSI
+
+
+// Macros to manipulate Sockets + Files in one, in (+0x4000)
+// output times TIME/TIME_T/DTIME
+
+#ifndef MPPDEC_MPPDEC_H
+#define MPPDEC_MPPDEC_H
+
+//// optimization/feature defines //////////////////////////////////
+#ifndef NOT_INCLUDE_CONFIG_H
+# include "config.h"
+#endif
+#include "./mpp.h"
+
+
+//// portable system includes //////////////////////////////////////
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <stdarg.h>
+#include <string.h>
+#include <limits.h>
+#include <assert.h>
+#include <math.h>
+
+
+//// system dependent system includes //////////////////////////////
+// low level I/O, where are prototypes and constants?
+#if   defined _WIN32  ||  defined __TURBOC__  ||  defined __ZTC__  ||  defined _MSC_VER
+# include <io.h>
+# include <fcntl.h>
+# include <time.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+#elif defined __unix__  ||  defined __linux__  ||  defined __APPLE__
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/time.h>
+# include <sys/ioctl.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+#else
+// .... add Includes for new Operating System here (with prefix: #elif defined)
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/ioctl.h>
+# include <sys/stat.h>
+#endif
+
+
+#if   defined __linux__
+#  include <fpu_control.h>
+#elif defined __FreeBSD__
+# include <machine/floatingpoint.h>
+#elif defined _MSC_VER
+# include <float.h>
+#endif
+
+
+#if defined _WIN32
+# undef USE_OSS_AUDIO
+# undef USE_ESD_AUDIO
+# undef USE_SUN_AUDIO
+#else
+# undef USE_WIN_AUDIO
+#endif
+
+#if defined __APPLE__
+# undef USE_OSS_AUDIO
+# undef USE_SUN_AUDIO
+# undef USE_WIN_AUDIO
+# undef USE_NICE
+# undef USE_REALTIME
+# undef USE_ASM
+# undef USE_ESD_AUDIO
+# define NO_DEV_AUDIO
+# undef ENDIAN
+# define ENDIAN HAVE_BIG_ENDIAN
+#endif
+
+#if defined __TURBOC__
+# undef USE_OSS_AUDIO
+# undef USE_ESD_AUDIO
+# undef USE_SUN_AUDIO
+# undef USE_NICE
+# undef USE_REALTIME
+#endif
+
+#if defined USE_DIET  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
+# undef USE_ESD_AUDIO
+#endif
+
+#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
+# undef USE_ASM
+#endif
+
+#if INT_MAX < 2147483647L
+# undef USE_ASM
+#endif
+
+// sound card
+#if defined USE_OSS_AUDIO
+# include <sys/ioctl.h>
+# include <sys/time.h>
+# if   defined __linux__        // the standard is that this file is stored somewhere on the hard disk
+#  include <linux/soundcard.h>
+# elif defined __bsdi__
+#  include <sys/soundcard.h>
+# elif defined __FreeBSD__
+#  include <machine/soundcard.h>
+# elif defined __NetBSD__  ||  defined __OpenBSD__
+#  include <soundcard.h>
+# elif defined __APPLE__  &&  defined __MACH__
+#  include <pleasepatchheretherightpathofsoundcard.hforMacOSX/soundcard.h>
+# else
+#  include <pleasepatchheretherightpathof/soundcard.h>
+# endif
+#endif /* USE_OSS_AUDIO */
+
+#if defined USE_ESD_AUDIO
+# include <esd.h>
+#endif
+
+#if defined USE_SUN_AUDIO
+# include <sys/audioio.h>
+#endif
+
+#ifdef MPP_ENCODER
+# undef USE_HTTP
+#endif
+
+#ifdef USE_HTTP
+# ifdef _WIN32
+#  include <winsock2.h>
+# else
+#  include <sys/socket.h>
+# endif
+#endif
+
+#if   defined USE_WIN_AUDIO
+# include <windows.h>
+# define WINAUDIO_FD            ((FILE_T)-128)
+#elif defined USE_IRIX_AUDIO
+# define IRIXAUDIO_FD           ((FILE_T)-127)
+#endif
+#define  NULL_FD                ((FILE_T)-126)
+
+#if defined USE_NICE  &&  !defined _WIN32
+# include <sys/resource.h>
+#endif
+
+// scheduler stuff
+#if defined USE_REALTIME  &&  !defined _WIN32
+# include <sched.h>
+#endif
+
+#ifndef O_BINARY
+# ifdef _O_BINARY
+#  define O_BINARY              _O_BINARY
+# else
+#  define O_BINARY              0
+# endif
+#endif
+
+#if defined _WIN32  ||  defined __TURBOC__
+# define strncasecmp(__s1,__s2,__n) _strnicmp ((__s1), (__s2), (__n))
+# define strcasecmp(__s1,__s2)      _stricmp  ((__s1), (__s2))
+# define MKDIR(__dir,__attr)        _mkdir ((__dir))
+#else
+# define MKDIR(__dir,__attr)        mkdir ((__dir), (__attr))
+#endif
+
+#if defined _WIN32
+# include <direct.h>
+# define snprintf                   _snprintf
+# define getcwd(__buff,__len)       _getcwd ((__buff), (__len))
+# define sleep(__sec)               Sleep ((__sec) * 1000)
+#endif
+
+#if defined _WIN32
+# define TIME_T                     long
+# define TIME(__x)                  time ( &(__x) )
+# define DTIME(__x,__y)             ( (double)(__y) - (__x) )
+#else
+# define TIME_T                     struct timeval
+# define TIME(__x)                  gettimeofday ( &(__x), NULL )
+# define DTIME(__x,__y)             ( ((double)(__y).tv_sec - (__x).tv_sec) + 1.e-6 * ((double)(__y).tv_usec - (__x).tv_usec) )
+#endif
+
+#if   defined __GNUC__
+# define inline                 __inline__
+# define restrict
+#elif defined _WIN32
+# define inline                 __inline
+# define restrict
+#else
+# define inline
+# define restrict
+#endif
+
+
+//// Binary/Low-Level-IO ///////////////////////////////////////////
+//
+// All file I/O is basicly handled via an ANSI file pointer (type: FILE*) in
+// FILEIO-Mode 1 and via a POSIX file descriptor (type: int) in
+// FILEIO-Mode 2 and 3.
+//
+// Some operations are only available via the POSIX interface (fcntl, setmode,
+// ...) so we need a function to get the file descriptor from a file pointer.
+// In FILEIO-Mode 2 and 3 this is a dummy function because we are always working
+// with these file descriptors.
+//
+
+#if  FILEIO == 1
+# if   defined __BORLANDC__  ||  defined _WIN32
+#  define FILENO(__fp)          _fileno ((__fp))
+# elif defined __CYGWIN__  ||  defined __TURBOC__  ||  defined __unix__  ||  defined __EMX__  ||  defined _MSC_VER
+#  define FILENO(__fp)          fileno  ((__fp))
+# else
+#  define FILENO(__fp)          fileno  ((__fp))
+# endif
+#else
+#  define FILENO(__fd)          (__fd)
+#endif
+
+
+//
+// If we have access to a file via file name, we can open the file with an
+// additional "b" or a O_BINARY within the (f)open function to get a
+// transparent untranslated data stream which is necessary for audio bitstream
+// data and also for PCM data. If we are working with
+// stdin/stdout/FILENO_STDIN/FILENO_STDOUT we can't open the file with these
+// attributes, because the files are already open. So we need a non
+// standardized sequence to switch to this mode (not necessary for Unix).
+// Mostly the sequence is the same for incoming and outgoing streams, but only
+// mostly so we need one for IN and one for OUT.
+// Macros are called with the file pointer and you get back the untransalted file
+// pointer which can be equal or different from the original.
+//
+
+#if   defined __EMX__
+# define SETBINARY_IN(__fp)     (_fsetmode ( (__fp), "b" ), (__fp))
+# define SETBINARY_OUT(__fp)    (_fsetmode ( (__fp), "b" ), (__fp))
+#elif defined __TURBOC__ || defined __BORLANDC__
+# define SETBINARY_IN(__fp)     (setmode   ( FILENO ((__fp)),  O_BINARY ), (__fp))
+# define SETBINARY_OUT(__fp)    (setmode   ( FILENO ((__fp)),  O_BINARY ), (__fp))
+#elif defined __CYGWIN__
+# define SETBINARY_IN(__fp)     (setmode   ( FILENO ((__fp)), _O_BINARY ), (__fp))
+# define SETBINARY_OUT(__fp)    (setmode   ( FILENO ((__fp)), _O_BINARY ), (__fp))
+#elif defined _WIN32
+# define SETBINARY_IN(__fp)     (_setmode  ( FILENO ((__fp)), _O_BINARY ), (__fp))
+# define SETBINARY_OUT(__fp)    (_setmode  ( FILENO ((__fp)), _O_BINARY ), (__fp))
+#elif defined _MSC_VER
+# define SETBINARY_IN(__fp)     (setmode   ( FILENO ((__fp)),  O_BINARY ), (__fp))
+# define SETBINARY_OUT(__fp)    (setmode   ( FILENO ((__fp)),  O_BINARY ), (__fp))
+#elif defined __unix__
+# define SETBINARY_IN(__fp)     (__fp)
+# define SETBINARY_OUT(__fp)    (__fp)
+#elif 0
+# define SETBINARY_IN(__fp)     (freopen   ( NULL, "rb", (__fp) ), (__fp))
+# define SETBINARY_OUT(__fp)    (freopen   ( NULL, "wb", (__fp) ), (__fp))
+#else
+# define SETBINARY_IN(__fp)     (__fp)
+# define SETBINARY_OUT(__fp)    (__fp)
+#endif
+
+// file I/O using ANSI buffered file I/O via file pointer FILE* (fopen, fread, fwrite, fclose)
+#if  FILEIO == 1
+# define OFF_T                  signed long
+# define FILE_T                 FILE*
+# define OPEN(name)             fopen  (name, "rb" )
+# define OPENRW(name)           fopen  (name, "r+b")
+# define CREATE(name)           fopen  (name, "wb" )
+# define INVALID_FILEDESC       NULL
+# define CLOSE(fp)              fclose (fp)                  // CLOSE   returns -1 on error, otherwise 0
+# define READ(fp,ptr,len)       fread  (ptr, 1, len, fp)     // READ    returns -1 or 0 on error/EOF, otherwise > 0
+# define READ1(fp,ptr)          fread  (ptr, 1, 1, fp)       // READ    returns -1 or 0 on error/EOF, otherwise > 0
+# define WRITE(fp,ptr,len)      fwrite (ptr, 1, len, fp)     // WRITE   returns -1 or 0 on error/EOF, otherwise > 0
+# define SEEK(fp,offs,lbl)      fseek  (fp, offs, lbl)       // SEEK    returns -1 on error, otherwise >= 0
+# define FILEPOS(fp)            ftell  (fp)                  // FILEPOS returns -1 on error, otherwise >= 0
+# define STDIN                  stdin
+# define STDOUT                 stdout
+# define STDERR                 stderr
+# define FDOPEN(fd,mode)        fdopen (fd, mode)
+# define UNBUFFER(fp)           setvbuf(fp, NULL, _IONBF, 0 )
+# define FLUSH(fp)              fflush (fp)
+#endif /* FILEIO==1 */
+
+// file I/O using POSIX unbuffered file I/O via file descriptors (open, read, write, close)
+#if  FILEIO == 2
+# ifdef WIN32
+#  define OFF_T                 _off_t
+# else
+#  define OFF_T                 off_t
+# endif
+# define FILE_T                 int
+# define OPEN(name)             open  (name, O_RDONLY|O_BINARY)
+# define OPENRW(name)           open  (name, O_RDWR  |O_BINARY)
+# define CREATE(name)           open  (name, O_WRONLY|O_BINARY|O_TRUNC|O_CREAT, 0644)
+# define INVALID_FILEDESC       (-1)
+# define CLOSE(fd)              close (fd)                   // CLOSE   returns -1 on error, otherwise 0
+# if defined HAVE_INCOMPLETE_READ
+#  define READ(fd,ptr,len)      complete_read (fd, ptr, len) // READ    returns -1 or 0 on error/EOF, otherwise > 0
+# else
+#  define READ(fd,ptr,len)      (size_t)read   (fd, ptr, len)// READ    returns -1 or 0 on error/EOF, otherwise > 0
+# endif
+# define READ1(fd,ptr)          (size_t)read   (fd, ptr, 1)  // READ    returns -1 or 0 on error/EOF, otherwise > 0
+# define WRITE(fd,ptr,len)      (size_t)write  (fd, ptr, len)// WRITE   returns -1 or 0 on error/EOF, otherwise > 0
+# define SEEK(fd,offs,lbl)      lseek  (fd, offs, lbl)       // SEEK    returns -1 on error, otherwise >= 0
+# define FILEPOS(fd)            lseek  (fd, 0L, SEEK_CUR)    // FILEPOS returns -1 on error, otherwise >= 0
+# define STDIN                  0
+# define STDOUT                 1
+# define STDERR                 2
+# define FDOPEN(fd,mode)        (fd)
+# define UNBUFFER(fd)           (void)(fd)
+# define FLUSH(fd)              (void)(fd)
+#endif /* FILEIO==2 */
+
+// file I/O using Turbo-C lowest level unbuffered file I/O via file descriptors (_open, _read, _write, _close)
+#if  FILEIO == 3
+# define OFF_T                  signed long
+# define FILE_T                 int
+# define OPEN(name)             _open (name, O_RDONLY)
+# define OPENRW(name)           _open (name, O_RDWR  )
+# define CREATE(name)           _creat(name, 0)
+# define INVALID_FILEDESC       (-1)
+# define CLOSE(fd)              _close (fd)                  // CLOSE   returns -1 on error, otherwise 0
+# define READ(fd,ptr,len)       (size_t)_read  (fd, ptr, len)// READ    returns -1 or 0 on error/EOF, otherwise > 0
+# define READ1(fd,ptr)          (size_t)_read  (fd, ptr, 1)  // READ    returns -1 or 0 on error/EOF, otherwise > 0
+# define WRITE(fd,ptr,len)      (size_t)_write (fd, ptr, len)// WRITE   returns -1 or 0 on error/EOF, otherwise > 0
+# define SEEK(fd,offs,lbl)      lseek  (fd, offs, lbl)       // SEEK    returns -1 on error, otherwise >= 0
+# define FILEPOS(fd)            lseek  (fd, 0L, SEEK_CUR)    // FILEPOS returns -1 on error, otherwise >= 0
+# define STDIN                  0
+# define STDOUT                 1
+# define STDERR                 2
+# undef  SETBINARY_IN
+# undef  SETBINARY_OUT
+# define SETBINARY_IN(fd)       (fd)
+# define SETBINARY_OUT(fd)      (fd)
+# define FDOPEN(fd,mode)        (fd)
+# define UNBUFFER(fd)           (void)(fd)
+# define FLUSH(fd)              (void)(fd)
+#endif /* FILEIO==3 */
+
+#if FILEIO != 2  &&  defined USE_HTTP
+# error HTTP can only be used by FILEIO==2
+#endif
+
+#if defined _WIN32  ||  defined __BEOS__
+# define WRITE_SOCKET(sock,ptr,len)     send (sock, ptr, len, 0)
+# define READ_SOCKET(sock,ptr,len)      recv (sock, ptr, len, 0)
+#else
+# define WRITE_SOCKET(sock,ptr,len)     write (sock, ptr, len)
+# define READ_SOCKET(sock,ptr,len)      read  (sock, ptr, len)
+#endif
+
+#ifdef _WIN32
+# define POPEN_READ_BINARY_OPEN(cmd)    _popen ((cmd), "rb")
+# define POPEN_WRITE_BINARY_OPEN(cmd)   _popen ((cmd), "wb")
+# define PCLOSE(fp)                     _pclose(fp)
+#else
+# define POPEN_READ_BINARY_OPEN(cmd)    popen ((cmd), "r")
+# define POPEN_WRITE_BINARY_OPEN(cmd)   popen ((cmd), "w")
+# define PCLOSE(fp)                     pclose(fp)
+#endif
+
+#if defined _WIN32
+# define STRUCT_STAT            struct _stat
+# define STAT_CMD(f,s)          _stat (f, s)
+#else
+# define STRUCT_STAT            struct stat
+# define STAT_CMD(f,s)          stat (f, s)
+#endif /* WIN32 */
+
+#ifndef S_ISDIR
+# if   defined S_IFDIR
+#  define S_ISDIR(x)            ((x) &   S_IFDIR)
+# elif defined _S_IFDIR
+#  define S_ISDIR(x)            ((x) &  _S_IFDIR)
+# elif defined __S_IFDIR
+#  define S_ISDIR(x)            ((x) & __S_IFDIR)
+# else
+#  error Cannot find a way to test for a directory
+# endif
+#endif /* !S_ISDIR */
+
+#if defined __unix__  ||  defined __bsdi__  ||  defined __FreeBSD__  ||  defined __OpenBSD__  ||  defined __NetBSD__  ||  defined __TURBOC__  ||  defined _WIN32  ||  defined __APPLE__
+# define ISATTY(fd)             isatty (fd)
+#else
+# define ISATTY(fd)             0
+#endif
+
+// Path separator
+#if defined __unix__  ||  defined __bsdi__  ||  defined __FreeBSD__  ||  defined __OpenBSD__  ||  defined __NetBSD__  ||  defined __APPLE__
+# define PATH_SEP               '/'
+# define DRIVE_SEP              '\0'
+# define EXE_EXT                ""
+# define DEV_NULL               "/dev/null"
+# define ENVPATH_SEP            ':'
+#elif defined _WIN32  ||  defined __TURBOC__  ||  defined __ZTC__  ||  defined _MSC_VER
+# define PATH_SEP               '\\'
+# define DRIVE_SEP              ':'
+# define EXE_EXT                ".exe"
+# define DEV_NULL               "\\nul"
+# define ENVPATH_SEP            ';'
+#else
+# define PATH_SEP               '/'         // Amiga: C:/
+# define DRIVE_SEP              ':'
+# define EXE_EXT                ""
+# define DEV_NULL               "nul"
+# define ENVPATH_SEP            ';'
+#endif
+
+// maximum length of file names
+#ifndef PATHLEN_MAX
+# if   defined FILENAME_MAX
+#  define PATHLEN_MAX           FILENAME_MAX
+# elif INT_MAX < 2147483647L
+#  define PATHLEN_MAX            128
+# else
+#  define PATHLEN_MAX           1024
+# endif
+#endif /* !PATHLEN_MAX */
+
+#ifdef _WIN32
+# define TitleBar(text)   SetConsoleTitle (text)
+#else
+# define TitleBar(text)   (void) (text)
+#endif
+
+
+//// constants /////////////////////////////////////////////////////
+#ifdef USE_SV8
+# define MAX_SV          "SV8"
+#else
+# define MAX_SV          "SV7"
+#endif
+
+#ifdef USE_ASM
+# define BUILD           "3DNOW!/SSE"
+#else
+# define BUILD           ""
+#endif
+
+
+#define COPYRIGHT        "(C) 1999-2003 Buschmann/Klemm/Piecha/Wolf"
+
+#define DECODER_DELAY    (512 - 32 + 1)
+#define BLK_SIZE         (36 * 32)
+
+
+//// logging defines, for development only /////////////////////////
+#if defined _WIN32  ||  defined __TURBOC__
+# define LOGPATH         ".\\"
+# define MUSICPATH       "D:\\AUDIO\\"
+#else
+# define LOGPATH         "./"
+# define MUSICPATH       "/Archive/Audio/"
+#endif
+#define _(x)             (void)(fprintf(stderr,"<%d>\n",(x)),fflush(stderr))
+
+#ifdef DEBUG
+# define REP(x)          (void)(x)
+#else
+# define REP(x)
+#endif
+
+
+//// numerical constants ///////////////////////////////////////////
+#define C00              (Float) 0.500000000000000000000000L    // Cxx = 0.5 / cos (xx*M_PI/64)
+#define C01              (Float) 0.500602998235196301334178L
+#define C02              (Float) 0.502419286188155705518560L
+#define C03              (Float) 0.505470959897543659956626L
+#define C04              (Float) 0.509795579104159168925062L
+#define C05              (Float) 0.515447309922624546962323L
+#define C06              (Float) 0.522498614939688880640101L
+#define C07              (Float) 0.531042591089784174473998L
+#define C08              (Float) 0.541196100146196984405269L
+#define C09              (Float) 0.553103896034444527838540L
+#define C10              (Float) 0.566944034816357703685831L
+#define C11              (Float) 0.582934968206133873665654L
+#define C12              (Float) 0.601344886935045280535340L
+#define C13              (Float) 0.622504123035664816182728L
+#define C14              (Float) 0.646821783359990129535794L
+#define C15              (Float) 0.674808341455005746033820L
+#define C16              (Float) 0.707106781186547524436104L
+#define C17              (Float) 0.744536271002298449773679L
+#define C18              (Float) 0.788154623451250224773056L
+#define C19              (Float) 0.839349645415527038721463L
+#define C20              (Float) 0.899976223136415704611808L
+#define C21              (Float) 0.972568237861960693780520L
+#define C22              (Float) 1.060677685990347471323668L
+#define C23              (Float) 1.169439933432884955134476L
+#define C24              (Float) 1.306562964876376527851784L
+#define C25              (Float) 1.484164616314166277319733L
+#define C26              (Float) 1.722447098238333927796261L
+#define C27              (Float) 2.057781009953411550808880L
+#define C28              (Float) 2.562915447741506178719328L
+#define C29              (Float) 3.407608418468718785698107L
+#define C30              (Float) 5.101148618689163857960189L
+#define C31              (Float)10.190008123548056810994678L
+
+#define SS05             (Float) 0.840896415253714543018917L      // 0.5^0.25
+
+
+#ifndef M_PI
+# define M_PI            3.1415926535897932384626433832795029     // 4*atan(1)
+# define M_PIl           3.1415926535897932384626433832795029L
+# define M_LN2           0.6931471805599453094172321214581766     // ln(2)
+# define M_LN2l          0.6931471805599453094172321214581766L
+# define M_LN10          2.3025850929940456840179914546843642     // ln 10 */
+# define M_LN10l         2.3025850929940456840179914546843642L
+#endif
+
+
+//// 'Cdecl' forces the use of standard C/C++ calling convention ///////
+#if   defined _WIN32
+# define Cdecl           __cdecl
+#elif defined __ZTC__
+# define Cdecl           _cdecl
+#elif defined __TURBOC__
+# define Cdecl           cdecl
+#else
+# define Cdecl
+#endif
+
+//// expect handling of GCC ////////////////////////////////////////
+#ifdef __GNUC__
+# if __GNUC__ < 3
+#  define __builtin_expect(cond,exp)  (cond)
+#  ifndef expect
+#    define expect(cond,exp)          __builtin_expect(cond,exp)
+#  endif
+# else
+#  ifndef expect
+#   define expect(cond,exp)           __builtin_expect(cond,exp)
+#  endif
+# endif
+#else
+# define __builtin_expect(cond,exp)   (cond)
+# ifndef expect
+#  define expect(cond,exp)            __builtin_expect(cond,exp)
+# endif
+#endif
+
+#define if0(x)                        if (expect(x,0))
+#define if1(x)                        if (expect(x,1))
+#define while0(x)                     while (expect(x,0))
+#define while1(x)                     while (expect(x,1))
+
+#ifndef __GNUC__
+# define __attribute__(x)
+#else
+# define __attribute__(x)
+#endif
+
+//// Remaining macros //////////////////////////////////////////////
+// selects input buffer size and some constants needed for input buffer handling
+#ifndef IBUFLOG2                 // must be at least 10 (bitrate always <626 kbps) or better 11 ( <1253 kbps)
+# if INT_MAX < 2147483647L
+#  define IBUFLOG2       11      // 8 KByte buffer, possible 11...13 (32 KByte limit)
+# else
+#  define IBUFLOG2       21      // 8 MByte buffer, possible 11...29 ( 2 GByte limit)
+# endif
+#endif
+#define IBUFSIZE         ((size_t)(1LU<<(IBUFLOG2)))
+#define IBUFSIZE2        ((size_t)((IBUFSIZE)/2))
+#define IBUFMASK         ((size_t)((IBUFSIZE)-1))
+
+// save memory space for 16 bit compiler (data + stack < 64 KByte)
+#if INT_MAX < 2147483647L
+# if VIRT_SHIFT     >  6
+#  undef  VIRT_SHIFT
+#  define VIRT_SHIFT   6
+# endif
+# if      IBUFLOG2  > 11
+#  undef  IBUFLOG2
+#  define IBUFLOG2    11
+# endif
+# define USE_HUFF_PACK
+# define USE_ARRAY_PACK
+#endif
+
+// generate a macro which contains information about compile time settings
+#define STR(x)   _STR(x)
+#define _STR(x)  #x
+#ifdef NDEBUG
+# define T1  ""
+#else
+# define T1  "DEBUG "
+#endif
+#if  defined USE_OSS_AUDIO  ||  defined USE_ESD_AUDIO  ||  defined USE_SUN_AUDIO  ||  defined USE_WIN_AUDIO
+# define T2  "SND "
+#else
+# define T2  ""
+#endif
+#ifdef USE_NICE
+# define T3  "NICE "
+#else
+# define T3  ""
+#endif
+#if defined USE_REALTIME
+# define T4  "RT "
+#else
+# define T4  ""
+#endif
+#ifdef HAVE_IEEE754_FLOAT
+# define T5  "IEEE "
+#else
+# define T5  ""
+#endif
+#define T6  "IO=" STR(FILEIO) " "
+#ifdef USE_HUFF_PACK
+# define T7  "H-PCK "
+#else
+# define T7  ""
+#endif
+#ifdef USE_ARRAY_PACK
+# define T8  "A-PCK "
+#else
+# define T8  ""
+#endif
+#define T9  "SHFT=" STR(VIRT_SHIFT) " "
+#define T10 "IBUF=" STR(IBUFLOG2) " "
+
+#define COMPILER_FLAGS  T1 T2 T3 T4 T5 T6 T7 T8 T9 T10
+
+// align a pointer by maybe incrementing it
+#define ALIGN(ptr,alignment) \
+                    (void*)((((ptrdiff_t)(ptr)) & (-(ptrdiff_t)(alignment))) + (alignment))   // aligns a pointer with alignment, the source array should be at least alignment-1 Bytes longer than the needed length
+
+
+//// Simple types //////////////////////////////////////////////////
+
+#if   CHAR_BIT == 8  &&  SCHAR_MAX == 127L
+typedef unsigned char       Uint8_t;    // guaranteed  8 bit unsigned integer type with range 0...255
+typedef signed   char       Int8_t;     // guaranteed  8 bit signed   integer type with range -128...127
+#else
+# error No  8 bit int type found. Tested: char
+#endif
+
+#if   SHRT_MAX == 32767L
+typedef unsigned short int  Uint16_t;   // guaranteed 16 bit unsigned integer type with range 0...65535
+typedef signed   short int  Int16_t;    // guaranteed 16 bit signed   integer type with range -32768...32767
+#else
+# error No 16 bit int type found. Tested: short
+#endif
+
+#if   INT_MAX == 2147483647L
+typedef unsigned int        Uint32_t;   // guaranteed 32 bit unsigned integer type with range 0...4294967295
+typedef signed   int        Int32_t;    // guaranteed 32 bit signed   integer type with range -2147483648...2147483647
+#elif LONG_MAX == 2147483647L
+typedef unsigned long int   Uint32_t;   // guaranteed 32 bit unsigned integer type with range 0...4294967295
+typedef signed   long int   Int32_t;    // guaranteed 32 bit signed   integer type with range -2147483648...2147483647
+#else
+# error No 32 bit int type found. Tested: int, long
+#endif
+
+#if    defined __C99__                 // C9x has a type which is exact 64 bit
+typedef int64_t             Int64_t;
+typedef uint64_t            Uint64_t;
+typedef intmax_t            IntMax_t;
+typedef uintmax_t           UintMax_t;
+# define IntMax_MIN        -9223372036854775808
+# define IntMax_MAX         9223372036854775807
+# define UintMax_MAX       18446744073709551615
+# define UintMAX_FP(x)      (long double)(x)
+#elif  defined __GNUC__                // GCC uses long long as 64 bit
+typedef signed   long long  Int64_t;
+typedef unsigned long long  Uint64_t;
+typedef signed   long long  IntMax_t;
+typedef unsigned long long  UintMax_t;
+# define IntMax_MIN        -9223372036854775808LL
+# define IntMax_MAX         9223372036854775807LL
+# define UintMax_MAX       18446744073709551615LLU
+# define UintMAX_FP(x)      (long double)(x)
+#elif defined _MSC_VER
+typedef signed   __int64    Int64_t;
+typedef unsigned __int64    Uint64_t;
+typedef signed   __int64    IntMax_t;
+typedef unsigned __int64    UintMax_t;
+# define IntMax_MIN        -9223372036854775808I64
+# define IntMax_MAX         9223372036854775807I64
+# define UintMax_MAX       18446744073709551615UI64
+# define UintMAX_FP(x)      (long double)(IntMax_t)(x)
+#elif defined LLONG_MAX               // long long (when existing) is normally 64 bit
+typedef signed   long long  Int64_t;
+typedef unsigned long long  Uint64_t;
+typedef signed   long long  IntMax_t;
+typedef unsigned long long  UintMax_t;
+# define IntMax_MIN        -9223372036854775808LL
+# define IntMax_MAX         9223372036854775807LL
+# define UintMax_MAX       18446744073709551615LLU
+# define UintMAX_FP(x)      (long double)(x)
+#elif  LONG_MAX > 0xFFFFFFFFLU         // long is longer than 33 bit, assume 64 bit
+typedef signed   long       Int64_t;
+typedef unsigned long       Uint64_t;
+typedef signed   long       IntMax_t;
+typedef unsigned long       UintMax_t;
+# define IntMax_MIN        -9223372036854775808L
+# define IntMax_MAX         9223372036854775807L
+# define UintMax_MAX       18446744073709551615LU
+# define UintMAX_FP(x)      (long double)(x)
+#elif  defined _WIN32                  // Microsoft and Intel call it __int64
+typedef signed   __int64    Int64_t;
+typedef unsigned __int64    Uint64_t;
+typedef signed   __int64    IntMax_t;
+typedef unsigned __int64    UintMax_t;
+# define IntMax_MIN        -9223372036854775808I64
+# define IntMax_MAX         9223372036854775807I64
+# define UintMax_MAX       18446744073709551615UI64
+# define UintMAX_FP(x)      (long double)(IntMax_t)(x)
+#else
+# define NO_INT64_T                    // no type mapped to 64 bit integer
+typedef signed   long       IntMax_t;
+typedef unsigned long       UintMax_t;
+# define IntMax_MIN        -2147483648L
+# define IntMax_MAX         2147483647L
+# define UintMax_MAX        4294967295LU
+# define UintMAX_FP(x)      (long double)(x)
+#endif
+
+
+#if defined _WIN32  &&  !defined __GNUC__  &&  !defined __C99__
+typedef signed long         ssize_t;
+#endif
+
+#ifdef USE_ARRAY_PACK
+typedef signed char         Bool_t;     // ==0: false, !=0: true
+#else
+typedef signed int          Bool_t;     // ==0: false, !=0: true
+#endif
+typedef Uint32_t            Ibuf_t;     // type for input buffer, currently this type must be 32 bit
+typedef signed   char       Schar;      // at least -127...+127
+typedef unsigned char       Uchar;      // at least 0...255
+typedef signed   short int  Short;      // at least -32767...+32767, memory economic type
+typedef unsigned short int  Ushort;     // at least 0...65535, memory economic type
+typedef signed   int        Int;        // at least -32767...+32767, fast type
+typedef unsigned int        Uint;       // at least 0...65535, fast type
+typedef signed   long int   Long;       // at least -2147483647...+2147483647, but more is better
+typedef unsigned long int   Ulong;      // at least 0...4294967295, but more is better
+//                          size_t;     // size of memory objects
+//                          ptrdiff_t;  // pointer differences, may be larger than size_t
+typedef float               Float32_t;  // guaranteed 32 bit floating point type
+typedef double              Float64_t;  // guaranteed 64 bit floating point type
+typedef float               Float;      // fastest floating point type, memory economic (used for all PCM calculations)
+#define SIZEOF_Float  4                 // size of the type 'Float' in sizeof units
+typedef double              Double;     // floating point with extended precision (more than 32 bit mantissa)
+typedef long double         Ldouble;    // most exact floating point format
+typedef Int16_t             Int2x16_t [2];
+typedef Int32_t             Int2x32_t [2];
+
+#if   defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
+# ifdef NO_INT64_T
+#   error No 64 bit int type found, needed for HQ 16...32 bit output
+# endif
+typedef Int2x32_t           Int2xSample_t;
+# if defined MAKE_32BIT
+#  define SAMPLE_SIZE        32
+#  define PROG_NAME          "mppdec32"
+#  define SAMPLE_SIZE_STRING " (32 bit HQ)"
+#  define Write_PCM(fd,p,b)  Write_PCM_HQ_2x32bit ( fd, p, b )
+#  define Synthese_Filter(Stream,offset,Vi,Yi,ch) \
+                            Synthese_Filter_32_C ( Stream, offset, Vi, Yi, ch )
+#  undef  USE_ESD_AUDIO
+# elif defined MAKE_24BIT
+#  define SAMPLE_SIZE        24
+#  define PROG_NAME          "mppdec24"
+#  define SAMPLE_SIZE_STRING " (24 bit HQ)"
+#  define Write_PCM(fd,p,b)  Write_PCM_HQ_2x24bit ( fd, p, b )
+#  define Synthese_Filter(Stream,offset,Vi,Yi,ch) \
+                            Synthese_Filter_32_C ( Stream, offset, Vi, Yi, ch )
+#  undef  USE_ESD_AUDIO
+# elif defined MAKE_16BIT
+#  define SAMPLE_SIZE        16
+#  define PROG_NAME          "mppdec16"
+#  define SAMPLE_SIZE_STRING " (16 bit HQ)"
+#  define Write_PCM(fd,p,b)  Write_PCM_HQ_2x16bit ( fd, p, b )
+#  define Synthese_Filter(Stream,offset,Vi,Yi,ch) \
+                            Synthese_Filter_32_C ( Stream, offset, Vi, Yi, ch )
+# endif
+#else
+typedef Int2x16_t           Int2xSample_t;
+# define SAMPLE_SIZE        16
+# define PROG_NAME          "mppdec"
+# define SAMPLE_SIZE_STRING ""
+# define Write_PCM(fd,p,b)  Write_PCM_2x16bit ( fd, p, b )
+# ifdef USE_ASM
+#  define Synthese_Filter(Stream,offset,Vi,Yi,ch) \
+                            Synthese_Filter_16 ( Stream, offset, Vi, Yi )
+# else
+#  define Synthese_Filter(Stream,offset,Vi,Yi,ch) \
+                            Synthese_Filter_16_C ( Stream, offset, Vi, Yi )
+# endif /* USE_ASM */
+#endif
+
+
+//// More complex types ////////////////////////////////////////////
+typedef struct {
+    Int    L [36];
+    Int    R [36];
+} Quant_t ;
+
+typedef struct {
+    Uint   L;
+    Uint   R;
+} UPair_t ;
+
+typedef struct {
+    Int    L;
+    Int    R;
+} Pair_t ;
+
+typedef struct {
+#ifdef USE_ARRAY_PACK
+    Schar  L;
+    Schar  R;
+#else
+    Int    L;
+    Int    R;
+#endif
+} CPair_t ;
+
+typedef Float     FloatArray [32];
+typedef UPair_t   UPairArray [32];
+typedef Pair_t    PairArray  [32];
+typedef CPair_t   CPairArray [32];
+typedef Float     SCFTriple   [3];
+typedef struct {
+#ifndef MPP_ENCODER
+    Uint32_t      Code;         // >=32 bit
+# ifdef USE_HUFF_PACK
+    Schar         Value;        // >= 7 bit
+    Uchar         Length;       // >= 4 bit
+# else
+    Int           Value;
+    Uint          Length;
+# endif
+#else
+# ifdef USE_HUFF_PACK
+    Uint8_t       Length;      // >=  4 bit
+    Uint8_t       ___;
+    Uint16_t      Code;        // >= 14 bit
+# else
+    Uint          Code;
+    Uint          Length;
+# endif
+#endif
+} Huffman_t ;
+
+typedef struct {
+    Uint          Code   : 16;  // >= 14 bit
+    Uint          Length :  8;  // >=  4 bit
+} HuffSrc_t ;
+
+typedef struct {
+    OFF_T         FileSize;
+    Int           GenreNo;
+    Int           TrackNo;
+    char          Genre   [128];
+    char          Year    [ 20];
+    char          Track   [  8];
+    char          Title   [256];
+    char          Artist  [256];
+    char          Album   [256];
+    char          Comment [512];
+} TagInfo_t ;
+
+typedef void  (*SyntheseFilter16_t) ( Int2x16_t* Stream, Int* const offset, Float* Vi, const FloatArray* Yi );
+typedef void  (*SyntheseFilter32_t) ( Int2x32_t* Stream, Int* const offset, Float* Vi, const FloatArray* Yi, int ch );
+typedef Int   (*HeaderWriter_t)     ( FILE_T outputFile, Ldouble  SampleFreq, Uint BitsPerSample, Uint Channels, Ulong SamplesPerChannel );
+
+#if defined MAKE_16BIT  ||  defined MAKE_24BIT  ||  defined MAKE_32BIT
+typedef struct {
+    const Float*  FilterCoeff;
+    Uint64_t      Mask;
+    Float64_t     Add;
+    Float         Dither;
+    Uint32_t      Overdrives;
+    Int64_t       MaxLevel;
+    Bool_t        NoShaping;
+    Float         ErrorHistory     [2] [16];       // max. 2 channels, 16th order Noise shaping
+    Float         DitherHistory    [2] [16];
+    Int32_t       LastRandomNumber [2];
+} dither_t;
+#else
+typedef struct {
+    Uint32_t      Overdrives;
+    Int32_t       MaxLevel;
+} dither_t;
+#endif
+
+
+//// Variables /////////////////////////////////////////////////////
+
+// decode.c
+extern Ibuf_t             InputBuff [IBUFSIZE]; // read buffer for the MP+ data stream
+extern size_t             InputCnt;             // current offset in this buffer
+
+// huffsv7.c
+extern Huffman_t          HuffHdr    [10];
+extern Huffman_t          HuffSCFI   [ 4];
+extern Huffman_t          HuffDSCF   [16];
+extern Huffman_t          HuffQ1 [2] [ 3*3*3];
+extern Huffman_t          HuffQ2 [2] [ 5*5];
+extern Huffman_t          HuffQ3 [2] [ 7];
+extern Huffman_t          HuffN3 [2] [ 7*7];
+extern Huffman_t          HuffQ4 [2] [ 9];
+extern Huffman_t          HuffQ5 [2] [15];
+extern Huffman_t          HuffQ6 [2] [31];
+extern Huffman_t          HuffQ7 [2] [63];
+extern Huffman_t          HuffN8 [2][127];
+extern const Huffman_t*   HuffQ  [2] [ 8];
+extern const Huffman_t*   HuffN  [2] [ 9];
+extern Uint8_t            LUT1_0  [1<< 6];
+extern Uint8_t            LUT1_1  [1<< 9];
+extern Uint8_t            LUT2_0  [1<< 7];
+extern Uint8_t            LUT2_1  [1<<10];
+extern Uint8_t            LUT3_0  [1<< 4];
+extern Uint8_t            LUT3_1  [1<< 5];
+extern Uint8_t            LUT4_0  [1<< 4];
+extern Uint8_t            LUT4_1  [1<< 5];
+extern Uint8_t            LUT5_0  [1<< 6];
+extern Uint8_t            LUT5_1  [1<< 8];
+extern Uint8_t            LUT6_0  [1<< 7];
+extern Uint8_t            LUT6_1  [1<< 7];
+extern Uint8_t            LUT7_0  [1<< 8];
+extern Uint8_t            LUT7_1  [1<< 8];
+extern Uint8_t            LUTDSCF [1<< 6];
+
+// huffsv46.c
+extern const Huffman_t*   Entropie      [18];
+extern const Huffman_t*   Region        [32];
+extern Huffman_t          SCFI_Bundle   [ 8];
+extern Huffman_t          DSCF_Entropie [13];
+
+// mppdec.c
+extern Float              Y_L      [36] [32];
+extern Float              Y_R      [36] [32];
+extern CPair_t            SCF_Index [3] [32];      // Scalefactor
+extern CPair_t            Res           [32];      // resolution steps of the subbands
+extern Quant_t            Q             [32];      // quantized samples
+extern CPair_t            SCFI          [32];      // transfer order of the SCF
+extern Bool_t             MS_Band       [32];      // subband-wise flag for M/S-signal guidance
+extern Bool_t             MS_used;                 // global flag for M/S-signal guidance
+extern Bool_t             IS_used;
+
+#define LITTLE                  0
+#define BIG                     1
+extern Bool_t                   output_endianess;
+#if   ENDIAN == HAVE_LITTLE_ENDIAN
+# define machine_endianess      LITTLE
+#elif ENDIAN == HAVE_BIG_ENDIAN
+# define machine_endianess      BIG
+#endif
+
+// requant.c
+extern Float              __SCF    [6 + 128];       // tabulated Scalefactors from -6 to +127
+#define SCF             ( __SCF + 6 )
+extern Int8_t             Q_bit         [32];       // number of bits to save the resolution (SV6)
+extern Int8_t             Q_res         [32] [16];  // Index -> resolution (SV6)
+extern Uint               Bitrate;
+extern Int                Min_Band;
+extern Int                Max_Band;
+extern Float              __Cc          [1 + 18];
+extern const Uint         __Dc          [1 + 18];
+#define Cc              ( __Cc + 1 )
+#define Dc              ( __Dc + 1 )
+
+// synthtab.c
+extern const Float        Cos64         [32];
+extern const Float        Di_opt        [32] [16];
+
+// stderr.c
+
+
+//// procedures/functions //////////////////////////////////////////
+// cpu_feat.c
+Bool_t Cdecl  Has_MMX                 ( void );
+Bool_t Cdecl  Has_SIMD                ( void );
+Bool_t Cdecl  Has_SIMD2               ( void );
+Bool_t Cdecl  Has_3DNow               ( void );
+
+// decode.c
+void       Bitstream_init             ( void );
+Ulong      BitsRead                   ( void );
+Uint32_t   Bitstream_read             ( Int  bits );
+Uint32_t   Bitstream_peek             ( Uint pos, Int bits );
+void       Bitstream_skip             ( Uint bits );
+Uint32_t   Bitstream_preview          ( Int  bits );  // same as above, but data doesn't get receipted yet
+void       Read_Bitstream_SV6         ( void );
+void       Read_Bitstream_SV7         ( void );
+void       Read_Bitstream_SV8         ( void );
+
+// http.c
+int        http_open                  ( const char* URL );
+
+// huffsv7.c
+void       Init_Huffman_Decoder_SV7   ( void );
+void       Init_Huffman_Encoder_SV7   ( void );
+
+// huffsv46.c
+void       Init_Huffman_Decoder_SV4_6 ( void );
+
+// id3tag.c
+Int        Read_ID3V1_Tags            ( FILE_T fp, TagInfo_t* tip );
+Int        Read_APE_Tags              ( FILE_T fp, TagInfo_t* tip );
+
+// requant.c
+void       Init_QuantTab              ( Int maximum_Band, Bool_t used_IS, Double amplification, Uint StreamVersion );
+
+// synth.c
+Uint32_t   random_int                 ( void );
+
+void Cdecl Calculate_New_V_i387       ( const Float* Sample, Float* V );
+void Cdecl Calculate_New_V_3DNow      ( const Float* Sample, Float* V );
+void Cdecl New_V_Helper2              ( Float* A, const Float* Sample );
+void Cdecl New_V_Helper3              ( Float* A, const Float* Sample );
+void Cdecl New_V_Helper4              ( Float* V );
+
+void Cdecl VectorMult_i387            ( void* buff, const Float* V );
+void Cdecl VectorMult_3DNow           ( void* buff, const Float* V );
+void Cdecl VectorMult_SIMD            ( void* buff, const Float* V );
+
+void       Synthese_Filter_16_C       ( Int2x16_t* Stream, Int* const offset, Float* Vi, const FloatArray* Yi );
+void       Synthese_Filter_32_C       ( Int2x32_t* Stream, Int* const offset, Float* Vi, const FloatArray* Yi, Uint channel );
+
+void Cdecl Reset_FPU                  ( void );
+void Cdecl Reset_FPU_3DNow            ( void );
+void Cdecl memcpy_dn_MMX              ( void* dst, const void* src, size_t words64byte  );
+void Cdecl memcpy_dn_SIMD             ( void* dst, const void* src, size_t words128byte );
+
+void       Init_Dither                ( Int bits, int shapingtype, Double dither );
+void       OverdriveReport            ( void );
+SyntheseFilter16_t
+           Get_Synthese_Filter        ( void );
+
+// tools.c
+size_t     Read_LittleEndians         ( FILE_T fp, Uint32_t* dst, size_t words32bit );
+void       Requantize_MidSideStereo   ( Int Stop_Band, const Bool_t* used_MS );
+void       Requantize_IntensityStereo ( Int Start_Band, Int Stop_Band );
+void       Resort_HuffTable           ( Huffman_t* const Table, const size_t elements, Int offset );
+void       Make_HuffTable             ( Huffman_t* dst, const HuffSrc_t* src, size_t len );
+void       Make_LookupTable           ( Uint8_t* LUT, size_t LUT_len, const Huffman_t* const Table, const size_t elements );
+size_t     complete_read              ( int fd, void* dest, size_t bytes );
+int        isdir                      ( const char* Name );
+void       Init_FPU                   ( void );
+
+// wave_out.c
+Int        Write_WAVE_Header          ( FILE_T outputFile, Ldouble SampleFreq, Uint BitsPerSample, Uint Channels, Ulong SamplesPerChannel );
+Int        Write_AIFF_Header          ( FILE_T outputFile, Ldouble SampleFreq, Uint BitsPerSample, Uint Channels, Ulong SamplesPerChannel );
+Int        Write_Raw_Header           ( FILE_T outputFile, Ldouble SampleFreq, Uint BitsPerSample, Uint Channels, Ulong SamplesPerChannel );
+Int        Set_DSP_OSS_Params         ( FILE_T outputFile, Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
+Int        Set_DSP_Sun_Params         ( FILE_T outputFile, Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
+Int        Set_ESD_Params             ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
+Int        Set_WIN_Params             ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
+Int        Set_IRIX_Params            ( FILE_T dummyFile , Ldouble SampleFreq, Uint BitsPerSample, Uint Channels );
+size_t     Write_PCM_2x16bit          ( FILE_T outputFile, Int2x16_t* data, size_t len );
+size_t     Write_PCM_HQ_2x16bit       ( FILE_T outputFile, Int2x32_t* data, size_t len );
+size_t     Write_PCM_HQ_2x24bit       ( FILE_T outputFile, Int2x32_t* data, size_t len );
+size_t     Write_PCM_HQ_2x32bit       ( FILE_T outputFile, Int2x32_t* data, size_t len );
+int        WIN_Play_Samples           ( const void* buff, size_t len );
+int        IRIX_Play_Samples          ( const void* buff, size_t len );
+int        WIN_Audio_close            ( void );
+int        IRIX_Audio_close           ( void );
+void       DisableSUID                ( void );
+void       EnableSUID                 ( void );
+
+// pipeopen.c
+FILE*      pipeopen                   ( const char* command, const char* filename );
+
+// stderr.c
+void       SetStderrSilent            ( Bool_t state );
+Bool_t     GetStderrSilent            ( void );
+int Cdecl  stderr_printf              ( const char* format, ... );
+
+// _setargv.c
+long       treewalk                   ( const char* start, const char** mask, int (*fn)(const char* filename, void* aux), void* aux );
+void       mysetargv                  ( int* argc, char*** argv, const char** extentions );
+
+#if ENDIAN == HAVE_BIG_ENDIAN
+
+# define ReadLE32(dst,psrc)       dst = *(Uint32_t*)(psrc)
+# define ReadBE32(dst,psrc)                           \
+       ((Uint8_t*)&(dst))[0] = ((Uint8_t*)(psrc))[3], \
+       ((Uint8_t*)&(dst))[1] = ((Uint8_t*)(psrc))[2], \
+       ((Uint8_t*)&(dst))[2] = ((Uint8_t*)(psrc))[1], \
+       ((Uint8_t*)&(dst))[3] = ((Uint8_t*)(psrc))[0]
+
+
+#elif defined __i386__           /* 486+ */
+
+#  define ReadBE32(dst,psrc)      __asm__ ( "bswap %0" : "=r" (dst) : "0" (*(Uint32_t*)(psrc)) )
+#  define ReadLE32(dst,psrc)       dst = *(Uint32_t*)(psrc)
+
+# else
+
+#  define ReadBE32(dst,psrc)                          \
+       ((Uint8_t*)&(dst))[0] = ((Uint8_t*)(psrc))[3], \
+       ((Uint8_t*)&(dst))[1] = ((Uint8_t*)(psrc))[2], \
+       ((Uint8_t*)&(dst))[2] = ((Uint8_t*)(psrc))[1], \
+       ((Uint8_t*)&(dst))[3] = ((Uint8_t*)(psrc))[0]
+#  define ReadLE32(dst,psrc)       dst = *(Uint32_t*)(psrc)
+
+# endif
+
+//// Profiler include //////////////////////////////////////////////
+#include "profile.h"
+
+#ifdef _MSC_VER
+#pragma warning ( disable : 4244 )
+#endif
+
+#endif /* MPPDEC_MPPDEC_H */
+
+/* end of mppdec.h */
Index: /mppenc/branches/zorg/src/profile.h
===================================================================
--- /mppenc/branches/zorg/src/profile.h	(revision 47)
+++ /mppenc/branches/zorg/src/profile.h	(revision 47)
@@ -0,0 +1,98 @@
+/*
+ * Musepack audio compression
+ * Copyright (C) 1999-2004 Buschmann/Klemm/Piecha/Wolf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef MPPDEC_PROFILE_H
+#define MPPDEC_PROFILE_H
+
+#ifdef PROFILE
+
+/* T I M E C O U N T - F U N C T I O N */
+# if   defined _WIN32
+typedef /*unsigned*/ __int64  uintmax_t;
+#pragma warning ( disable: 4035 )
+static __inline uintmax_t  rdtscll ( void ) { __asm { rdtsc }; }
+#pragma warning ( default: 4035 )
+#  define RDTSC()  timetemp = rdtscll ()
+#  define __FUNCTION__  "?"
+# elif defined __TURBOC__
+typedef signed long  uintmax_t;
+uintmax_t readtime ( void );
+#  define RDTSC()  timetemp = readtime ()
+#  define __FUNCTION__  "?"
+# else
+typedef unsigned long long  uintmax_t;
+#  include <asm/msr.h>
+#  define RDTSC()  rdtscll (timetemp)
+# endif /* _WIN32 */
+
+
+/* M A C R O S */
+# define _STR(x)    #x
+# define __STR(x)   _STR(x)
+
+# define ENTER(x)  do {                                                             \
+                     uintmax_t  timetemp;                                           \
+                     RDTSC();                                                       \
+                     timecounter[*functionstack_pointer]       += timetemp;         \
+                     timecounter[*++functionstack_pointer = x] -= timetemp;         \
+                     timename[x] = __FUNCTION__ "()|" __FILE__ "|" __STR(__LINE__); \
+                   } while (0)
+
+# define NEXT(x,n) do {                                                      \
+                     uintmax_t  timetemp;                                    \
+                     RDTSC();                                                \
+                     timecounter[*functionstack_pointer]     += timetemp;    \
+                     timecounter[*functionstack_pointer = x] -= timetemp;    \
+                     timename[x] = __FUNCTION__ "-" __STR(n) "|" __FILE__ "|" __STR(__LINE__); \
+                   } while (0)
+
+# define LEAVE(x)  do {                                                  \
+                     uintmax_t  timetemp;                                \
+                     RDTSC();                                            \
+                     timecounter[x]                        += timetemp;  \
+                     timecounter[*--functionstack_pointer] -= timetemp;  \
+                   } while (0)
+
+# define START()   set_signal ()
+# define REPORT()  report ()
+
+/* V A R I A B L E S */
+extern uintmax_t       timecounter    [256];
+extern const char*     timename       [256];
+extern unsigned char   functionstack [1024];
+extern unsigned char*  functionstack_pointer;
+
+/* F U N C T I O N S */
+void  set_signal ( void );
+void  report     ( void );
+
+#else
+
+/* M A C R O S */
+# define START()
+# define ENTER(x)
+# define NEXT(x,n)
+# define LEAVE(x)
+# define REPORT()
+
+#endif /* PROFILE */
+
+#endif /* MPPDEC_PROFILE_H */
+
+/* end of profile.h */
Index: /mppenc/branches/zorg/win32/mppenc.sln
===================================================================
--- /mppenc/branches/zorg/win32/mppenc.sln	(revision 47)
+++ /mppenc/branches/zorg/win32/mppenc.sln	(revision 47)
@@ -0,0 +1,20 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mppenc", "mppenc.vcproj", "{15082E34-9324-469F-8423-F995B4814A37}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{15082E34-9324-469F-8423-F995B4814A37}.Debug|Win32.ActiveCfg = Debug|Win32
+		{15082E34-9324-469F-8423-F995B4814A37}.Debug|Win32.Build.0 = Debug|Win32
+		{15082E34-9324-469F-8423-F995B4814A37}.Release|Win32.ActiveCfg = Release|Win32
+		{15082E34-9324-469F-8423-F995B4814A37}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /mppenc/branches/zorg/win32/mppenc.vcproj
===================================================================
--- /mppenc/branches/zorg/win32/mppenc.vcproj	(revision 47)
+++ /mppenc/branches/zorg/win32/mppenc.vcproj	(revision 47)
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8,00"
+	Name="mppenc"
+	ProjectGUID="{15082E34-9324-469F-8423-F995B4814A37}"
+	RootNamespace="mppenc"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;MPP_ENCODER"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="winmm.lib"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="0"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="2"
+				OmitFramePointers="true"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;MPP_ENCODER"
+				StringPooling="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="winmm.lib"
+				GenerateManifest="false"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				EmbedManifest="false"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				CommandLine="copy $(TargetPath) ..\bin"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\src\analy_filter.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\ans.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\bitstream.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\cvd.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\encode_sv7.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\fastmath.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\fft4g.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\fft_routines.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\huffsv7.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\keyboard.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\mppenc.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pipeopen.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\psy.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\psy_tab.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\quant.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\stderr.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\tags.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\tools.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\wave_in.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\winmsg.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\src\config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\fastmath.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\minimax.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\mpp.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\mppdec.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\mppenc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\predict.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\profile.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
