Index: /libmpc/branches/r2d/Makefile.am
===================================================================
--- /libmpc/branches/r2d/Makefile.am	(revision 136)
+++ /libmpc/branches/r2d/Makefile.am	(revision 137)
@@ -1,2 +1,2 @@
 AUTOMAKE_OPTIONS = foreign
-SUBDIRS = libmpcpsy libmpcenc src
+SUBDIRS = libwavformat libmpcpsy libmpcenc libmpcdec mppenc mpcdec
Index: /libmpc/branches/r2d/configure.in
===================================================================
--- /libmpc/branches/r2d/configure.in	(revision 136)
+++ /libmpc/branches/r2d/configure.in	(revision 137)
@@ -2,5 +2,5 @@
 
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mppenc, 0.1)
+AM_INIT_AUTOMAKE(libmpcs, 0.1)
 
 AC_LANG_C
@@ -8,3 +8,3 @@
 AM_PROG_LIBTOOL
 
-AC_OUTPUT(Makefile libmpcenc/Makefile libmpcpsy/Makefile src/Makefile)
+AC_OUTPUT(Makefile libmpcenc/Makefile libmpcpsy/Makefile mppenc/Makefile libwavformat/Makefile libmpcdec/Makefile mpcdec/Makefile)
Index: /libmpc/branches/r2d/include/mpc/datatypes.h
===================================================================
--- /libmpc/branches/r2d/include/mpc/datatypes.h	(revision 137)
+++ /libmpc/branches/r2d/include/mpc/datatypes.h	(revision 137)
@@ -0,0 +1,38 @@
+/*
+ * Musepack audio compression
+ *
+ * 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
+ */
+
+#pragma once
+
+// mppenc.h
+#define CENTER            448                   // offset for centering current data in Main-array
+#define BLOCK            1152                   // blocksize
+#define ANABUFFER    (BLOCK + CENTER)           // size of PCM-data array for analysis
+
+
+typedef struct {
+	float  L [36];
+	float  R [36];
+} SubbandFloatTyp;
+
+typedef struct {
+	float  L [ANABUFFER];
+	float  R [ANABUFFER];
+	float  M [ANABUFFER];
+	float  S [ANABUFFER];
+} PCMDataTyp;
+
Index: /libmpc/branches/r2d/include/mpc/minimax.h
===================================================================
--- /libmpc/branches/r2d/include/mpc/minimax.h	(revision 137)
+++ /libmpc/branches/r2d/include/mpc/minimax.h	(revision 137)
@@ -0,0 +1,57 @@
+/*
+ * 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
+ */
+
+#pragma once
+
+# define clip(x,min,max) ( (x) < (min) ? (min) : (x) > (max) ? (max) : (x) )
+
+#ifdef __cplusplus
+
+# define maxi(A,B)  ( (A) >? (B) )
+# define mini(A,B)  ( (A) <? (B) )
+# define maxd(A,B)  ( (A) >? (B) )
+# define mind(A,B)  ( (A) <? (B) )
+# define maxf(A,B)  ( (A) >? (B) )
+# define minf(A,B)  ( (A) <? (B) )
+
+#else
+
+# define maxi(A,B)  ( (A) > (B)  ?  (A)  :  (B) )
+# define mini(A,B)  ( (A) < (B)  ?  (A)  :  (B) )
+# define maxd(A,B)  ( (A) > (B)  ?  (A)  :  (B) )
+# define mind(A,B)  ( (A) < (B)  ?  (A)  :  (B) )
+# define maxf(A,B)  ( (A) > (B)  ?  (A)  :  (B) )
+# define minf(A,B)  ( (A) < (B)  ?  (A)  :  (B) )
+
+#endif
+
+#ifdef __GNUC__
+
+# define absi(A)    abs   (A)
+# define absf(A)    fabsf (A)
+# define absd(A)    fabs  (A)
+
+#else
+
+# define absi(A)    ( (A) >= 0    ?  (A)  : -(A) )
+# define absf(A)    ( (A) >= 0.f  ?  (A)  : -(A) )
+# define absd(A)    ( (A) >= 0.   ?  (A)  : -(A) )
+
+#endif
+
Index: /libmpc/branches/r2d/include/mpc/mpc_types.h
===================================================================
--- /libmpc/branches/r2d/include/mpc/mpc_types.h	(revision 137)
+++ /libmpc/branches/r2d/include/mpc/mpc_types.h	(revision 137)
@@ -0,0 +1,103 @@
+/*
+  Copyright (c) 2005, The Musepack Development Team
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are
+  met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the following
+  disclaimer in the documentation and/or other materials provided
+  with the distribution.
+
+  * Neither the name of the The Musepack Development Team nor the
+  names of its contributors may be used to endorse or promote
+  products derived from this software without specific prior
+  written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+#ifndef _MPC_TYPES_H_
+#define _MPC_TYPES_H_
+#ifdef WIN32
+#pragma once
+#endif
+
+#include <stdlib.h>
+#include <memory.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WIN32
+typedef __int8           mpc_int8_t;
+typedef unsigned __int8  mpc_uint8_t;
+typedef __int16          mpc_int16_t;
+typedef unsigned __int16 mpc_uint16_t;
+typedef __int32          mpc_int32_t;
+typedef unsigned __int32 mpc_uint32_t;
+typedef __int64          mpc_int64_t;
+typedef unsigned __int64 mpc_uint64_t;
+#define mpc_inline __inline
+#define MPC_LITTLE_ENDIAN
+#else
+#include <stdint.h>
+typedef int8_t   mpc_int8_t;
+typedef uint8_t  mpc_uint8_t;
+typedef int16_t  mpc_int16_t;
+typedef uint16_t mpc_uint16_t;
+typedef int32_t  mpc_int32_t;
+typedef uint32_t mpc_uint32_t;
+typedef int64_t  mpc_int64_t;
+typedef uint64_t  mpc_uint64_t;
+#define mpc_inline inline
+#endif
+
+typedef int mpc_int_t;
+typedef unsigned int mpc_uint_t;
+// FIXME : must be the same size as a pointer
+typedef unsigned int mpc_size_t;
+
+/// Libmpcdec error codes
+typedef enum mpc_status {
+    MPC_STATUS_OK        =  0,
+    MPC_STATUS_FILE      = -1,
+    MPC_STATUS_SV7BETA   = -2,
+    MPC_STATUS_CBR       = -3,
+    MPC_STATUS_IS        = -4,
+    MPC_STATUS_BLOCKSIZE = -5,
+    MPC_STATUS_INVALIDSV = -6
+} mpc_status;
+
+#ifdef MPC_FIXED_POINT
+typedef mpc_int32_t MPC_SAMPLE_FORMAT;
+#else
+typedef float       MPC_SAMPLE_FORMAT;
+#endif
+
+typedef mpc_uint8_t mpc_bool_t;
+
+enum {
+    MPC_FALSE = 0,
+    MPC_TRUE  = !MPC_FALSE
+};
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Index: /libmpc/branches/r2d/include/mpc/mpcmath.h
===================================================================
--- /libmpc/branches/r2d/include/mpc/mpcmath.h	(revision 137)
+++ /libmpc/branches/r2d/include/mpc/mpcmath.h	(revision 137)
@@ -0,0 +1,59 @@
+/*
+ * Musepack audio compression
+ *
+ * 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 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
+
+// fast but maybe more inaccurate, use if you need speed
+#if defined(__GNUC__) && !defined(__APPLE__)
+#  define SIN(x)      sinf ((float)(x))
+#  define COS(x)      cosf ((float)(x))
+#  define ATAN2(x,y)  atan2f ((float)(x), (float)(y))
+#  define SQRT(x)     sqrtf ((float)(x))
+#  define LOG(x)      logf ((float)(x))
+#  define LOG10(x)    log10f ((float)(x))
+#  define POW(x,y)    expf (logf(x) * (y))
+#  define POW10(x)    expf (M_LN10 * (x))
+#  define FLOOR(x)    floorf ((float)(x))
+#  define IFLOOR(x)   (int) floorf ((float)(x))
+#  define FABS(x)     fabsf ((float)(x))
+#else
+# define SIN(x)      (float) sin (x)
+# define COS(x)      (float) cos (x)
+# define ATAN2(x,y)  (float) atan2 (x, y)
+# define SQRT(x)     (float) sqrt (x)
+# define LOG(x)      (float) log (x)
+# define LOG10(x)    (float) log10 (x)
+# define POW(x,y)    (float) pow (x,y)
+# define POW10(x)    (float) pow (10., (x))
+# define FLOOR(x)    (float) floor (x)
+# define IFLOOR(x)   (int)   floor (x)
+# define FABS(x)     (float) fabs (x)
+#endif
+
+#define SQRTF(x)     SQRT (x)
+#define COSF(x)      COS (x)
+#define ATAN2F(x,y)  ATAN2 (x,y)
+#define IFLOORF(x)   IFLOOR (x)
Index: /libmpc/branches/r2d/include/mpcdec/reader.h
===================================================================
--- /libmpc/branches/r2d/include/mpcdec/reader.h	(revision 136)
+++ /libmpc/branches/r2d/include/mpcdec/reader.h	(revision 137)
@@ -39,5 +39,5 @@
 #endif
 
-#include "mpc_types.h"
+#include <mpc/mpc_types.h>
 
 #ifdef __cplusplus
Index: /libmpc/branches/r2d/include/mpcdec/streaminfo.h
===================================================================
--- /libmpc/branches/r2d/include/mpcdec/streaminfo.h	(revision 136)
+++ /libmpc/branches/r2d/include/mpcdec/streaminfo.h	(revision 137)
@@ -39,5 +39,5 @@
 #endif
 
-#include "mpc_types.h"
+#include <mpc/mpc_types.h>
 #include "reader.h"
 
Index: /libmpc/branches/r2d/libmpc.kdevelop
===================================================================
--- /libmpc/branches/r2d/libmpc.kdevelop	(revision 137)
+++ /libmpc/branches/r2d/libmpc.kdevelop	(revision 137)
@@ -0,0 +1,218 @@
+<?xml version = '1.0'?>
+<kdevelop>
+  <general>
+    <author>Nicolas Botti</author>
+    <email/>
+    <version>0.1</version>
+    <projectmanagement>KDevAutoProject</projectmanagement>
+    <primarylanguage>C</primarylanguage>
+    <keywords>
+      <keyword>C</keyword>
+      <keyword>Code</keyword>
+    </keywords>
+    <ignoreparts/>
+    <projectdirectory>.</projectdirectory>
+    <absoluteprojectpath>false</absoluteprojectpath>
+    <description/>
+  </general>
+  <kdevautoproject>
+    <general>
+      <activetarget>libmpcpsy/libmpcpsy.a</activetarget>
+      <useconfiguration>debug</useconfiguration>
+    </general>
+    <run>
+      <mainprogram>src/mppenc</mainprogram>
+      <terminal>true</terminal>
+      <directoryradio>executable</directoryradio>
+      <runarguments>
+        <mppenc/>
+      </runarguments>
+      <customdirectory>/</customdirectory>
+      <programargs/>
+      <autocompile>true</autocompile>
+      <envvars/>
+    </run>
+    <configurations>
+      <optimized>
+        <builddir>optimized</builddir>
+        <ccompiler>kdevgccoptions</ccompiler>
+        <cxxcompiler>kdevgppoptions</cxxcompiler>
+        <f77compiler>kdevg77options</f77compiler>
+        <cflags>-O3 -fomit-frame-pointer -pipe -Wall -ffast-math</cflags>
+        <envvars/>
+        <configargs/>
+        <topsourcedir/>
+        <cppflags>-DMPP_ENCODER=1 -DTRUE=1 -DFALSE=0</cppflags>
+        <ldflags/>
+        <ccompilerbinary/>
+        <cxxcompilerbinary/>
+        <f77compilerbinary/>
+        <cxxflags/>
+        <f77flags/>
+      </optimized>
+      <debug>
+        <configargs>--enable-debug=full</configargs>
+        <builddir>debug</builddir>
+        <ccompiler>kdevgccoptions</ccompiler>
+        <cxxcompiler>kdevgppoptions</cxxcompiler>
+        <f77compiler>kdevg77options</f77compiler>
+        <cflags>-O0 -Wall -g3</cflags>
+        <envvars/>
+        <topsourcedir/>
+        <cppflags/>
+        <ldflags/>
+        <ccompilerbinary/>
+        <cxxcompilerbinary/>
+        <f77compilerbinary/>
+        <cxxflags/>
+        <f77flags/>
+      </debug>
+    </configurations>
+    <make>
+      <envvars>
+        <envvar value="1" name="WANT_AUTOCONF_2_5" />
+        <envvar value="1" name="WANT_AUTOMAKE_1_6" />
+      </envvars>
+      <abortonerror>true</abortonerror>
+      <numberofjobs>1</numberofjobs>
+      <dontact>false</dontact>
+      <makebin/>
+      <prio>0</prio>
+    </make>
+  </kdevautoproject>
+  <kdevdoctreeview>
+    <ignoretocs>
+      <toc>ada</toc>
+      <toc>ada_bugs_gcc</toc>
+      <toc>bash</toc>
+      <toc>bash_bugs</toc>
+      <toc>clanlib</toc>
+      <toc>w3c-dom-level2-html</toc>
+      <toc>fortran_bugs_gcc</toc>
+      <toc>gnome1</toc>
+      <toc>gnustep</toc>
+      <toc>gtk</toc>
+      <toc>gtk_bugs</toc>
+      <toc>haskell</toc>
+      <toc>haskell_bugs_ghc</toc>
+      <toc>java_bugs_gcc</toc>
+      <toc>java_bugs_sun</toc>
+      <toc>kde2book</toc>
+      <toc>libstdc++</toc>
+      <toc>opengl</toc>
+      <toc>pascal_bugs_fp</toc>
+      <toc>php</toc>
+      <toc>php_bugs</toc>
+      <toc>perl</toc>
+      <toc>perl_bugs</toc>
+      <toc>python</toc>
+      <toc>python_bugs</toc>
+      <toc>qt-kdev3</toc>
+      <toc>ruby</toc>
+      <toc>ruby_bugs</toc>
+      <toc>sdl</toc>
+      <toc>stl</toc>
+      <toc>w3c-svg</toc>
+      <toc>sw</toc>
+      <toc>w3c-uaag10</toc>
+      <toc>wxwidgets_bugs</toc>
+    </ignoretocs>
+    <ignoreqt_xml>
+      <toc>Guide to the Qt Translation Tools</toc>
+      <toc>Qt Assistant Manual</toc>
+      <toc>Qt Designer Manual</toc>
+      <toc>Qt Reference Documentation</toc>
+      <toc>qmake User Guide</toc>
+    </ignoreqt_xml>
+    <ignoredoxygen>
+      <toc>KDE Libraries (Doxygen)</toc>
+    </ignoredoxygen>
+  </kdevdoctreeview>
+  <kdevfilecreate>
+    <useglobaltypes>
+      <type ext="c" />
+      <type ext="h" />
+    </useglobaltypes>
+  </kdevfilecreate>
+  <kdevfileview>
+    <groups>
+      <group pattern="*.h" name="Header files" />
+      <group pattern="*.c" name="Source files" />
+      <hidenonprojectfiles>false</hidenonprojectfiles>
+      <hidenonlocation>false</hidenonlocation>
+    </groups>
+    <tree>
+      <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+      <hidenonprojectfiles>false</hidenonprojectfiles>
+    </tree>
+  </kdevfileview>
+  <kdevdocumentation>
+    <projectdoc>
+      <docsystem>Doxygen Documentation Collection</docsystem>
+      <docurl>mppenc.tag</docurl>
+    </projectdoc>
+  </kdevdocumentation>
+  <substmap>
+    <APPNAME>mppenc</APPNAME>
+    <APPNAMELC>mppenc</APPNAMELC>
+    <APPNAMESC>Mppenc</APPNAMESC>
+    <APPNAMEUC>MPPENC</APPNAMEUC>
+    <AUTHOR>Nicolas Botti</AUTHOR>
+    <CFLAGS/>
+    <EMAIL/>
+    <LICENSE>GPL</LICENSE>
+    <LICENSEFILE>COPYING</LICENSEFILE>
+    <OPT_INCS>-I/usr/include</OPT_INCS>
+    <OPT_LIBS>-lm</OPT_LIBS>
+    <VERSION>0.1</VERSION>
+    <YEAR>2006</YEAR>
+    <dest>/home/nico/src/musepack/svn/mppenc-zorg/mppenc</dest>
+  </substmap>
+  <kdevcppsupport>
+    <references/>
+    <codecompletion>
+      <includeGlobalFunctions>true</includeGlobalFunctions>
+      <includeTypes>true</includeTypes>
+      <includeEnums>true</includeEnums>
+      <includeTypedefs>false</includeTypedefs>
+      <automaticCodeCompletion>true</automaticCodeCompletion>
+      <automaticArgumentsHint>true</automaticArgumentsHint>
+      <automaticHeaderCompletion>true</automaticHeaderCompletion>
+      <codeCompletionDelay>250</codeCompletionDelay>
+      <argumentsHintDelay>400</argumentsHintDelay>
+      <headerCompletionDelay>250</headerCompletionDelay>
+    </codecompletion>
+    <creategettersetter>
+      <prefixGet/>
+      <prefixSet>set</prefixSet>
+      <prefixVariable>m_,_</prefixVariable>
+      <parameterName>theValue</parameterName>
+      <inlineGet>true</inlineGet>
+      <inlineSet>true</inlineSet>
+    </creategettersetter>
+  </kdevcppsupport>
+  <cppsupportpart>
+    <filetemplates>
+      <interfacesuffix>.h</interfacesuffix>
+      <implementationsuffix>.cpp</implementationsuffix>
+    </filetemplates>
+  </cppsupportpart>
+  <kdevdebugger>
+    <general>
+      <programargs>--overwrite ~/mdv-startup.wav</programargs>
+      <gdbpath/>
+      <dbgshell>libtool</dbgshell>
+      <configGdbScript/>
+      <runShellScript/>
+      <runGdbScript/>
+      <breakonloadinglibs>true</breakonloadinglibs>
+      <separatetty>false</separatetty>
+      <floatingtoolbar>false</floatingtoolbar>
+    </general>
+    <display>
+      <staticmembers>false</staticmembers>
+      <demanglenames>true</demanglenames>
+      <outputradix>10</outputradix>
+    </display>
+  </kdevdebugger>
+</kdevelop>
Index: /libmpc/branches/r2d/libmpcdec/Makefile.am
===================================================================
--- /libmpc/branches/r2d/libmpcdec/Makefile.am	(revision 137)
+++ /libmpc/branches/r2d/libmpcdec/Makefile.am	(revision 137)
@@ -0,0 +1,11 @@
+INCLUDES = -I$(top_srcdir)/include
+METASOURCES = AUTO
+lib_LTLIBRARIES = libmpcdec.la
+libmpcdec_la_SOURCES = huffman.c mpc_decoder.c mpc_reader.c \
+	requant.c	streaminfo.c synth_filter.c mpc_bits_reader.c mpc_demux.c
+
+libmpcdec_la_LDFLAGS = -no-undefined -version-info 4:2:1
+
+
+AM_CFLAGS = -DMPC_LITTLE_ENDIAN
+
Index: /libmpc/branches/r2d/libmpcdec/huffman.h
===================================================================
--- /libmpc/branches/r2d/libmpcdec/huffman.h	(revision 136)
+++ /libmpc/branches/r2d/libmpcdec/huffman.h	(revision 137)
@@ -41,5 +41,5 @@
 #endif
 
-#include <mpcdec//mpc_types.h>
+#include <mpc/mpc_types.h>
 
 #ifdef __cplusplus
Index: /libmpc/branches/r2d/libmpcdec/math.h
===================================================================
--- /libmpc/branches/r2d/libmpcdec/math.h	(revision 136)
+++ /libmpc/branches/r2d/libmpcdec/math.h	(revision 137)
@@ -33,5 +33,5 @@
 */
 /// \file math.h
