patches/flac-01-forte.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 12231 f75b5b1ad02f
permissions -rw-r--r--
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
     1
--- flac-1.2.1/configure.in-orig	2007-08-01 13:33:59.050837000 -0500
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
     2
+++ flac-1.2.1/configure.in	2007-08-01 13:13:34.248470000 -0500
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
     3
@@ -48,6 +48,14 @@ AM_CONFIG_HEADER(config.h)
9748
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
     4
 
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
     5
 AC_C_BIGENDIAN
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
     6
 
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
     7
+AC_C_INLINE
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
     8
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
     9
+if test "$ac_cv_c_inline" != no ; then
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    10
+  AC_DEFINE_UNQUOTED(FLAC_INLINE,$ac_cv_c_inline)
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    11
+  AC_SUBST(FLAC_INLINE)
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    12
+  AH_TEMPLATE(FLAC_INLINE, [define inline to use])
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    13
+fi
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    14
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    15
 AC_CHECK_TYPES(socklen_t, [], [])
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    16
 
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    17
 dnl check for getopt in standard library
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
    18
@@ -308,7 +308,7 @@
9748
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    19
 else
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
    20
 	CPPFLAGS="-DNDEBUG $CPPFLAGS"
9748
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    21
 	if test "x$GCC" = xyes; then
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
    22
-		CPPFLAGS="-DFLaC__INLINE=__inline__ $CPPFLAGS"
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
    23
+		CPPFLAGS="$CPPFLAGS"
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
    24
 		CFLAGS="-O3 -funroll-loops -finline-functions -Wall -W -Winline $CFLAGS"
9748
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    25
 	fi
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    26
 fi
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
    27
--- flac-1.2.0/include/share/replaygain_analysis.h-orig	2007-08-01 13:37:48.953601000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
    28
+++ flac-1.2.0/include/share/replaygain_analysis.h	2007-08-01 13:13:34.288739000 -0500
9748
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    29
@@ -1,59 +1,59 @@
12231
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    30
-/*
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    31
- *  ReplayGainAnalysis - analyzes input samples and give the recommended dB change
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    32
- *  Copyright (C) 2001 David Robinson and Glen Sawyer
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    33
- *
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    34
- *  This library is free software; you can redistribute it and/or
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    35
- *  modify it under the terms of the GNU Lesser General Public
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    36
- *  License as published by the Free Software Foundation; either
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    37
- *  version 2.1 of the License, or (at your option) any later version.
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    38
- *
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    39
- *  This library is distributed in the hope that it will be useful,
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    40
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    41
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    42
- *  Lesser General Public License for more details.
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    43
- *
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    44
- *  You should have received a copy of the GNU Lesser General Public
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    45
- *  License along with this library; if not, write to the Free Software
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    46
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    47
- *
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    48
- *  concept and filter values by David Robinson ([email protected])
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    49
- *    -- blame him if you think the idea is flawed
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    50
- *  coding by Glen Sawyer ([email protected]) 442 N 700 E, Provo, UT 84606 USA
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    51
- *    -- blame him if you think this runs too slowly, or the coding is otherwise flawed
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    52
- *  minor cosmetic tweaks to integrate with FLAC by Josh Coalson
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    53
- *
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    54
- *  For an explanation of the concepts and the basic algorithms involved, go to:
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    55
- *    http://www.replaygain.org/
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    56
- */
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    57
-
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    58
-#ifndef GAIN_ANALYSIS_H
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    59
-#define GAIN_ANALYSIS_H
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    60
-
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    61
-#include <stddef.h>
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    62
-
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    63
-#define GAIN_NOT_ENOUGH_SAMPLES  -24601
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    64
-#define GAIN_ANALYSIS_ERROR           0
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    65
-#define GAIN_ANALYSIS_OK              1
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    66
-
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    67
-#define INIT_GAIN_ANALYSIS_ERROR      0
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    68
-#define INIT_GAIN_ANALYSIS_OK         1
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    69
-
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    70
-#ifdef __cplusplus
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    71
-extern "C" {
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    72
-#endif
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    73
-
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    74
-typedef float   Float_t;         /* Type used for filtering */
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    75
-
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    76
-extern Float_t ReplayGainReferenceLoudness; /* in dB SPL, currently == 89.0 */
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    77
-
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    78
-int     InitGainAnalysis ( long samplefreq );
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    79
-int     AnalyzeSamples   ( const Float_t* left_samples, const Float_t* right_samples, size_t num_samples, int num_channels );
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    80
-int		ResetSampleFrequency ( long samplefreq );
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    81
-Float_t GetTitleGain     ( void );
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    82
-Float_t GetAlbumGain     ( void );
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    83
-
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    84
-#ifdef __cplusplus
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    85
-}
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    86
-#endif
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    87
-
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
    88