-/// Libmpcdec internal math routines.  
+/// Libmpcdec internal math routines.
 #ifndef _MPCDEC_MATH_H_
 #define _MPCDEC_MATH_H_
@@ -40,5 +40,5 @@
 #endif
 
-#include <mpcdec/mpc_types.h>
+#include <mpc/mpc_types.h>
 
 #ifdef __cplusplus
Index: /libmpc/branches/r2d/libmpcdec/requant.h
===================================================================
--- /libmpc/branches/r2d/libmpcdec/requant.h	(revision 136)
+++ /libmpc/branches/r2d/libmpcdec/requant.h	(revision 137)
@@ -40,5 +40,5 @@
 #endif
 
-#include <mpcdec/mpc_types.h>
+#include <mpc/mpc_types.h>
 
 #ifdef __cplusplus
Index: /libmpc/branches/r2d/libmpcenc/Makefile.am
===================================================================
--- /libmpc/branches/r2d/libmpcenc/Makefile.am	(revision 136)
+++ /libmpc/branches/r2d/libmpcenc/Makefile.am	(revision 137)
@@ -1,3 +1,3 @@
-INCLUDES = -I$(top_srcdir)/common
+INCLUDES = -I$(top_srcdir)/include/
 METASOURCES = AUTO
 lib_LIBRARIES = libmpcenc.a
Index: /libmpc/branches/r2d/libmpcenc/analy_filter.c
===================================================================
--- /libmpc/branches/r2d/libmpcenc/analy_filter.c	(revision 136)
+++ /libmpc/branches/r2d/libmpcenc/analy_filter.c	(revision 137)
@@ -21,6 +21,6 @@
 #include <math.h>
 
-#include "mpcmath.h"
-#include "datatypes.h"
+#include <mpc/mpcmath.h>
+#include <mpc/datatypes.h>
 
 #define FASTER
Index: /libmpc/branches/r2d/libmpcenc/bitstream.c
===================================================================
--- /libmpc/branches/r2d/libmpcenc/bitstream.c	(revision 136)
+++ /libmpc/branches/r2d/libmpcenc/bitstream.c	(revision 137)
@@ -89,5 +89,5 @@
 
 	// write block header (key / length)
-	len = encodeSize(e->pos + 2 + (addCRC ? 4 : 0), blockSize, TRUE);
+	len = encodeSize(e->pos + 2 + (addCRC ? 4 : 0), blockSize, MPC_TRUE);
 	fwrite(key, sizeof(char), 2, fp);
 	fwrite(blockSize, sizeof(char), len, fp);
Index: /libmpc/branches/r2d/libmpcenc/encode_sv7.c
===================================================================
--- /libmpc/branches/r2d/libmpcenc/encode_sv7.c	(revision 136)
+++ /libmpc/branches/r2d/libmpcenc/encode_sv7.c	(revision 137)
@@ -88,5 +88,5 @@
 {
 	unsigned char samplesCount[10];
-	int samplesCountLen = encodeSize(SamplesCount, (char *)samplesCount, FALSE);
+	int samplesCountLen = encodeSize(SamplesCount, (char *)samplesCount, MPC_FALSE);
 	int i;
 
@@ -416,5 +416,5 @@
 	e->framesInBlock++;
 	if (e->framesInBlock == FRAMES_PER_BLOCK)
-		writeBlock(e, "AD", FALSE);
+		writeBlock(e, "AD", MPC_FALSE);
 }
 