-#endif /* GAIN_ANALYSIS_H */
9748
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    89
+/*
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    90
+ *  ReplayGainAnalysis - analyzes input samples and give the recommended dB change
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    91
+ *  Copyright (C) 2001 David Robinson and Glen Sawyer
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    92
+ *
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    93
+ *  This library is free software; you can redistribute it and/or
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    94
+ *  modify it under the terms of the GNU Lesser General Public
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    95
+ *  License as published by the Free Software Foundation; either
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    96
+ *  version 2.1 of the License, or (at your option) any later version.
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    97
+ *
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    98
+ *  This library is distributed in the hope that it will be useful,
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
    99
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   100
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   101
+ *  Lesser General Public License for more details.
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   102
+ *
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   103
+ *  You should have received a copy of the GNU Lesser General Public
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   104
+ *  License along with this library; if not, write to the Free Software
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   105
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   106
+ *
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   107
+ *  concept and filter values by David Robinson ([email protected])
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   108
+ *    -- blame him if you think the idea is flawed
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   109
+ *  coding by Glen Sawyer ([email protected]) 442 N 700 E, Provo, UT 84606 USA
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   110
+ *    -- blame him if you think this runs too slowly, or the coding is otherwise flawed
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   111
+ *  minor cosmetic tweaks to integrate with FLAC by Josh Coalson
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   112
+ *
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   113
+ *  For an explanation of the concepts and the basic algorithms involved, go to:
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   114
+ *    http://www.replaygain.org/
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   115
+ */
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   116
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   117
+#ifndef GAIN_ANALYSIS_H
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   118
+#define GAIN_ANALYSIS_H
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   119
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   120
+#include <stddef.h>
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   121
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   122
+#define GAIN_NOT_ENOUGH_SAMPLES  -24601
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   123
+#define GAIN_ANALYSIS_ERROR           0
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   124
+#define GAIN_ANALYSIS_OK              1
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   125
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   126
+#define INIT_GAIN_ANALYSIS_ERROR      0
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   127
+#define INIT_GAIN_ANALYSIS_OK         1
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   128
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   129
+#ifdef __cplusplus
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   130
+extern "C" {
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   131
+#endif
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   132
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   133
+typedef float   Float_t;         /* Type used for filtering */
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   134
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   135
+extern Float_t ReplayGainReferenceLoudness; /* in dB SPL, currently == 89.0 */
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   136
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   137
+int     InitGainAnalysis ( long samplefreq );
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   138
+int     AnalyzeSamples   ( const Float_t* left_samples, const Float_t* right_samples, size_t num_samples, int num_channels );
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   139
+int		ResetSampleFrequency ( long samplefreq );
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   140
+Float_t GetTitleGain     ( void );
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   141
+Float_t GetAlbumGain     ( void );
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   142
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   143
+#ifdef __cplusplus
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   144
+}
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   145
+#endif
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   146
+
db4d8edd82de 2007-04-17 Brian Cameron <[email protected]>
yippi
parents: 9313
diff changeset
   147