Index: /libmpc/branches/r2d/libmpcenc/libmpcenc.h
===================================================================
--- /libmpc/branches/r2d/libmpcenc/libmpcenc.h	(revision 136)
+++ /libmpc/branches/r2d/libmpcenc/libmpcenc.h	(revision 137)
@@ -19,5 +19,5 @@
 #pragma once
 
-#include "config_types.h"
+#include <mpc/mpc_types.h>
 #include <stdio.h>
 
Index: /libmpc/branches/r2d/libmpcenc/quant.c
===================================================================
--- /libmpc/branches/r2d/libmpcenc/quant.c	(revision 136)
+++ /libmpc/branches/r2d/libmpcenc/quant.c	(revision 137)
@@ -21,5 +21,5 @@
 
 #include "libmpcenc.h"
-#include "minimax.h"
+#include <mpc/minimax.h>
 
 /* V A R I A B L E S */
Index: /libmpc/branches/r2d/libmpcpsy/Makefile.am
===================================================================
--- /libmpc/branches/r2d/libmpcpsy/Makefile.am	(revision 136)
+++ /libmpc/branches/r2d/libmpcpsy/Makefile.am	(revision 137)
@@ -1,3 +1,3 @@
-INCLUDES = -I$(top_srcdir)/common
+INCLUDES = -I$(top_srcdir)/include/
 METASOURCES = AUTO
 lib_LIBRARIES = libmpcpsy.a
Index: /libmpc/branches/r2d/libmpcpsy/fft4g.c
===================================================================
--- /libmpc/branches/r2d/libmpcpsy/fft4g.c	(revision 136)
+++ /libmpc/branches/r2d/libmpcpsy/fft4g.c	(revision 137)
@@ -21,5 +21,5 @@
 
 #include "libmpcpsy.h"
-#include "mpcmath.h"
+#include <mpc/mpcmath.h>
 
 /* F U N C T I O N S */
Index: /libmpc/branches/r2d/libmpcpsy/fft_routines.c
===================================================================
--- /libmpc/branches/r2d/libmpcpsy/fft_routines.c	(revision 136)
+++ /libmpc/branches/r2d/libmpcpsy/fft_routines.c	(revision 137)
@@ -22,5 +22,5 @@
 
 #include "libmpcpsy.h"
-#include "mpcmath.h"
+#include <mpc/mpcmath.h>
 
 #define CX0     -1.
Index: /libmpc/branches/r2d/libmpcpsy/profile.c
===================================================================
--- /libmpc/branches/r2d/libmpcpsy/profile.c	(revision 136)
+++ /libmpc/branches/r2d/libmpcpsy/profile.c	(revision 137)
@@ -19,5 +19,5 @@
 
 #include "libmpcpsy.h"