+#endif /* GAIN_ANALYSIS_H */
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   148
--- flac-1.2.0/src/plugin_winamp2/infobox.c-orig	2007-08-01 13:34:46.716826000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   149
+++ flac-1.2.0/src/plugin_winamp2/infobox.c	2007-08-01 13:13:34.257582000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   150
@@ -48,7 +48,7 @@ static const char infoTitle[] = "FLAC Fi
12231
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   151
 
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   152
 /* TODO: write genres in utf-8 ? */
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   153
 
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   154
-static __inline int GetGenresFileName(char *buffer, int size)
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   155
+static FLAC_INLINE int GetGenresFileName(char *buffer, int size)
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   156
 {
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   157
 	char *c;
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   158
 
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   159
@@ -273,7 +273,7 @@ static BOOL InitInfoboxInfo(HWND hwnd, c
12231
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   160
 	return TRUE;
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   161
 }
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   162
 
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   163
-static void __inline SetTag(HWND hwnd, const char *filename, FLAC__StreamMetadata *tags)
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   164
+static void FLAC_INLINE SetTag(HWND hwnd, const char *filename, FLAC__StreamMetadata *tags)
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   165
 {
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   166
 	strcpy(buffer, infoTitle);
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   167
 
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   168
@@ -399,7 +399,7 @@ ULONGLONG FileSize(const char *fileName)
12231
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   169
 	return res.QuadPart;
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   170
 }
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   171
 
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   172
-static __inline char *GetFileName(const char *fullname)
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   173
+static FLAC_INLINE char *GetFileName(const char *fullname)
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   174
 {
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   175
 	const char *c = fullname + strlen(fullname) - 1;
f75b5b1ad02f 2008-04-30 Brian Cameron <[email protected]>
yippi
parents: 12222
diff changeset
   176
 
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   177
--- flac-1.2.0/src/share/replaygain_analysis/replaygain_analysis.c-orig	2007-08-01 13:36:01.582583000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   178
+++ flac-1.2.0/src/share/replaygain_analysis/replaygain_analysis.c	2007-08-01 13:22:19.440619000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   179
@@ -110,10 +110,10 @@ typedef signed int      Int32_t;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   180
 #define YULE_ORDER         10
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   181
 #define BUTTER_ORDER        2
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   182
 #define RMS_PERCENTILE      0.95        /* percentile which is louder than the proposed level */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   183
-#define MAX_SAMP_FREQ   48000.          /* maximum allowed sample frequency [Hz] */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   184
-#define RMS_WINDOW_TIME     0.050       /* Time slice size [s] */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   185
-#define STEPS_per_dB      100.          /* Table entries per dB */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   186
-#define MAX_dB            120.          /* Table entries for 0...MAX_dB (normal max. values are 70...80 dB) */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   187
+#define MAX_SAMP_FREQ   48000           /* maximum allowed sample frequency [Hz] */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   188
+#define RMS_WINDOW_TIME    50           /* Time slice size [ms] */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   189
+#define STEPS_per_dB      100           /* Table entries per dB */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   190
+#define MAX_dB            120           /* Table entries for 0...MAX_dB (normal max. values are 70...80 dB) */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   191
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   192
 #define MAX_ORDER               (BUTTER_ORDER > YULE_ORDER ? BUTTER_ORDER : YULE_ORDER)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   193
 /* [JEC] the following was originally #defined as:
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   194
@@ -122,12 +122,7 @@ typedef signed int      Int32_t;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   195
  * sampleWindow calculation in ResetSampleFrequency(), and was causing
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   196
  * buffer overflows for 48kHz analysis, hence the +1.
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   197
  */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   198
-#ifndef __sun
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   199
- #define MAX_SAMPLES_PER_WINDOW  (size_t) (MAX_SAMP_FREQ * RMS_WINDOW_TIME + 1.)   /* max. Samples per Time slice */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   200
-#else
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   201
- /* [JEC] Solaris Forte compiler doesn't like float calc in array indices */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   202
- #define MAX_SAMPLES_PER_WINDOW  (size_t) (2401)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   203
-#endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   204
+#define MAX_SAMPLES_PER_WINDOW  (size_t) (MAX_SAMP_FREQ * RMS_WINDOW_TIME / 1000 + 1)   /* max. Samples per Time slice */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   205
 #define PINK_REF                64.82 /* 298640883795 */                          /* calibration value */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   206
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   207
 static Float_t          linprebuf [MAX_ORDER * 2];
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   208
@@ -255,7 +250,7 @@ ResetSampleFrequency ( long samplefreq )
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   209
         default:    return INIT_GAIN_ANALYSIS_ERROR;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   210
     }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   211
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   212
-    sampleWindow = (int) ceil (samplefreq * RMS_WINDOW_TIME);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   213
+    sampleWindow = (int) ceil (samplefreq * RMS_WINDOW_TIME / 1000);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   214
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   215
     lsum         = 0.;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   216
     rsum         = 0.;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   217
--- flac-1.2.0/src/share/replaygain_synthesis/replaygain_synthesis.c-orig	2007-08-01 13:38:42.924311000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   218
+++ flac-1.2.0/src/share/replaygain_synthesis/replaygain_synthesis.c	2007-08-01 13:24:07.805641000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   219
@@ -44,10 +44,6 @@
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   220
 #include "replaygain_synthesis.h"
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   221
 #include "FLAC/assert.h"
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   222
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   223
-#ifndef FLaC__INLINE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   224
-#define FLaC__INLINE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   225
-#endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   226
-
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   227
 /* adjust for compilers that can't understand using LL suffix for int64_t literals */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   228
 #ifdef _MSC_VER
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   229
 #define FLAC__I64L(x) x
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   230
@@ -236,7 +232,7 @@ void FLAC__replaygain_synthesis__init_di
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   231
  * the following is based on parts of wavegain.c
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   232
  */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   233
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   234
-static FLaC__INLINE FLAC__int64 dither_output_(DitherContext *d, FLAC__bool do_dithering, int shapingtype, int i, double Sum, int k)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   235
+static FLAC_INLINE FLAC__int64 dither_output_(DitherContext *d, FLAC__bool do_dithering, int shapingtype, int i, double Sum, int k)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   236
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   237
 	union {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   238
 		double d;
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   239
--- flac-1.2.1/src/plugin_common/tags.c-orig	2007-08-01 13:39:21.131268000 -0500
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   240
+++ flac-1.2.1/src/plugin_common/tags.c	2007-08-01 13:25:03.310108000 -0500
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   241
@@ -29,12 +29,7 @@
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   242
 #include "FLAC/metadata.h"
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   243
 #include "share/alloc.h"
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   244
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   245
-#ifndef FLaC__INLINE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   246
-#define FLaC__INLINE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   247
-#endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   248
-
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   249
-
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   250
-static FLaC__INLINE size_t local__wide_strlen(const FLAC__uint16 *s)
12222
7e09e6865ec9 2008-04-29 Brian Cameron <[email protected]>
yippi
parents: 10512
diff changeset
   251
+static FLAC_INLINE size_t local__wide_strlen(const FLAC__uint16 *s)
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   252
 {
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   253
 	size_t n = 0;
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   254
 	while(*s++)
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   255
@@ -48,7 +43,7 @@
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   256
  * and a more clear explanation at the end of this section:
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   257
  *   http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   258
  */
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   259
-static FLaC__INLINE size_t local__utf8len(const FLAC__byte *utf8)
12222
7e09e6865ec9 2008-04-29 Brian Cameron <[email protected]>
yippi
parents: 10512
diff changeset
   260
+static FLAC_INLINE size_t local__utf8len(const FLAC__byte *utf8)
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   261
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   262
 	FLAC__ASSERT(0 != utf8);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   263
 	if ((utf8[0] & 0x80) == 0) {
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   264
@@ -90,7 +85,7 @@
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   265
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   266
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   267
 
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   268
-static FLaC__INLINE size_t local__utf8_to_ucs2(const FLAC__byte *utf8, FLAC__uint16 *ucs2)
12222
7e09e6865ec9 2008-04-29 Brian Cameron <[email protected]>
yippi
parents: 10512
diff changeset
   269
+static FLAC_INLINE size_t local__utf8_to_ucs2(const FLAC__byte *utf8, FLAC__uint16 *ucs2)
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   270
 {
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   271
 	const size_t len = local__utf8len(utf8);
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   272
 
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   273
@@ -145,7 +140,7 @@
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   274
 	return out;
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   275
 }
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   276
 
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   277
-static FLaC__INLINE size_t local__ucs2len(FLAC__uint16 ucs2)
12222
7e09e6865ec9 2008-04-29 Brian Cameron <[email protected]>
yippi
parents: 10512
diff changeset
   278
+static FLAC_INLINE size_t local__ucs2len(FLAC__uint16 ucs2)
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   279
 {
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   280
 	if (ucs2 < 0x0080)
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   281
 		return 1;
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   282
@@ -155,7 +150,7 @@
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   283
 		return 3;
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   284
 }
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   285
 
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   286
-static FLaC__INLINE size_t local__ucs2_to_utf8(FLAC__uint16 ucs2, FLAC__byte *utf8)
12222
7e09e6865ec9 2008-04-29 Brian Cameron <[email protected]>
yippi
parents: 10512
diff changeset
   287
+static FLAC_INLINE size_t local__ucs2_to_utf8(FLAC__uint16 ucs2, FLAC__byte *utf8)
10512
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   288
 {
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   289
 	if (ucs2 < 0x080) {
b55097388a51 2007-09-18 Damien Carbery <[email protected]>
dcarbery
parents: 10252
diff changeset
   290
 		utf8[0] = (FLAC__byte)ucs2;
10252
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   291
-static FLaC__INLINE unsigned local__utf8_to_ucs2(const FLAC__byte *utf8, FLAC__uint16 *ucs2)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   292
+static FLAC_INLINE unsigned local__utf8_to_ucs2(const FLAC__byte *utf8, FLAC__uint16 *ucs2)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   293
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   294
 	const unsigned len = local__utf8len(utf8);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   295
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   296
--- flac-1.2.0/src/plugin_common/dither.c-orig	2007-08-01 13:39:27.414786000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   297
+++ flac-1.2.0/src/plugin_common/dither.c	2007-08-01 13:25:25.428824000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   298
@@ -32,17 +32,12 @@
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   299
 #endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   300
 #define max(a,b) ((a)>(b)?(a):(b))
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   301
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   302
-#ifndef FLaC__INLINE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   303
-#define FLaC__INLINE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   304
-#endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   305
-
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   306
-
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   307
 /* 32-bit pseudo-random number generator
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   308
  *
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   309
  * @@@ According to Miroslav, this one is poor quality, the one from the
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   310
  * @@@ original replaygain code is much better
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   311
  */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   312
-static FLaC__INLINE FLAC__uint32 prng(FLAC__uint32 state)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   313
+static FLAC_INLINE FLAC__uint32 prng(FLAC__uint32 state)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   314
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   315
 	return (state * 0x0019660dL + 0x3c6ef35fL) & 0xffffffffL;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   316
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   317
@@ -54,7 +49,7 @@ typedef struct {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   318
 	FLAC__int32 random;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   319
 } dither_state;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   320
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   321
-static FLaC__INLINE FLAC__int32 linear_dither(unsigned source_bps, unsigned target_bps, FLAC__int32 sample, dither_state *dither, const FLAC__int32 MIN, const FLAC__int32 MAX)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   322
+static FLAC_INLINE FLAC__int32 linear_dither(unsigned source_bps, unsigned target_bps, FLAC__int32 sample, dither_state *dither, const FLAC__int32 MIN, const FLAC__int32 MAX)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   323
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   324
 	unsigned scalebits;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   325
 	FLAC__int32 output, mask, random;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   326
--- flac-1.2.0/src/libFLAC/bitreader.c-orig	2007-08-01 13:39:43.956587000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   327
+++ flac-1.2.0/src/libFLAC/bitreader.c	2007-08-01 13:26:46.977537000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   328
@@ -91,7 +91,8 @@ typedef FLAC__uint32 brword;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   329
  */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   330
 static const unsigned FLAC__BITREADER_DEFAULT_CAPACITY = 65536u / FLAC__BITS_PER_WORD; /* in words */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   331
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   332
-static const unsigned char byte_to_unary_table[] = {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   333
+/* Must be extern since it is referenced in extern inline functions */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   334
+extern const unsigned char byte_to_unary_table[] = {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   335
 	8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   336
 	3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   337
 	2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   338
@@ -126,10 +127,6 @@ static const unsigned char byte_to_unary
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   339
 #define FLAC__U64L(x) x##LLU
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   340
 #endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   341
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   342
-#ifndef FLaC__INLINE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   343
-#define FLaC__INLINE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   344
-#endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   345
-
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   346
 /* WATCHOUT: assembly routines rely on the order in which these fields are declared */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   347
 struct FLAC__BitReader {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   348
 	/* any partially-consumed word at the head will stay right-justified as bits are consumed from the left */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   349
@@ -149,7 +146,7 @@ struct FLAC__BitReader {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   350
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   351
 #ifdef _MSC_VER
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   352
 /* OPT: an MSVC built-in would be better */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   353
-static _inline FLAC__uint32 local_swap32_(FLAC__uint32 x)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   354
+static FLAC_INLINE FLAC__uint32 local_swap32_(FLAC__uint32 x)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   355
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   356
 	x = ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   357
 	return (x>>16) | (x<<16);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   358
@@ -173,7 +170,7 @@ done1:
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   359
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   360
 #endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   361
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   362
-static FLaC__INLINE void crc16_update_word_(FLAC__BitReader *br, brword word)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   363
+static FLAC_INLINE void crc16_update_word_(FLAC__BitReader *br, brword word)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   364
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   365
 	register unsigned crc = br->read_crc16;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   366
 #if FLAC__BYTES_PER_WORD == 4
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   367
@@ -415,22 +412,22 @@ FLAC__uint16 FLAC__bitreader_get_read_cr
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   368
 	return br->read_crc16;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   369
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   370
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   371
-FLaC__INLINE FLAC__bool FLAC__bitreader_is_consumed_byte_aligned(const FLAC__BitReader *br)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   372
+FLAC_INLINE FLAC__bool FLAC__bitreader_is_consumed_byte_aligned(const FLAC__BitReader *br)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   373
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   374
 	return ((br->consumed_bits & 7) == 0);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   375
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   376
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   377
-FLaC__INLINE unsigned FLAC__bitreader_bits_left_for_byte_alignment(const FLAC__BitReader *br)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   378
+FLAC_INLINE unsigned FLAC__bitreader_bits_left_for_byte_alignment(const FLAC__BitReader *br)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   379
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   380
 	return 8 - (br->consumed_bits & 7);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   381
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   382
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   383
-FLaC__INLINE unsigned FLAC__bitreader_get_input_bits_unconsumed(const FLAC__BitReader *br)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   384
+FLAC_INLINE unsigned FLAC__bitreader_get_input_bits_unconsumed(const FLAC__BitReader *br)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   385
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   386
 	return (br->words-br->consumed_words)*FLAC__BITS_PER_WORD + br->bytes*8 - br->consumed_bits;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   387
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   388
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   389
-FLaC__INLINE FLAC__bool FLAC__bitreader_read_raw_uint32(FLAC__BitReader *br, FLAC__uint32 *val, unsigned bits)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   390
+FLAC_INLINE FLAC__bool FLAC__bitreader_read_raw_uint32(FLAC__BitReader *br, FLAC__uint32 *val, unsigned bits)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   391
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   392
 	FLAC__ASSERT(0 != br);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   393
 	FLAC__ASSERT(0 != br->buffer);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   394
@@ -541,7 +538,7 @@ FLAC__bool FLAC__bitreader_read_raw_uint
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   395
 	return true;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   396
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   397
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   398
-FLaC__INLINE FLAC__bool FLAC__bitreader_read_uint32_little_endian(FLAC__BitReader *br, FLAC__uint32 *val)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   399
+FLAC_INLINE FLAC__bool FLAC__bitreader_read_uint32_little_endian(FLAC__BitReader *br, FLAC__uint32 *val)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   400
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   401
 	FLAC__uint32 x8, x32 = 0;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   402
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   403
@@ -692,7 +689,7 @@ FLAC__bool FLAC__bitreader_read_byte_blo
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   404
 	return true;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   405
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   406
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   407
-FLaC__INLINE FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, unsigned *val)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   408
+FLAC_INLINE FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, unsigned *val)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   409
 #if 0 /* slow but readable version */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   410
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   411
 	unsigned bit;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   412
--- flac-1.2.0/src/libFLAC/bitwriter.c-orig	2007-08-01 13:40:11.564333000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   413
+++ flac-1.2.0/src/libFLAC/bitwriter.c	2007-08-01 13:13:34.288020000 -0500
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   414
@@ -92,10 +92,6 @@ static const unsigned FLAC__BITWRITER_DE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   415
 #define FLAC__U64L(x) x##LLU
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   416
 #endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   417
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   418
-#ifndef FLaC__INLINE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   419
-#define FLaC__INLINE
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   420
-#endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   421
-
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   422
 struct FLAC__BitWriter {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   423
 	bwword *buffer;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   424
 	bwword accum; /* accumulator; bits are right-justified; when full, accum is appended to buffer */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   425
@@ -106,7 +102,7 @@ struct FLAC__BitWriter {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   426
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   427
 #ifdef _MSC_VER
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   428
 /* OPT: an MSVC built-in would be better */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   429
-static _inline FLAC__uint32 local_swap32_(FLAC__uint32 x)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   430
+static FLAC_INLINE FLAC__uint32 local_swap32_(FLAC__uint32 x)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   431
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   432
 	x = ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   433
 	return (x>>16) | (x<<16);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   434
@@ -114,7 +110,8 @@ static _inline FLAC__uint32 local_swap32
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   435
 #endif
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   436
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   437
 /* * WATCHOUT: The current implementation only grows the buffer. */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   438
-static FLAC__bool bitwriter_grow_(FLAC__BitWriter *bw, unsigned bits_to_add)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   439
+/* Must be extern since referenced from extern inline functions */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   440
+FLAC__bool bitwriter_grow_(FLAC__BitWriter *bw, unsigned bits_to_add)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   441
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   442
 	unsigned new_capacity;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   443
 	bwword *new_buffer;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   444
@@ -296,7 +293,7 @@ void FLAC__bitwriter_release_buffer(FLAC
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   445
 	(void)bw;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   446
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   447
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   448
-FLaC__INLINE FLAC__bool FLAC__bitwriter_write_zeroes(FLAC__BitWriter *bw, unsigned bits)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   449
+FLAC_INLINE FLAC__bool FLAC__bitwriter_write_zeroes(FLAC__BitWriter *bw, unsigned bits)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   450
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   451
 	unsigned n;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   452
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   453
@@ -334,7 +331,7 @@ FLaC__INLINE FLAC__bool FLAC__bitwriter_
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   454
 	return true;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   455
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   456
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   457
-FLaC__INLINE FLAC__bool FLAC__bitwriter_write_raw_uint32(FLAC__BitWriter *bw, FLAC__uint32 val, unsigned bits)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   458
+FLAC_INLINE FLAC__bool FLAC__bitwriter_write_raw_uint32(FLAC__BitWriter *bw, FLAC__uint32 val, unsigned bits)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   459
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   460
 	register unsigned left;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   461
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   462
@@ -373,7 +370,7 @@ FLaC__INLINE FLAC__bool FLAC__bitwriter_
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   463
 	return true;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   464
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   465
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   466
-FLaC__INLINE FLAC__bool FLAC__bitwriter_write_raw_int32(FLAC__BitWriter *bw, FLAC__int32 val, unsigned bits)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   467
+FLAC_INLINE FLAC__bool FLAC__bitwriter_write_raw_int32(FLAC__BitWriter *bw, FLAC__int32 val, unsigned bits)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   468
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   469
 	/* zero-out unused bits */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   470
 	if(bits < 32)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   471
@@ -382,7 +379,7 @@ FLaC__INLINE FLAC__bool FLAC__bitwriter_
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   472
 	return FLAC__bitwriter_write_raw_uint32(bw, (FLAC__uint32)val, bits);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   473
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   474
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   475
-FLaC__INLINE FLAC__bool FLAC__bitwriter_write_raw_uint64(FLAC__BitWriter *bw, FLAC__uint64 val, unsigned bits)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   476
+FLAC_INLINE FLAC__bool FLAC__bitwriter_write_raw_uint64(FLAC__BitWriter *bw, FLAC__uint64 val, unsigned bits)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   477
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   478
 	/* this could be a little faster but it's not used for much */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   479
 	if(bits > 32) {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   480
@@ -394,7 +391,7 @@ FLaC__INLINE FLAC__bool FLAC__bitwriter_
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   481
 		return FLAC__bitwriter_write_raw_uint32(bw, (FLAC__uint32)val, bits);
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   482
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   483
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   484
-FLaC__INLINE FLAC__bool FLAC__bitwriter_write_raw_uint32_little_endian(FLAC__BitWriter *bw, FLAC__uint32 val)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   485
+FLAC_INLINE FLAC__bool FLAC__bitwriter_write_raw_uint32_little_endian(FLAC__BitWriter *bw, FLAC__uint32 val)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   486
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   487
 	/* this doesn't need to be that fast as currently it is only used for vorbis comments */
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   488
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   489
@@ -410,7 +407,7 @@ FLaC__INLINE FLAC__bool FLAC__bitwriter_
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   490
 	return true;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   491
 }
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   492
 
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   493
-FLaC__INLINE FLAC__bool FLAC__bitwriter_write_byte_block(FLAC__BitWriter *bw, const FLAC__byte vals[], unsigned nvals)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   494
+FLAC_INLINE FLAC__bool FLAC__bitwriter_write_byte_block(FLAC__BitWriter *bw, const FLAC__byte vals[], unsigned nvals)
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   495
 {
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   496
 	unsigned i;
2d443123d319 2007-08-01 Brian Cameron <[email protected]>
yippi
parents: 9748
diff changeset
   497