-#include "minimax.h"
+#include <mpc/minimax.h>
 
 
Index: /libmpc/branches/r2d/libmpcpsy/psy.c
===================================================================
--- /libmpc/branches/r2d/libmpcpsy/psy.c	(revision 136)
+++ /libmpc/branches/r2d/libmpcpsy/psy.c	(revision 137)
@@ -56,7 +56,7 @@
 
 #include "libmpcpsy.h"
-#include "datatypes.h"
-#include "minimax.h"
-#include "mpcmath.h"
+#include <mpc/datatypes.h>
+#include <mpc/minimax.h>
+#include <mpc/mpcmath.h>
 
 // psy_tab.c
Index: /libmpc/branches/r2d/libmpcpsy/psy_tab.c
===================================================================
--- /libmpc/branches/r2d/libmpcpsy/psy_tab.c	(revision 136)
+++ /libmpc/branches/r2d/libmpcpsy/psy_tab.c	(revision 137)
@@ -21,6 +21,6 @@
 
 #include "libmpcpsy.h"
-#include "minimax.h"
-#include "mpcmath.h"
+#include <mpc/minimax.h>
+#include <mpc/mpcmath.h>
 
 /*
Index: /libmpc/branches/r2d/libwavformat/Makefile.am
===================================================================
--- /libmpc/branches/r2d/libwavformat/Makefile.am	(revision 137)
+++ /libmpc/branches/r2d/libwavformat/Makefile.am	(revision 137)
@@ -0,0 +1,4 @@
+INCLUDES = 
+METASOURCES = AUTO
+lib_LIBRARIES = libwavformat.a
+libwavformat_a_SOURCES = input.c output.c
Index: /libmpc/branches/r2d/libwavformat/libwaveformat.h
===================================================================
--- /libmpc/branches/r2d/libwavformat/libwaveformat.h	(revision 136)
+++ /libmpc/branches/r2d/libwavformat/libwaveformat.h	(revision 137)
@@ -53,5 +53,5 @@
 } t_wav_input_handler;
 
-typedef struct 
+typedef struct
 {
 	t_wav_input_file_callback m_callback;
@@ -71,5 +71,5 @@
 	t_wav_uint32 m_data_position;
 
-	
+
 
 	t_wav_uint8 m_workbuffer[512];
@@ -131,2 +131,3 @@
 
 #endif //__LIBWAVEFORMAT_H__
+
Index: /libmpc/branches/r2d/libwavformat/output.c
===================================================================
--- /libmpc/branches/r2d/libwavformat/output.c	(revision 136)
+++ /libmpc/branches/r2d/libwavformat/output.c	(revision 137)
@@ -140,8 +140,8 @@
 } t_riff_header;
 
-static const t_riff_header g_header_riff = {'R','I','F','F'};
-static const t_riff_header g_header_wave = {'W','A','V','E'};
-static const t_riff_header g_header_data = {'d','a','t','a'};
-static const t_riff_header g_header_fmt  = {'f','m','t',' '};
+static const t_riff_header g_header_riff = {{'R','I','F','F'}};
+static const t_riff_header g_header_wave = {{'W','A','V','E'}};
+static const t_riff_header g_header_data = {{'d','a','t','a'}};
+static const t_riff_header g_header_fmt  = {{'f','m','t',' '}};
 
 static t_wav_uint32 waveformat_write(t_wav_output_file * p_file,void const * p_buffer,t_wav_uint32 p_buffer_size)
@@ -277,5 +277,5 @@
 
 		delta_written = waveformat_write(p_file,p_file->m_workbuffer,delta * p_file->m_bytes_per_sample) / p_file->m_bytes_per_sample;
-		
+
 		if (delta_written > 0)
 		{
@@ -305,5 +305,5 @@
 
 		delta_written = waveformat_write(p_file,p_file->m_workbuffer,delta * p_file->m_bytes_per_sample) / p_file->m_bytes_per_sample;
-		
+
 		if (delta_written > 0)
 		{
Index: /libmpc/branches/r2d/mpcdec/Makefile.am
===================================================================
--- /libmpc/branches/r2d/mpcdec/Makefile.am	(revision 137)
+++ /libmpc/branches/r2d/mpcdec/Makefile.am	(revision 137)
@@ -0,0 +1,4 @@
+INCLUDES = -I$(top_srcdir)/libwavformat -I$(top_srcdir)/include
+METASOURCES = AUTO
+bin_PROGRAMS = mpcdec
+mpcdec_SOURCES = mpcdec.c
Index: bmpc/branches/r2d/mppenc.kdevelop
===================================================================
--- /libmpc/branches/r2d/mppenc.kdevelop	(revision 136)
+++ 	(revision )
@@ -1,218 +1,0 @@
-<?xml version = '1.0'?>
-<kdevelop>
-  <general>
-    <author>Nicolas Botti</author>
-    <email/>
-    <version>0.1</version>
-    <projectmanagement>KDevAutoProject</projectmanagement>
-    <primarylanguage>C</primarylanguage>
-    <keywords>
-      <keyword>C</keyword>
-      <keyword>Code</keyword>
-    </keywords>
-    <ignoreparts/>
-    <projectdirectory>.</projectdirectory>
-    <absoluteprojectpath>false</absoluteprojectpath>
-    <description/>
-  </general>
-  <kdevautoproject>
-    <general>
-      <activetarget>libmpcpsy/libmpcpsy.a</activetarget>
-      <useconfiguration>debug</useconfiguration>
-    </general>
-    <run>
-      <mainprogram>src/mppenc</mainprogram>
-      <terminal>true</terminal>
-      <directoryradio>executable</directoryradio>
-      <runarguments>
-        <mppenc/>
-      </runarguments>
-      <customdirectory>/</customdirectory>
-      <programargs/>
-      <autocompile>true</autocompile>
-      <envvars/>
-    </run>
-    <configurations>
-      <optimized>
-        <builddir>optimized</builddir>
-        <ccompiler>kdevgccoptions</ccompiler>
-        <cxxcompiler>kdevgppoptions</cxxcompiler>
-        <f77compiler>kdevg77options</f77compiler>
-        <cflags>-O3 -fomit-frame-pointer -pipe -Wall -ffast-math</cflags>
-        <envvars/>
-        <configargs/>
-        <topsourcedir/>
-        <cppflags>-DMPP_ENCODER=1 -DTRUE=1 -DFALSE=0</cppflags>
-        <ldflags/>
-        <ccompilerbinary/>
-        <cxxcompilerbinary/>
-        <f77compilerbinary/>
-        <cxxflags/>
-        <f77flags/>
-      </optimized>
-      <debug>
-        <configargs>--enable-debug=full</configargs>
-        <builddir>debug</builddir>
-        <ccompiler>kdevgccoptions</ccompiler>
-        <cxxcompiler>kdevgppoptions</cxxcompiler>
-        <f77compiler>kdevg77options</f77compiler>
-        <cflags>-O0 -Wall -g3</cflags>
-        <envvars/>
-        <topsourcedir/>
-        <cppflags/>
-        <ldflags/>
-        <ccompilerbinary/>
-        <cxxcompilerbinary/>
-        <f77compilerbinary/>
-        <cxxflags/>
-        <f77flags/>
-      </debug>
-    </configurations>
-    <make>
-      <envvars>
-        <envvar value="1" name="WANT_AUTOCONF_2_5" />
-        <envvar value="1" name="WANT_AUTOMAKE_1_6" />
-      </envvars>
-      <abortonerror>true</abortonerror>
-      <numberofjobs>1</numberofjobs>
-      <dontact>false</dontact>
-      <makebin/>
-      <prio>0</prio>
-    </make>
-  </kdevautoproject>
-  <kdevdoctreeview>
-    <ignoretocs>
-      <toc>ada</toc>
-      <toc>ada_bugs_gcc</toc>
-      <toc>bash</toc>
-      <toc>bash_bugs</toc>
-      <toc>clanlib</toc>
-      <toc>w3c-dom-level2-html</toc>
-      <toc>fortran_bugs_gcc</toc>
-      <toc>gnome1</toc>
-      <toc>gnustep</toc>
-      <toc>gtk</toc>
-      <toc>gtk_bugs</toc>
-      <toc>haskell</toc>
-      <toc>haskell_bugs_ghc</toc>
-      <toc>java_bugs_gcc</toc>
-      <toc>java_bugs_sun</toc>
-      <toc>kde2book</toc>
-      <toc>libstdc++</toc>
-      <toc>opengl</toc>
-      <toc>pascal_bugs_fp</toc>
-      <toc>php</toc>
-      <toc>php_bugs</toc>
-      <toc>perl</toc>
-      <toc>perl_bugs</toc>
-      <toc>python</toc>
-      <toc>python_bugs</toc>
-      <toc>qt-kdev3</toc>
-      <toc>ruby</toc>
-      <toc>ruby_bugs</toc>
-      <toc>sdl</toc>
-      <toc>stl</toc>
-      <toc>w3c-svg</toc>
-      <toc>sw</toc>
-      <toc>w3c-uaag10</toc>
-      <toc>wxwidgets_bugs</toc>
-    </ignoretocs>
-    <ignoreqt_xml>
-      <toc>Guide to the Qt Translation Tools</toc>
-      <toc>Qt Assistant Manual</toc>
-      <toc>Qt Designer Manual</toc>
-      <toc>Qt Reference Documentation</toc>
-      <toc>qmake User Guide</toc>
-    </ignoreqt_xml>
-    <ignoredoxygen>
-      <toc>KDE Libraries (Doxygen)</toc>
-    </ignoredoxygen>
-  </kdevdoctreeview>
-  <kdevfilecreate>
-    <useglobaltypes>
-      <type ext="c" />
-      <type ext="h" />
-    </useglobaltypes>
-  </kdevfilecreate>
-  <kdevfileview>
-    <groups>
-      <group pattern="*.h" name="Header files" />
-      <group pattern="*.c" name="Source files" />
-      <hidenonprojectfiles>false</hidenonprojectfiles>
-      <hidenonlocation>false</hidenonlocation>
-    </groups>
-    <tree>
-      <hidepatterns>*.o,*.lo,CVS</hidepatterns>
-      <hidenonprojectfiles>false</hidenonprojectfiles>
-    </tree>
-  </kdevfileview>
-  <kdevdocumentation>
-    <projectdoc>
-      <docsystem>Doxygen Documentation Collection</docsystem>
-      <docurl>mppenc.tag</docurl>
-    </projectdoc>
-  </kdevdocumentation>
-  <substmap>
-    <APPNAME>mppenc</APPNAME>
-    <APPNAMELC>mppenc</APPNAMELC>
-    <APPNAMESC>Mppenc</APPNAMESC>
-    <APPNAMEUC>MPPENC</APPNAMEUC>
-    <AUTHOR>Nicolas Botti</AUTHOR>
-    <CFLAGS/>
-    <EMAIL/>
-    <LICENSE>GPL</LICENSE>
-    <LICENSEFILE>COPYING</LICENSEFILE>
-    <OPT_INCS>-I/usr/include</OPT_INCS>
-    <OPT_LIBS>-lm</OPT_LIBS>
-    <VERSION>0.1</VERSION>
-    <YEAR>2006</YEAR>
-    <dest>/home/nico/src/musepack/svn/mppenc-zorg/mppenc</dest>
-  </substmap>
-  <kdevcppsupport>
-    <references/>
-    <codecompletion>
-      <includeGlobalFunctions>true</includeGlobalFunctions>
-      <includeTypes>true</includeTypes>
-      <includeEnums>true</includeEnums>
-      <includeTypedefs>false</includeTypedefs>
-      <automaticCodeCompletion>true</automaticCodeCompletion>
-      <automaticArgumentsHint>true</automaticArgumentsHint>
-      <automaticHeaderCompletion>true</automaticHeaderCompletion>
-      <codeCompletionDelay>250</codeCompletionDelay>
-      <argumentsHintDelay>400</argumentsHintDelay>
-      <headerCompletionDelay>250</headerCompletionDelay>
-    </codecompletion>
-    <creategettersetter>
-      <prefixGet/>
-      <prefixSet>set</prefixSet>
-      <prefixVariable>m_,_</prefixVariable>
-      <parameterName>theValue</parameterName>
-      <inlineGet>true</inlineGet>
-      <inlineSet>true</inlineSet>
-    </creategettersetter>
-  </kdevcppsupport>
-  <cppsupportpart>
-    <filetemplates>
-      <interfacesuffix>.h</interfacesuffix>
-      <implementationsuffix>.cpp</implementationsuffix>
-    </filetemplates>
-  </cppsupportpart>
-  <kdevdebugger>
-    <general>
-      <programargs>--overwrite ~/mdv-startup.wav</programargs>
-      <gdbpath/>
-      <dbgshell>libtool</dbgshell>
-      <configGdbScript/>
-      <runShellScript/>
-      <runGdbScript/>
-      <breakonloadinglibs>true</breakonloadinglibs>
-      <separatetty>false</separatetty>
-      <floatingtoolbar>false</floatingtoolbar>
-    </general>
-    <display>
-      <staticmembers>false</staticmembers>
-      <demanglenames>true</demanglenames>
-      <outputradix>10</outputradix>
-    </display>
-  </kdevdebugger>
-</kdevelop>
Index: /libmpc/branches/r2d/mppenc/Makefile.am
===================================================================
--- /libmpc/branches/r2d/mppenc/Makefile.am	(revision 136)
+++ /libmpc/branches/r2d/mppenc/Makefile.am	(revision 137)
@@ -4,5 +4,5 @@
 # set the include path found by configure
 INCLUDES = -I$(top_srcdir)/libmpcenc -I$(top_srcdir)/libmpcpsy \
-	-I$(top_srcdir)/common $(all_includes)
+	-I$(top_srcdir)/include/ $(all_includes)
 
 # the library search path.
Index: /libmpc/branches/r2d/mppenc/mppenc.c
===================================================================
--- /libmpc/branches/r2d/mppenc/mppenc.c	(revision 136)
+++ /libmpc/branches/r2d/mppenc/mppenc.c	(revision 137)
@@ -25,5 +25,5 @@
 
 #include "mppenc.h"
-#include "mpcmath.h"
+#include <mpc/mpcmath.h>
 
 /* G L O B A L  V A R I A B L E S */
Index: /libmpc/branches/r2d/mppenc/mppenc.h
===================================================================
--- /libmpc/branches/r2d/mppenc/mppenc.h	(revision 136)
+++ /libmpc/branches/r2d/mppenc/mppenc.h	(revision 137)
@@ -27,6 +27,6 @@
 #include "libmpcenc.h"
 #include "libmpcpsy.h"
-#include "datatypes.h"
-#include "minimax.h"
+#include <mpc/datatypes.h>
+#include <mpc/minimax.h>
 
 #include "mppdec.h"
