Project_Dep_Name grabbag_static\r
End Project Dependency\r
Begin Project Dependency\r
- Project_Dep_Name gain_analysis_static\r
+ Project_Dep_Name replaygain_analysis_static\r
+ End Project Dependency\r
+ Begin Project Dependency\r
+ Project_Dep_Name replaygain_synthesis_static\r
End Project Dependency\r
Begin Project Dependency\r
Project_Dep_Name getopt_static\r
Project_Dep_Name grabbag_static\r
End Project Dependency\r
Begin Project Dependency\r
- Project_Dep_Name gain_analysis_static\r
+ Project_Dep_Name replaygain_analysis_static\r
+ End Project Dependency\r
+ Begin Project Dependency\r
+ Project_Dep_Name replaygain_synthesis_static\r
End Project Dependency\r
Begin Project Dependency\r
Project_Dep_Name getopt_static\r
Project_Dep_Name grabbag_static\r
End Project Dependency\r
Begin Project Dependency\r
- Project_Dep_Name gain_analysis_static\r
+ Project_Dep_Name replaygain_analysis_static\r
+ End Project Dependency\r
+ Begin Project Dependency\r
+ Project_Dep_Name replaygain_synthesis_static\r
End Project Dependency\r
Begin Project Dependency\r
Project_Dep_Name getopt_static\r
\r
###############################################################################\r
\r
-Project: "gain_analysis_static"=.\src\share\gain_analysis\gain_analysis_static.dsp - Package Owner=<4>\r
+Project: "replaygain_analysis_static"=.\src\share\replaygain_analysis\replaygain_analysis_static.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
+Project: "replaygain_synthesis_static"=.\src\share\replaygain_synthesis\replaygain_synthesis_static.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
Project_Dep_Name libFLAC_static\r
End Project Dependency\r
Begin Project Dependency\r
- Project_Dep_Name gain_analysis_static\r
+ Project_Dep_Name replaygain_analysis_static\r
End Project Dependency\r
}}}\r
\r
Package=<4>\r
{{{\r
Begin Project Dependency\r
- Project_Dep_Name gain_analysis_static\r
+ Project_Dep_Name replaygain_analysis_static\r
End Project Dependency\r
Begin Project Dependency\r
Project_Dep_Name getopt_static\r
Package=<4>\r
{{{\r
Begin Project Dependency\r
+ Project_Dep_Name replaygain_synthesis_static\r
+ End Project Dependency\r
+ Begin Project Dependency\r
Project_Dep_Name libFLAC_static\r
End Project Dependency\r
}}}\r
# instead of FLAC__ since autoconf triggers off 'AC_' in strings
AC_INIT(src/flac/main.c)
-AM_INIT_AUTOMAKE(flac, 1.1.0)
+AM_INIT_AUTOMAKE(flac, CVS-20031217)
# Don't automagically regenerate autoconf/automake generated files unless
# explicitly requested. Eases autobuilding -mdz
src/plugin_winamp3/Makefile \
src/plugin_xmms/Makefile \
src/share/Makefile \
- src/share/gain_analysis/Makefile \
src/share/getopt/Makefile \
src/share/grabbag/Makefile \
+ src/share/replaygain_analysis/Makefile \
+ src/share/replaygain_synthesis/Makefile \
src/share/utf8/Makefile \
src/test_grabbag/Makefile \
src/test_grabbag/cuesheet/Makefile \
SUBDIRS = grabbag
EXTRA_DIST = \
- gain_analysis.h \
getopt.h \
grabbag.h \
+ replaygain_analysis.h \
+ replaygain_synthesis.h \
utf8.h
*/
/*
- * This wraps the gain_analysis lib, which is LGPL. This wrapper
+ * This wraps the replaygain_analysis lib, which is LGPL. This wrapper
* allows analysis of different input resolutions by automatically
* scaling the input signal
*/
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef FLAC__PLUGIN_COMMON__REPLAYGAIN_SYNTHESIS_H
-#define FLAC__PLUGIN_COMMON__REPLAYGAIN_SYNTHESIS_H
+#ifndef FLAC__SHARE__REPLAYGAIN_SYNTHESIS_H
+#define FLAC__SHARE__REPLAYGAIN_SYNTHESIS_H
-#include "defs.h"
+#include <stdlib.h> /* for size_t */
#include "FLAC/ordinals.h"
+#define FLAC_SHARE__MAX_SUPPORTED_CHANNELS 2
+
typedef enum {
NOISE_SHAPING_NONE = 0,
NOISE_SHAPING_LOW = 1,
- NOISE_SHAPING_MEDUIM = 2,
+ NOISE_SHAPING_MEDIUM = 2,
NOISE_SHAPING_HIGH = 3
} NoiseShaping;
FLAC__uint64 Mask;
double Add;
float Dither;
- float ErrorHistory [FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS] [16]; /* 16th order Noise shaping */
- float DitherHistory [FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS] [16];
- int LastRandomNumber [FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS];
+ float ErrorHistory [FLAC_SHARE__MAX_SUPPORTED_CHANNELS] [16]; /* 16th order Noise shaping */
+ float DitherHistory [FLAC_SHARE__MAX_SUPPORTED_CHANNELS] [16];
+ int LastRandomNumber [FLAC_SHARE__MAX_SUPPORTED_CHANNELS];
unsigned LastHistoryIndex;
NoiseShaping ShapingType;
} DitherContext;
-void FLAC__plugin_common__init_dither_context(DitherContext *dither, int bits, int shapingtype);
+void FLAC__replaygain_synthesis__init_dither_context(DitherContext *dither, int bits, int shapingtype);
/* scale = (float) pow(10., (double)replaygain * 0.05); */
-int FLAC__plugin_common__apply_gain(FLAC__byte *data_out, FLAC__bool little_endian_data_out, const FLAC__int32 * const input[], unsigned wide_samples, unsigned channels, const unsigned source_bps, const unsigned target_bps, const float scale, const FLAC__bool hard_limit, FLAC__bool do_dithering, DitherContext *dither_context);
+size_t FLAC__replaygain_synthesis__apply_gain(FLAC__byte *data_out, FLAC__bool little_endian_data_out, FLAC__bool unsigned_data_out, const FLAC__int32 * const input[], unsigned wide_samples, unsigned channels, const unsigned source_bps, const unsigned target_bps, const float scale, const FLAC__bool hard_limit, FLAC__bool do_dithering, DitherContext *dither_context);
#endif
flac_LDADD = \
$(NEED_OGGFLAC_LIB) \
$(top_builddir)/src/share/grabbag/libgrabbag.la \
- $(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
$(top_builddir)/src/share/getopt/libgetopt.a \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
+ $(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
$(top_builddir)/src/share/utf8/libutf8.la \
$(top_builddir)/src/libFLAC/libFLAC.la \
@OGG_LIBS@ \
PROGRAM_NAME = flac
ifeq ($(DARWIN_BUILD),yes)
INCLUDES = -I./include -I$(topdir)/include
-LIBS = -lgrabbag -lFLAC -lgain_analysis -lgetopt -lutf8 -lc -lm
+LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lreplaygain_synthesis -lgetopt -lutf8 -lc -lm
else
#@@@ TODO: conditionalize ogg includes, defines, and -logg
ifeq ($(SOLARIS_BUILD),yes)
INCLUDES = -I./include -I$(topdir)/include -I$(HOME)/local/include -DFLAC__HAS_OGG
-LIBS = -lgrabbag -lOggFLAC -lFLAC -lgain_analysis -lgetopt -lutf8 -lm -L$(HOME)/local/lib -logg
+LIBS = -lgrabbag -lOggFLAC -lFLAC -lreplaygain_analysis -lreplaygain_synthesis -lgetopt -lutf8 -lm -L$(HOME)/local/lib -logg
else
#@@@ TODO: conditionalize ogg includes, defines, and -logg
INCLUDES = -I./include -I$(topdir)/include -I$(HOME)/local/include -DFLAC__HAS_OGG
-LIBS = -lgrabbag -lOggFLAC -lFLAC -lgain_analysis -lgetopt -lutf8 -lm -L$(HOME)/local/lib -logg
+LIBS = -lgrabbag -lOggFLAC -lFLAC -lreplaygain_analysis -lreplaygain_synthesis -lgetopt -lutf8 -lm -L$(HOME)/local/lib -logg
endif
endif
#include <string.h> /* for strcmp() */
#include "FLAC/all.h"
#include "share/grabbag.h"
+#include "share/replaygain_synthesis.h"
#include "decode.h"
#ifdef FLAC__HAS_OGG
FLAC__bool is_aiff_out;
FLAC__bool is_wave_out;
FLAC__bool continue_through_decode_errors;
+
+ struct {
+ replaygain_synthesis_spec_t spec;
+ double scale;
+ DitherContext dither_context;
+ } replaygain;
+
FLAC__bool test_only;
FLAC__bool analysis_mode;
analysis_options aopts;
/*
* local routines
*/
-static FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__bool verbose, FLAC__bool is_aiff_out, FLAC__bool is_wave_out, FLAC__bool continue_through_decode_errors, FLAC__bool analysis_mode, analysis_options aopts, utils__SkipUntilSpecification *skip_specification, utils__SkipUntilSpecification *until_specification, const char *infilename, const char *outfilename);
+static FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__bool verbose, FLAC__bool is_aiff_out, FLAC__bool is_wave_out, FLAC__bool continue_through_decode_errors, replaygain_synthesis_spec_t replaygain_synthesis_spec, FLAC__bool analysis_mode, analysis_options aopts, utils__SkipUntilSpecification *skip_specification, utils__SkipUntilSpecification *until_specification, const char *infilename, const char *outfilename);
static void DecoderSession_destroy(DecoderSession *d, FLAC__bool error_occurred);
static FLAC__bool DecoderSession_init_decoder(DecoderSession *d, decode_options_t decode_options, const char *infilename);
static FLAC__bool DecoderSession_process(DecoderSession *d);
/*is_aiff_out=*/true,
/*is_wave_out=*/false,
options.common.continue_through_decode_errors,
+ options.common.replaygain_synthesis_spec,
analysis_mode,
aopts,
&options.common.skip_specification,
/*is_aiff_out=*/false,
/*is_wave_out=*/true,
options.common.continue_through_decode_errors,
+ options.common.replaygain_synthesis_spec,
analysis_mode,
aopts,
&options.common.skip_specification,
/*is_aiff_out=*/false,
/*is_wave_out=*/false,
options.common.continue_through_decode_errors,
+ options.common.replaygain_synthesis_spec,
analysis_mode,
aopts,
&options.common.skip_specification,
return DecoderSession_finish_ok(&decoder_session);
}
-FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__bool verbose, FLAC__bool is_aiff_out, FLAC__bool is_wave_out, FLAC__bool continue_through_decode_errors, FLAC__bool analysis_mode, analysis_options aopts, utils__SkipUntilSpecification *skip_specification, utils__SkipUntilSpecification *until_specification, const char *infilename, const char *outfilename)
+FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__bool verbose, FLAC__bool is_aiff_out, FLAC__bool is_wave_out, FLAC__bool continue_through_decode_errors, replaygain_synthesis_spec_t replaygain_synthesis_spec, FLAC__bool analysis_mode, analysis_options aopts, utils__SkipUntilSpecification *skip_specification, utils__SkipUntilSpecification *until_specification, const char *infilename, const char *outfilename)
{
#ifdef FLAC__HAS_OGG
d->is_ogg = is_ogg;
d->is_aiff_out = is_aiff_out;
d->is_wave_out = is_wave_out;
d->continue_through_decode_errors = continue_through_decode_errors;
+ d->replaygain.spec = replaygain_synthesis_spec;
+ d->replaygain.scale = 0.0;
+ /* d->replaygain.dither_context gets initialized later once we know the sample resolution */
d->test_only = (0 == outfilename);
d->analysis_mode = analysis_mode;
d->aopts = aopts;
if(!decode_options.use_first_serial_number)
OggFLAC__stream_decoder_set_serial_number(decoder_session->decoder.ogg.stream, decode_options.serial_number);
+ if (decoder_session->replaygain.spec.apply)
+ OggFLAC__stream_decoder_set_metadata_respond(decoder_session->decoder.ogg.stream, FLAC__METADATA_TYPE_VORBIS_COMMENT);
OggFLAC__stream_decoder_set_read_callback(decoder_session->decoder.ogg.stream, read_callback);
/*
FLAC__file_decoder_set_md5_checking(decoder_session->decoder.flac.file, true);
FLAC__file_decoder_set_filename(decoder_session->decoder.flac.file, infilename);
+ if (decoder_session->replaygain.spec.apply)
+ FLAC__file_decoder_set_metadata_respond(decoder_session->decoder.flac.file, FLAC__METADATA_TYPE_VORBIS_COMMENT);
/*
* The three ugly casts here are to 'downcast' the 'void *' argument of
* the callback down to 'FLAC__FileDecoder *'.
flac__analyze_frame(frame, decoder_session->frame_counter-1, decoder_session->aopts, fout);
}
else if(!decoder_session->test_only) {
- if(bps == 8) {
+ if (decoder_session->replaygain.spec.apply) {
+ const size_t n = FLAC__replaygain_synthesis__apply_gain(
+ u8buffer,
+ is_big_endian,
+ is_unsigned_samples,
+ buffer,
+ wide_samples,
+ channels,
+ bps, /* source_bps */
+ bps, /* target_bps */
+ decoder_session->replaygain.scale,
+ decoder_session->replaygain.spec.limiter == RGSS_LIMIT__HARD, /* hard_limit */
+ decoder_session->replaygain.spec.noise_shaping != NOISE_SHAPING_NONE, /* do_dithering */
+ &decoder_session->replaygain.dither_context
+ );
+ if(flac__utils_fwrite(u8buffer, 1, n, fout) != n)
+ return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
+ }
+ else if(bps == 8) {
if(is_unsigned_samples) {
for(sample = wide_sample = 0; wide_sample < wide_samples; wide_sample++)
for(channel = 0; channel < channels; channel++, sample++)
}
}
}
+ else if(metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
+ if (decoder_session->replaygain.spec.apply) {
+ double gain, peak;
+ if (!(decoder_session->replaygain.spec.apply = grabbag__replaygain_load_from_vorbiscomment(metadata, decoder_session->replaygain.spec.use_album_gain, &gain, &peak))) {
+ fprintf(stderr, "%s: WARNING: can't get %s ReplayGain tag\n", decoder_session->inbasefilename, decoder_session->replaygain.spec.use_album_gain? "album":"track");
+ }
+ else {
+ const char *ls[] = { "no", "peak", "hard" };
+ const char *ns[] = { "no", "low", "medium", "high" };
+ decoder_session->replaygain.scale = grabbag__replaygain_compute_scale_factor(peak, gain, decoder_session->replaygain.spec.preamp, decoder_session->replaygain.spec.limiter == RGSS_LIMIT__PEAK);
+ assert(decoder_session->bps > 0 && decoder_session->bps <= 32);
+ FLAC__replaygain_synthesis__init_dither_context(&decoder_session->replaygain.dither_context, decoder_session->bps, decoder_session->replaygain.spec.noise_shaping);
+ fprintf(stderr, "%s: INFO: applying %s ReplayGain (gain=%0.2fdB+preamp=%0.1fdB, %s noise shaping, %s limiting) to output\n", decoder_session->inbasefilename, decoder_session->replaygain.spec.use_album_gain? "album":"track", gain, decoder_session->replaygain.spec.preamp, ns[decoder_session->replaygain.spec.noise_shaping], ls[decoder_session->replaygain.spec.limiter]);
+ fprintf(stderr, "%s: WARNING: applying ReplayGain is not lossless\n", decoder_session->inbasefilename);
+ }
+ }
+ }
}
void error_callback(const void *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data)
#include "analyze.h"
#include "utils.h"
+#include "share/replaygain_synthesis.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
typedef struct {
+ FLAC__bool apply;
+ FLAC__bool use_album_gain; /* false => use track gain */
+ enum { RGSS_LIMIT__NONE, RGSS_LIMIT__PEAK, RGSS_LIMIT__HARD} limiter;
+ NoiseShaping noise_shaping;
+ double preamp;
+} replaygain_synthesis_spec_t;
+
+typedef struct {
FLAC__bool verbose;
FLAC__bool continue_through_decode_errors;
+ replaygain_synthesis_spec_t replaygain_synthesis_spec;
#ifdef FLAC__HAS_OGG
FLAC__bool is_ogg;
FLAC__bool use_first_serial_number;
void ogg_file_encoder_progress_callback(const OggFLAC__FileEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data)
{
+ (void)encoder;
+
flac_file_encoder_progress_callback(0, bytes_written, samples_written, frames_written, total_frames_estimate, client_data);
}
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\libOggFLAC_static.lib ..\..\obj\release\lib\libFLAC_static.lib ..\..\obj\release\lib\gain_analysis_static.lib ..\..\obj\release\lib\getopt_static.lib ..\..\obj\release\lib\utf8_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\libOggFLAC_static.lib ..\..\obj\release\lib\libFLAC_static.lib ..\..\obj\release\lib\replaygain_analysis_static.lib ..\..\obj\release\lib\replaygain_synthesis_static.lib ..\..\obj\release\lib\getopt_static.lib ..\..\obj\release\lib\utf8_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /machine:I386\r
\r
!ELSEIF "$(CFG)" == "flac - Win32 Debug"\r
\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\libOggFLAC_static.lib ..\..\obj\debug\lib\libFLAC_static.lib ..\..\obj\debug\lib\gain_analysis_static.lib ..\..\obj\debug\lib\getopt_static.lib ..\..\obj\debug\lib\utf8_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\libOggFLAC_static.lib ..\..\obj\debug\lib\libFLAC_static.lib ..\..\obj\debug\lib\replaygain_analysis_static.lib ..\..\obj\debug\lib\replaygain_synthesis_static.lib ..\..\obj\debug\lib\getopt_static.lib ..\..\obj\debug\lib\utf8_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
\r
!ENDIF \r
\r
/*
* general options
*/
- { "help", 0, 0, 'h' },
- { "explain", 0, 0, 'H' },
- { "version", 0, 0, 'v' },
- { "decode", 0, 0, 'd' },
- { "analyze", 0, 0, 'a' },
- { "test", 0, 0, 't' },
- { "stdout", 0, 0, 'c' },
- { "silent", 0, 0, 's' },
- { "delete-input-file", 0, 0, 0 },
- { "output-prefix", 1, 0, 0 },
- { "output-name", 1, 0, 'o' },
- { "skip", 1, 0, 0 },
- { "until", 1, 0, 0 },
+ { "help" , share__no_argument, 0, 'h' },
+ { "explain" , share__no_argument, 0, 'H' },
+ { "version" , share__no_argument, 0, 'v' },
+ { "decode" , share__no_argument, 0, 'd' },
+ { "analyze" , share__no_argument, 0, 'a' },
+ { "test" , share__no_argument, 0, 't' },
+ { "stdout" , share__no_argument, 0, 'c' },
+ { "silent" , share__no_argument, 0, 's' },
+ { "delete-input-file", share__no_argument, 0, 0 },
+ { "output-prefix" , share__required_argument, 0, 0 },
+ { "output-name" , share__required_argument, 0, 'o' },
+ { "skip" , share__required_argument, 0, 0 },
+ { "until" , share__required_argument, 0, 0 },
/*
* decoding options
*/
- { "decode-through-errors", 0, 0, 'F' },
+ { "decode-through-errors", share__no_argument, 0, 'F' },
+ { "apply-replaygain-which-is-not-lossless", share__optional_argument, 0, 0 }, /* undocumented */
/*
* encoding options
*/
- { "cuesheet", 1, 0, 0 },
- { "no-cued-seekpoints", 0, 0, 0 },
- { "tag", 1, 0, 'T' },
- { "compression-level-0", 0, 0, '0' },
- { "compression-level-1", 0, 0, '1' },
- { "compression-level-2", 0, 0, '2' },
- { "compression-level-3", 0, 0, '3' },
- { "compression-level-4", 0, 0, '4' },
- { "compression-level-5", 0, 0, '5' },
- { "compression-level-6", 0, 0, '6' },
- { "compression-level-7", 0, 0, '7' },
- { "compression-level-8", 0, 0, '8' },
- { "compression-level-9", 0, 0, '9' },
- { "best", 0, 0, '8' },
- { "fast", 0, 0, '0' },
- { "super-secret-totally-impractical-compression-level", 0, 0, 0 },
- { "verify", 0, 0, 'V' },
- { "force-aiff-format", 0, 0, 0 },
- { "force-raw-format", 0, 0, 0 },
- { "lax", 0, 0, 0 },
- { "replay-gain", 0, 0, 0 },
- { "sector-align", 0, 0, 0 },
- { "seekpoint", 1, 0, 'S' },
- { "padding", 1, 0, 'P' },
+ { "cuesheet" , share__required_argument, 0, 0 },
+ { "no-cued-seekpoints" , share__no_argument, 0, 0 },
+ { "tag" , share__required_argument, 0, 'T' },
+ { "compression-level-0" , share__no_argument, 0, '0' },
+ { "compression-level-1" , share__no_argument, 0, '1' },
+ { "compression-level-2" , share__no_argument, 0, '2' },
+ { "compression-level-3" , share__no_argument, 0, '3' },
+ { "compression-level-4" , share__no_argument, 0, '4' },
+ { "compression-level-5" , share__no_argument, 0, '5' },
+ { "compression-level-6" , share__no_argument, 0, '6' },
+ { "compression-level-7" , share__no_argument, 0, '7' },
+ { "compression-level-8" , share__no_argument, 0, '8' },
+ { "compression-level-9" , share__no_argument, 0, '9' },
+ { "best" , share__no_argument, 0, '8' },
+ { "fast" , share__no_argument, 0, '0' },
+ { "super-secret-totally-impractical-compression-level", share__no_argument, 0, 0 },
+ { "verify" , share__no_argument, 0, 'V' },
+ { "force-aiff-format" , share__no_argument, 0, 0 },
+ { "force-raw-format" , share__no_argument, 0, 0 },
+ { "lax" , share__no_argument, 0, 0 },
+ { "replay-gain" , share__no_argument, 0, 0 },
+ { "sector-align" , share__no_argument, 0, 0 },
+ { "seekpoint" , share__required_argument, 0, 'S' },
+ { "padding" , share__required_argument, 0, 'P' },
#ifdef FLAC__HAS_OGG
- { "ogg", 0, 0, 0 },
- { "serial-number", 1, 0, 0 },
+ { "ogg" , share__no_argument, 0, 0 },
+ { "serial-number" , share__required_argument, 0, 0 },
#endif
- { "blocksize", 1, 0, 'b' },
- { "exhaustive-model-search", 0, 0, 'e' },
- { "max-lpc-order", 1, 0, 'l' },
- { "mid-side", 0, 0, 'm' },
- { "adaptive-mid-side", 0, 0, 'M' },
- { "qlp-coeff-precision-search", 0, 0, 'p' },
- { "qlp-coeff-precision", 1, 0, 'q' },
- { "rice-partition-order", 1, 0, 'r' },
- { "endian", 1, 0, 0 },
- { "channels", 1, 0, 0 },
- { "bps", 1, 0, 0 },
- { "sample-rate", 1, 0, 0 },
- { "sign", 1, 0, 0 },
+ { "blocksize" , share__required_argument, 0, 'b' },
+ { "exhaustive-model-search" , share__no_argument, 0, 'e' },
+ { "max-lpc-order" , share__required_argument, 0, 'l' },
+ { "mid-side" , share__no_argument, 0, 'm' },
+ { "adaptive-mid-side" , share__no_argument, 0, 'M' },
+ { "qlp-coeff-precision-search", share__no_argument, 0, 'p' },
+ { "qlp-coeff-precision" , share__required_argument, 0, 'q' },
+ { "rice-partition-order" , share__required_argument, 0, 'r' },
+ { "endian" , share__required_argument, 0, 0 },
+ { "channels" , share__required_argument, 0, 0 },
+ { "bps" , share__required_argument, 0, 0 },
+ { "sample-rate" , share__required_argument, 0, 0 },
+ { "sign" , share__required_argument, 0, 0 },
/*
* analysis options
*/
- { "residual-gnu-plot", 0, 0, 0 },
- { "residual-text", 0, 0, 0 },
+ { "residual-gnu-plot", share__no_argument, 0, 0 },
+ { "residual-text", share__no_argument, 0, 0 },
/*
* negatives
*/
- { "no-decode-through-errors", 0, 0, 0 },
- { "no-silent", 0, 0, 0 },
- { "no-seektable", 0, 0, 0 },
- { "no-delete-input-file", 0, 0, 0 },
- { "no-replay-gain", 0, 0, 0 },
- { "no-sector-align", 0, 0, 0 },
- { "no-lax", 0, 0, 0 },
+ { "no-decode-through-errors" , share__no_argument, 0, 0 },
+ { "no-silent" , share__no_argument, 0, 0 },
+ { "no-seektable" , share__no_argument, 0, 0 },
+ { "no-delete-input-file" , share__no_argument, 0, 0 },
+ { "no-replay-gain" , share__no_argument, 0, 0 },
+ { "no-sector-align" , share__no_argument, 0, 0 },
+ { "no-lax" , share__no_argument, 0, 0 },
#ifdef FLAC__HAS_OGG
- { "no-ogg", 0, 0, 0 },
+ { "no-ogg" , share__no_argument, 0, 0 },
#endif
- { "no-exhaustive-model-search", 0, 0, 0 },
- { "no-mid-side", 0, 0, 0 },
- { "no-adaptive-mid-side", 0, 0, 0 },
- { "no-qlp-coeff-prec-search", 0, 0, 0 },
- { "no-padding", 0, 0, 0 },
- { "no-verify", 0, 0, 0 },
- { "no-residual-gnuplot", 0, 0, 0 },
- { "no-residual-text", 0, 0, 0 },
+ { "no-exhaustive-model-search", share__no_argument, 0, 0 },
+ { "no-mid-side" , share__no_argument, 0, 0 },
+ { "no-adaptive-mid-side" , share__no_argument, 0, 0 },
+ { "no-qlp-coeff-prec-search" , share__no_argument, 0, 0 },
+ { "no-padding" , share__no_argument, 0, 0 },
+ { "no-verify" , share__no_argument, 0, 0 },
+ { "no-residual-gnuplot" , share__no_argument, 0, 0 },
+ { "no-residual-text" , share__no_argument, 0, 0 },
/*
* undocumented debugging options for the test suite
*/
- { "disable-constant-subframes", 0, 0, 0 },
- { "disable-fixed-subframes", 0, 0, 0 },
- { "disable-verbatim-subframes", 0, 0, 0 },
+ { "disable-constant-subframes", share__no_argument, 0, 0 },
+ { "disable-fixed-subframes" , share__no_argument, 0, 0 },
+ { "disable-verbatim-subframes", share__no_argument, 0, 0 },
{0, 0, 0, 0}
};
FLAC__bool verify;
FLAC__bool verbose;
FLAC__bool continue_through_decode_errors;
+ replaygain_synthesis_spec_t replaygain_synthesis_spec;
FLAC__bool lax;
FLAC__bool test_only;
FLAC__bool analyze;
option_values.verify = false;
option_values.verbose = true;
option_values.continue_through_decode_errors = false;
+ option_values.replaygain_synthesis_spec.apply = false;
+ option_values.replaygain_synthesis_spec.use_album_gain = true;
+ option_values.replaygain_synthesis_spec.limiter = RGSS_LIMIT__HARD;
+ option_values.replaygain_synthesis_spec.noise_shaping = NOISE_SHAPING_LOW;
+ option_values.replaygain_synthesis_spec.preamp = 0.0;
option_values.lax = false;
option_values.test_only = false;
option_values.analyze = false;
FLAC__ASSERT(0 != option_argument);
option_values.until_specification = option_argument;
}
+ else if(0 == strcmp(long_option, "apply-replaygain-which-is-not-lossless")) {
+ option_values.replaygain_synthesis_spec.apply = true;
+ if (0 != option_argument) {
+ char *p;
+ option_values.replaygain_synthesis_spec.limiter = RGSS_LIMIT__NONE;
+ option_values.replaygain_synthesis_spec.noise_shaping = NOISE_SHAPING_NONE;
+ option_values.replaygain_synthesis_spec.preamp = strtod(option_argument, &p);
+ for ( ; *p; p++) {
+ if (*p == 'a')
+ option_values.replaygain_synthesis_spec.use_album_gain = true;
+ else if (*p == 't')
+ option_values.replaygain_synthesis_spec.use_album_gain = false;
+ else if (*p == 'l')
+ option_values.replaygain_synthesis_spec.limiter = RGSS_LIMIT__PEAK;
+ else if (*p == 'L')
+ option_values.replaygain_synthesis_spec.limiter = RGSS_LIMIT__HARD;
+ else if (*p == 'n' && p[1] >= '0' && p[1] <= '3') {
+ option_values.replaygain_synthesis_spec.noise_shaping = p[1] - '0';
+ p++;
+ }
+ else
+ return usage_error("ERROR: bad specification string \"%s\" for --%s\n", option_argument, long_option);
+ }
+ }
+ }
else if(0 == strcmp(long_option, "cuesheet")) {
FLAC__ASSERT(0 != option_argument);
option_values.cuesheet_filename = option_argument;
common_options.verbose = option_values.verbose;
common_options.continue_through_decode_errors = option_values.continue_through_decode_errors;
+ common_options.replaygain_synthesis_spec = option_values.replaygain_synthesis_spec;
#ifdef FLAC__HAS_OGG
common_options.is_ogg = treat_as_ogg;
common_options.use_first_serial_number = !option_values.has_serial_number;
/* flac - Command-line FLAC encoder/decoder
*/
+#include <string.h>
+
#include "utils.h"
/* $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $
metaflac_LDADD = \
$(top_builddir)/src/share/grabbag/libgrabbag.la \
- $(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
$(top_builddir)/src/share/getopt/libgetopt.a \
$(top_builddir)/src/share/utf8/libutf8.la \
$(top_builddir)/src/libFLAC/libFLAC.la \
PROGRAM_NAME = metaflac
INCLUDES = -I./include -I$(topdir)/include
-LIBS = -lgrabbag -lFLAC -lgain_analysis -lgetopt -lutf8 -lm
+LIBS = -lgrabbag -lFLAC -lreplaygain_analysis -lgetopt -lutf8 -lm
SRCS_C = \
main.c \
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\libFLAC_static.lib ..\..\obj\release\lib\gain_analysis_static.lib ..\..\obj\release\lib\getopt_static.lib ..\..\obj\release\lib\utf8_static.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\libFLAC_static.lib ..\..\obj\release\lib\replaygain_analysis_static.lib ..\..\obj\release\lib\getopt_static.lib ..\..\obj\release\lib\utf8_static.lib /nologo /subsystem:console /machine:I386\r
\r
!ELSEIF "$(CFG)" == "metaflac - Win32 Debug"\r
\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\libFLAC_static.lib ..\..\obj\debug\lib\gain_analysis_static.lib ..\..\obj\debug\lib\getopt_static.lib ..\..\obj\debug\lib\utf8_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\libFLAC_static.lib ..\..\obj\debug\lib\replaygain_analysis_static.lib ..\..\obj\debug\lib\getopt_static.lib ..\..\obj\debug\lib\utf8_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
\r
!ENDIF \r
\r
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = include .
-
INCLUDES = -I$(top_srcdir)/include @ID3LIB_CFLAGS@
noinst_LTLIBRARIES = libplugin_common.la
id3v1.h \
id3v2.h \
locale_hack.h \
- replaygain_synthesis.h \
vorbiscomment.h
libplugin_common_la_SOURCES = \
dither.c \
id3v1.c \
id3v2.c \
- replaygain_synthesis.c \
vorbiscomment.c
EXTRA_DIST = \
topdir = ../..
LIB_NAME = libplugin_common
-INCLUDES = -I./include -I$(topdir)/include -I$(HOME)/local/include
+INCLUDES = -I$(topdir)/include -I$(HOME)/local/include
DEFINES = -DFLAC__HAS_ID3LIB -DID3LIB_MAJOR=3 -DID3LIB_MINOR=8 -DID3LIB_PATCH=0
SRCS_C = \
dither.c \
id3v1.c \
id3v2.c \
- replaygain_synthesis.c \
vorbiscomment.c
include $(topdir)/build/lib.mk
#include "id3v1.h"
#include "id3v2.h"
#include "locale_hack.h"
-#include "replaygain_synthesis.h"
#include "vorbiscomment.h"
#endif
# End Source File\r
# Begin Source File\r
\r
-SOURCE=.\replaygain_synthesis.c\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=.\vorbiscomment.c\r
# End Source File\r
# End Group\r
# End Source File\r
# Begin Source File\r
\r
-SOURCE=.\replaygain_synthesis.h\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=.\vorbiscomment.h\r
# End Source File\r
# End Group\r
#include "FLAC/all.h"
#include "plugin_common/all.h"
#include "share/grabbag.h"
+#include "share/replaygain_synthesis.h"
#include "config.h"
#include "infobox.h"
#include "tagz.h"
cfg.resolution.normal.dither_24_to_16 ? min(file_info_.bits_per_sample, 16) : file_info_.bits_per_sample;
if (file_info_.has_replaygain && cfg.replaygain.enable && cfg.resolution.replaygain.dither)
- FLAC__plugin_common__init_dither_context(&file_info_.dither_context, file_info_.bits_per_sample, cfg.resolution.replaygain.noise_shaping);
+ FLAC__replaygain_synthesis__init_dither_context(&file_info_.dither_context, file_info_.bits_per_sample, cfg.resolution.replaygain.noise_shaping);
maxlatency = mod_.outMod->Open(file_info_.sample_rate, file_info_.channels, file_info_.output_bits_per_sample, -1, -1);
if (maxlatency < 0) /* error opening device */
unsigned i;
if(cfg.replaygain.enable && file_info_.has_replaygain) {
- bytes = (int)FLAC__plugin_common__apply_gain(
+ bytes = (int)FLAC__replaygain_synthesis__apply_gain(
sample_buffer_,
true, /* little_endian_data_out */
+ target_bps == 8, /* unsigned_data_out */
reservoir_,
n,
channels,
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386\r
-# ADD LINK32 plugin_common_static.lib grabbag_static.lib libFLAC_static.lib gain_analysis_static.lib kernel32.lib user32.lib /nologo /dll /machine:I386 /out:"../../obj/release/bin/in_flac.dll" /libpath:"../../obj/release/lib" /opt:nowin98\r
+# ADD LINK32 plugin_common_static.lib grabbag_static.lib libFLAC_static.lib replaygain_analysis_static.lib replaygain_synthesis_static.lib kernel32.lib user32.lib /nologo /dll /machine:I386 /out:"../../obj/release/bin/in_flac.dll" /libpath:"../../obj/release/lib" /opt:nowin98\r
# SUBTRACT LINK32 /pdb:none\r
\r
!ELSEIF "$(CFG)" == "in_flac - Win32 Debug"\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 plugin_common_static.lib grabbag_static.lib libFLAC_static.lib gain_analysis_static.lib kernel32.lib user32.lib /nologo /dll /debug /machine:I386 /out:"../../obj/debug/bin/in_flac.dll" /pdbtype:sept /libpath:"../../obj/debug/lib"\r
+# ADD LINK32 plugin_common_static.lib grabbag_static.lib libFLAC_static.lib replaygain_analysis_static.lib replaygain_synthesis_static.lib kernel32.lib user32.lib /nologo /dll /debug /machine:I386 /out:"../../obj/debug/bin/in_flac.dll" /pdbtype:sept /libpath:"../../obj/debug/lib"\r
# SUBTRACT LINK32 /pdb:none\r
\r
!ENDIF \r
libxmms_flac_la_LIBADD = \
$(top_builddir)/src/plugin_common/libplugin_common.la \
$(top_builddir)/src/share/grabbag/libgrabbag.la \
- $(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
+ $(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \
$(top_builddir)/src/share/utf8/libutf8.la \
$(top_builddir)/src/libFLAC/libFLAC.la \
-L$(top_builddir)/src/libFLAC/.libs \
LIB_NAME = libxmms-flac
INCLUDES = $(shell xmms-config --cflags) -I./include -I$(topdir)/include -I..
# refer to the static libs explicitly
-LIBS = $(topdir)/obj/$(BUILD)/lib/libFLAC.a $(topdir)/obj/$(BUILD)/lib/libplugin_common.a $(topdir)/obj/$(BUILD)/lib/libgrabbag.a $(topdir)/obj/$(BUILD)/lib/libgain_analysis.a $(HOME)/local/lib/libid3.a -lstdc++ -lz
+LIBS = $(topdir)/obj/$(BUILD)/lib/libFLAC.a $(topdir)/obj/$(BUILD)/lib/libplugin_common.a $(topdir)/obj/$(BUILD)/lib/libgrabbag.a $(topdir)/obj/$(BUILD)/lib/libreplaygain_analysis.a $(topdir)/obj/$(BUILD)/lib/libreplaygain_synthesis.a $(HOME)/local/lib/libid3.a -lstdc++ -lz
SRCS_C = \
charset.c \
#include <xmms/plugin.h>
#include "plugin_common/locale_hack.h"
+#include "share/replaygain_synthesis.h" /* for NOISE_SHAPING_LOW */
#include "charset.h"
#include "configure.h"
/* replaygain */
{
TRUE, /* dither */
- 1, /* noise_shaping */
+ NOISE_SHAPING_LOW, /* noise_shaping */
16 /* bps_out */
}
}
#include "FLAC/all.h"
#include "plugin_common/all.h"
#include "share/grabbag.h"
+#include "share/replaygain_synthesis.h"
#include "configure.h"
#include "wrap_id3.h"
#include "charset.h"
return;
}
}
- FLAC__plugin_common__init_dither_context(&file_info_.dither_context, file_info_.sample_format_bytes_per_sample * 8, flac_cfg.output.resolution.replaygain.noise_shaping);
+ FLAC__replaygain_synthesis__init_dither_context(&file_info_.dither_context, file_info_.sample_format_bytes_per_sample * 8, flac_cfg.output.resolution.replaygain.noise_shaping);
file_info_.is_playing = true;
if(flac_ip.output->open_audio(file_info_.sample_format, file_info_.sample_rate, file_info_.channels) == 0) {
sample_buffer_first_ = 0;
}
sample_buffer_start = sample_buffer_ + sample_buffer_last_ * channels * file_info->sample_format_bytes_per_sample;
- if(file_info_.has_replaygain && flac_cfg.output.replaygain.enable) {
- FLAC__plugin_common__apply_gain(
+ if(file_info->has_replaygain && flac_cfg.output.replaygain.enable) {
+ FLAC__replaygain_synthesis__apply_gain(
sample_buffer_start,
!is_big_endian_host_,
+ file_info->sample_format_bytes_per_sample == 1, /* unsigned_data_out */
buffer,
wide_samples,
channels,
bits_per_sample,
file_info->sample_format_bytes_per_sample * 8,
- file_info_.replay_scale,
+ file_info->replay_scale,
flac_cfg.output.replaygain.hard_limit,
flac_cfg.output.resolution.replaygain.dither,
- &file_info_.dither_context
+ &file_info->dither_context
);
}
else if(is_big_endian_host_) {
else if(metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
double gain, peak;
if(grabbag__replaygain_load_from_vorbiscomment(metadata, flac_cfg.output.replaygain.album_mode, &gain, &peak)) {
- file_info_.has_replaygain = true;
- file_info_.replay_scale = grabbag__replaygain_compute_scale_factor(peak, gain, (double)flac_cfg.output.replaygain.preamp, /*prevent_clipping=*/!flac_cfg.output.replaygain.hard_limit);
+ file_info->has_replaygain = true;
+ file_info->replay_scale = grabbag__replaygain_compute_scale_factor(peak, gain, (double)flac_cfg.output.replaygain.preamp, /*prevent_clipping=*/!flac_cfg.output.replaygain.hard_limit);
}
}
}
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
-SUBDIRS = gain_analysis getopt grabbag utf8
+SUBDIRS = getopt replaygain_analysis replaygain_synthesis grabbag utf8
EXTRA_DIST = \
Makefile.lite \
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
-.PHONY: all gain_analysis getopt grabbag utf8
-all: gain_analysis getopt grabbag utf8
+.PHONY: all getopt grabbag replaygain_analysis replaygain_synthesis utf8
+all: getopt grabbag replaygain_analysis replaygain_synthesis utf8
DEFAULT_CONFIG = release
valgrind: all
release : all
-gain_analysis:
- (cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
-
getopt:
(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
grabbag:
(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
+replaygain_analysis:
+ (cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
+
+replaygain_synthesis:
+ (cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
+
utf8:
(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
clean:
- -(cd gain_analysis ; $(MAKE) -f Makefile.lite clean)
-(cd getopt ; $(MAKE) -f Makefile.lite clean)
-(cd grabbag ; $(MAKE) -f Makefile.lite clean)
+ -(cd replaygain_analysis ; $(MAKE) -f Makefile.lite clean)
+ -(cd replaygain_synthesis ; $(MAKE) -f Makefile.lite clean)
-(cd utf8 ; $(MAKE) -f Makefile.lite clean)
*/
#include "share/grabbag.h"
-#include "share/gain_analysis.h"
+#include "share/replaygain_analysis.h"
#include "FLAC/assert.h"
#include "FLAC/file_decoder.h"
#include "FLAC/metadata.h"
INCLUDES = -I$(top_srcdir)/include/share
-noinst_LTLIBRARIES = libgain_analysis.la
+noinst_LTLIBRARIES = libreplaygain_analysis.la
-libgain_analysis_la_SOURCES = gain_analysis.c
+libreplaygain_analysis_la_SOURCES = replaygain_analysis.c
EXTRA_DIST = \
Makefile.lite \
- gain_analysis_static.dsp
+ replaygain_analysis_static.dsp
debug:
$(MAKE) all CFLAGS="@DEBUG@"
topdir = ../../..
-LIB_NAME = libgain_analysis
+LIB_NAME = libreplaygain_analysis
INCLUDES = -I$(topdir)/include/share
SRCS_C = \
- gain_analysis.c
+ replaygain_analysis.c
include $(topdir)/build/lib.mk
#include <string.h>\r
#include <math.h>\r
\r
-#include "gain_analysis.h"\r
+#include "replaygain_analysis.h"\r
\r
typedef unsigned short Uint16_t;\r
typedef signed short Int16_t;\r
return analyzeResult ( B, sizeof(B)/sizeof(*B) );\r
}\r
\r
-/* end of gain_analysis.c */\r
+/* end of replaygain_analysis.c */\r
-# Microsoft Developer Studio Project File - Name="gain_analysis_static" - Package Owner=<4>\r
+# Microsoft Developer Studio Project File - Name="replaygain_analysis_static" - Package Owner=<4>\r
# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
# ** DO NOT EDIT **\r
\r
# TARGTYPE "Win32 (x86) Static Library" 0x0104\r
\r
-CFG=gain_analysis_static - Win32 Debug\r
+CFG=replaygain_analysis_static - Win32 Debug\r
!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
!MESSAGE use the Export Makefile command and run\r
!MESSAGE \r
-!MESSAGE NMAKE /f "gain_analysis_static.mak".\r
+!MESSAGE NMAKE /f "replaygain_analysis_static.mak".\r
!MESSAGE \r
!MESSAGE You can specify a configuration when running NMAKE\r
!MESSAGE by defining the macro CFG on the command line. For example:\r
!MESSAGE \r
-!MESSAGE NMAKE /f "gain_analysis_static.mak" CFG="gain_analysis_static - Win32 Debug"\r
+!MESSAGE NMAKE /f "replaygain_analysis_static.mak" CFG="replaygain_analysis_static - Win32 Debug"\r
!MESSAGE \r
!MESSAGE Possible choices for configuration are:\r
!MESSAGE \r
-!MESSAGE "gain_analysis_static - Win32 Release" (based on "Win32 (x86) Static Library")\r
-!MESSAGE "gain_analysis_static - Win32 Debug" (based on "Win32 (x86) Static Library")\r
+!MESSAGE "replaygain_analysis_static - Win32 Release" (based on "Win32 (x86) Static Library")\r
+!MESSAGE "replaygain_analysis_static - Win32 Debug" (based on "Win32 (x86) Static Library")\r
!MESSAGE \r
\r
# Begin Project\r
# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName "gain_analysis"\r
+# PROP Scc_ProjName "replaygain_analysis"\r
# PROP Scc_LocalPath "..\..\.."\r
CPP=cl.exe\r
RSC=rc.exe\r
\r
-!IF "$(CFG)" == "gain_analysis_static - Win32 Release"\r
+!IF "$(CFG)" == "replaygain_analysis_static - Win32 Release"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 0\r
# ADD BASE LIB32 /nologo\r
# ADD LIB32 /nologo /nodefaultlib\r
\r
-!ELSEIF "$(CFG)" == "gain_analysis_static - Win32 Debug"\r
+!ELSEIF "$(CFG)" == "replaygain_analysis_static - Win32 Debug"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 1\r
\r
# Begin Target\r
\r
-# Name "gain_analysis_static - Win32 Release"\r
-# Name "gain_analysis_static - Win32 Debug"\r
+# Name "replaygain_analysis_static - Win32 Release"\r
+# Name "replaygain_analysis_static - Win32 Debug"\r
# Begin Group "Source Files"\r
\r
# PROP Default_Filter "c"\r
# Begin Source File\r
\r
-SOURCE=.\gain_analysis.c\r
+SOURCE=.\replaygain_analysis.c\r
# End Source File\r
# End Group\r
# Begin Group "Private Header Files"\r
# PROP Default_Filter ""\r
# Begin Source File\r
\r
-SOURCE=..\..\..\include\share\gain_analysis.h\r
+SOURCE=..\..\..\include\share\replaygain_analysis.h\r
# End Source File\r
# End Group\r
# End Target\r
--- /dev/null
+## Process this file with automake to produce Makefile.in
+
+AUTOMAKE_OPTIONS = foreign
+
+SUBDIRS = include .
+
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/include/share
+
+noinst_LTLIBRARIES = libreplaygain_synthesis.la
+
+libreplaygain_synthesis_la_SOURCES = replaygain_synthesis.c
+
+EXTRA_DIST = \
+ Makefile.lite \
+ replaygain_synthesis_static.dsp
+
+debug:
+ $(MAKE) all CFLAGS="@DEBUG@"
+
+profile:
+ $(MAKE) all CFLAGS="@PROFILE@"
--- /dev/null
+#
+# GNU makefile
+#
+
+topdir = ../../..
+
+LIB_NAME = libreplaygain_synthesis
+INCLUDES = -I./include -I$(topdir)/include -I$(topdir)/include/share
+
+SRCS_C = \
+ replaygain_synthesis.c
+
+include $(topdir)/build/lib.mk
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
-# plugin_common - Routines common to several plugins
+# replaygain_synthesis - Routines for applying ReplayGain to a signal
# Copyright (C) 2002,2003 Josh Coalson
#
# This program is free software; you can redistribute it and/or
-# plugin_common - Routines common to several plugins
+# replaygain_synthesis - Routines for applying ReplayGain to a signal
# Copyright (C) 2002,2003 Josh Coalson
#
# This program is free software; you can redistribute it and/or
-/* plugin_common - Routines common to several plugins
+/* replaygain_synthesis - Routines for applying ReplayGain to a signal
* Copyright (C) 2002,2003 Josh Coalson
*
* This program is free software; you can redistribute it and/or
}
-void FLAC__plugin_common__init_dither_context(DitherContext *d, int bits, int shapingtype)
+void FLAC__replaygain_synthesis__init_dither_context(DitherContext *d, int bits, int shapingtype)
{
static unsigned char default_dither [] = { 92, 92, 88, 84, 81, 78, 74, 67, 0, 0 };
static const float* F [] = { F44_0, F44_1, F44_2, F44_3 };
#endif
-int FLAC__plugin_common__apply_gain(FLAC__byte *data_out, FLAC__bool little_endian_data_out, const FLAC__int32 * const input[], unsigned wide_samples, unsigned channels, const unsigned source_bps, const unsigned target_bps, const float scale, const FLAC__bool hard_limit, FLAC__bool do_dithering, DitherContext *dither_context)
+size_t FLAC__replaygain_synthesis__apply_gain(FLAC__byte *data_out, FLAC__bool little_endian_data_out, FLAC__bool unsigned_data_out, const FLAC__int32 * const input[], unsigned wide_samples, unsigned channels, const unsigned source_bps, const unsigned target_bps, const float scale, const FLAC__bool hard_limit, FLAC__bool do_dithering, DitherContext *dither_context)
{
static const FLAC__int32 conv_factors_[33] = {
-1, /* 0 bits-per-sample (not supported) */
const FLAC__int32 *input_;
double sample;
const unsigned bytes_per_sample = target_bps / 8;
- unsigned inc = bytes_per_sample * channels, last_history_index = dither_context->LastHistoryIndex;
+ const unsigned last_history_index = dither_context->LastHistoryIndex;
NoiseShaping noise_shaping = dither_context->ShapingType;
FLAC__int64 val64;
FLAC__int32 val32;
+ FLAC__int32 uval32;
+ const FLAC__uint32 twiggle = 1u << (target_bps - 1);
- FLAC__ASSERT(channels > 0 && channels <= FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS);
+ FLAC__ASSERT(channels > 0 && channels <= FLAC_SHARE__MAX_SUPPORTED_CHANNELS);
FLAC__ASSERT(source_bps >= 4);
FLAC__ASSERT(target_bps >= 4);
FLAC__ASSERT(source_bps <= 32);
FLAC__ASSERT((target_bps & 7) == 0);
for(channel = 0; channel < channels; channel++) {
+ const unsigned incr = bytes_per_sample * channels;
data_out = start + bytes_per_sample * channel;
input_ = input[channel];
- for(i = 0; i < wide_samples; i++, data_out += inc) {
+ for(i = 0; i < wide_samples; i++, data_out += incr) {
sample = (double)input_[i] * multi_scale;
if(hard_limit) {
else if(val64 < hard_clip_factor)
val32 = (FLAC__int32)hard_clip_factor;
+ uval32 = (FLAC__uint32)val32;
+ if (unsigned_data_out)
+ uval32 ^= twiggle;
+
if (little_endian_data_out) {
switch(target_bps) {
- case 8:
- data_out[0] = val32 ^ 0x80;
- break;
case 24:
- data_out[2] = (FLAC__byte)(val32 >> 16);
+ data_out[2] = (FLAC__byte)(uval32 >> 16);
/* fall through */
case 16:
- data_out[1] = (FLAC__byte)(val32 >> 8);
- data_out[0] = (FLAC__byte)val32;
+ data_out[1] = (FLAC__byte)(uval32 >> 8);
+ /* fall through */
+ case 8:
+ data_out[0] = (FLAC__byte)uval32;
break;
}
}
else {
switch(target_bps) {
- case 8:
- data_out[0] = val32 ^ 0x80;
+ case 24:
+ data_out[0] = (FLAC__byte)(uval32 >> 16);
+ data_out[1] = (FLAC__byte)(uval32 >> 8);
+ data_out[2] = (FLAC__byte)uval32;
break;
case 16:
- data_out[0] = (FLAC__byte)(val32 >> 8);
- data_out[1] = (FLAC__byte)val32;
+ data_out[0] = (FLAC__byte)(uval32 >> 8);
+ data_out[1] = (FLAC__byte)uval32;
break;
- case 24:
- data_out[0] = (FLAC__byte)(val32 >> 16);
- data_out[1] = (FLAC__byte)(val32 >> 8);
- data_out[2] = (FLAC__byte)val32;
+ case 8:
+ data_out[0] = (FLAC__byte)uval32;
break;
}
}
}
dither_context->LastHistoryIndex = (last_history_index + wide_samples) % 32;
- return data_out - start;
+ return wide_samples * channels * (target_bps/8);
}
--- /dev/null
+# Microsoft Developer Studio Project File - Name="replaygain_synthesis_static" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Static Library" 0x0104\r
+\r
+CFG=replaygain_synthesis_static - Win32 Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "replaygain_synthesis_static.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "replaygain_synthesis_static.mak" CFG="replaygain_synthesis_static - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "replaygain_synthesis_static - Win32 Release" (based on "Win32 (x86) Static Library")\r
+!MESSAGE "replaygain_synthesis_static - Win32 Debug" (based on "Win32 (x86) Static Library")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName "replaygain_synthesis"\r
+# PROP Scc_LocalPath "..\..\.."\r
+CPP=cl.exe\r
+RSC=rc.exe\r
+\r
+!IF "$(CFG)" == "replaygain_synthesis_static - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release"\r
+# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "..\..\..\obj\release\lib"\r
+# PROP Intermediate_Dir "Release_static"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c\r
+# ADD CPP /nologo /MD /W3 /GX /O2 /Op /I ".\include" /I "..\..\..\include\share" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c\r
+# ADD BASE RSC /l 0x409 /d "NDEBUG"\r
+# ADD RSC /l 0x409 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo /nodefaultlib\r
+\r
+!ELSEIF "$(CFG)" == "replaygain_synthesis_static - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug"\r
+# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "..\..\..\obj\debug\lib"\r
+# PROP Intermediate_Dir "Debug_static"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c\r
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\include" /I "..\..\..\include\share" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG"\r
+# ADD RSC /l 0x409 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LIB32=link.exe -lib\r
+# ADD BASE LIB32 /nologo\r
+# ADD LIB32 /nologo /nodefaultlib\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "replaygain_synthesis_static - Win32 Release"\r
+# Name "replaygain_synthesis_static - Win32 Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter "c"\r
+# Begin Source File\r
+\r
+SOURCE=.\replaygain_synthesis.c\r
+# End Source File\r
+# End Group\r
+# Begin Group "Private Header Files"\r
+\r
+# PROP Default_Filter ""\r
+# End Group\r
+# Begin Group "Protected Header Files"\r
+\r
+# PROP Default_Filter ""\r
+# End Group\r
+# Begin Group "Public Header Files"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=..\..\..\include\share\replaygain_synthesis.h\r
+# End Source File\r
+# End Group\r
+# End Target\r
+# End Project\r
main.c
test_cuesheet_LDADD = \
$(top_builddir)/src/share/grabbag/libgrabbag.la \
- $(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
$(top_builddir)/src/libFLAC/libFLAC.la \
-lm
PROGRAM_NAME = test_cuesheet
INCLUDES = -I./include -I$(topdir)/include
-LIBS = -lgrabbag -lgain_analysis -lFLAC -lm
+LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lm
SRCS_C = \
main.c
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 ..\..\..\obj\release\lib\grabbag_static.lib ..\..\..\obj\release\lib\gain_analysis_static.lib ..\..\..\obj\release\lib\libFLAC_static.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 ..\..\..\obj\release\lib\grabbag_static.lib ..\..\..\obj\release\lib\replaygain_analysis_static.lib ..\..\..\obj\release\lib\libFLAC_static.lib /nologo /subsystem:console /machine:I386\r
\r
!ELSEIF "$(CFG)" == "test_cuesheet - Win32 Debug"\r
\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 ..\..\..\obj\debug\lib\grabbag_static.lib ..\..\..\obj\debug\lib\gain_analysis_static.lib ..\..\..\obj\debug\lib\libFLAC_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 ..\..\..\obj\debug\lib\grabbag_static.lib ..\..\..\obj\debug\lib\replaygain_analysis_static.lib ..\..\..\obj\debug\lib\libFLAC_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
\r
!ENDIF \r
\r
noinst_PROGRAMS = test_libFLAC++
test_libFLAC___LDADD = \
$(top_builddir)/src/share/grabbag/libgrabbag.la \
- $(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
$(top_builddir)/src/libFLAC++/libFLAC++.la \
$(top_builddir)/src/libFLAC/libFLAC.la \
-lm
PROGRAM_NAME = test_libFLAC++
INCLUDES = -I$(topdir)/include
-LIBS = -lgrabbag -lgain_analysis -lFLAC++ -lFLAC -lm
+LIBS = -lgrabbag -lreplaygain_analysis -lFLAC++ -lFLAC -lm
SRCS_C = \
file_utils.c \
metadata_utils.c
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\gain_analysis_static.lib ..\..\obj\release\lib\libFLAC++_static.lib ..\..\obj\release\lib\libFLAC_static.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\replaygain_analysis_static.lib ..\..\obj\release\lib\libFLAC++_static.lib ..\..\obj\release\lib\libFLAC_static.lib /nologo /subsystem:console /machine:I386\r
\r
!ELSEIF "$(CFG)" == "test_libFLAC++ - Win32 Debug"\r
\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\gain_analysis_static.lib ..\..\obj\debug\lib\libFLAC++_static.lib ..\..\obj\debug\lib\libFLAC_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\replaygain_analysis_static.lib ..\..\obj\debug\lib\libFLAC++_static.lib ..\..\obj\debug\lib\libFLAC_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
\r
!ENDIF \r
\r
noinst_PROGRAMS = test_libFLAC
test_libFLAC_LDADD = \
$(top_builddir)/src/share/grabbag/libgrabbag.la \
- $(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
$(top_builddir)/src/libFLAC/libFLAC.la \
-lm
test_libFLAC_SOURCES = \
PROGRAM_NAME = test_libFLAC
INCLUDES = -I../libFLAC/include -I$(topdir)/include
-LIBS = -lgrabbag -lgain_analysis -lFLAC -lm
+LIBS = -lgrabbag -lreplaygain_analysis -lFLAC -lm
SRCS_C = \
bitbuffer.c \
decoders.c \
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\gain_analysis_static.lib ..\..\obj\release\lib\libFLAC_static.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\replaygain_analysis_static.lib ..\..\obj\release\lib\libFLAC_static.lib /nologo /subsystem:console /machine:I386\r
\r
!ELSEIF "$(CFG)" == "test_libFLAC - Win32 Debug"\r
\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\gain_analysis_static.lib ..\..\obj\debug\lib\libFLAC_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\replaygain_analysis_static.lib ..\..\obj\debug\lib\libFLAC_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
\r
!ENDIF \r
\r
noinst_PROGRAMS = test_libOggFLAC++
test_libOggFLAC___LDADD = \
$(top_builddir)/src/share/grabbag/libgrabbag.la \
- $(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
$(top_builddir)/src/libOggFLAC++/libOggFLAC++.la \
$(top_builddir)/src/libOggFLAC/libOggFLAC.la \
$(top_builddir)/src/libFLAC/libFLAC.la \
PROGRAM_NAME = test_libOggFLAC++
#@@@ TODO: conditionalize ogg lib path and -logg
INCLUDES = -I$(topdir)/include
-LIBS = -lgrabbag -lgain_analysis -lOggFLAC++ -lOggFLAC -lFLAC -L$(HOME)/local/lib -logg -lm
+LIBS = -lgrabbag -lreplaygain_analysis -lOggFLAC++ -lOggFLAC -lFLAC -L$(HOME)/local/lib -logg -lm
SRCS_C = \
file_utils.c \
metadata_utils.c
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\gain_analysis_static.lib ..\..\obj\release\lib\libOggFLAC++_static.lib ..\..\obj\release\lib\libOggFLAC_static.lib ..\..\obj\release\lib\libFLAC++_static.lib ..\..\obj\release\lib\libFLAC_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\replaygain_analysis_static.lib ..\..\obj\release\lib\libOggFLAC++_static.lib ..\..\obj\release\lib\libOggFLAC_static.lib ..\..\obj\release\lib\libFLAC++_static.lib ..\..\obj\release\lib\libFLAC_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /machine:I386\r
\r
!ELSEIF "$(CFG)" == "test_libOggFLAC++ - Win32 Debug"\r
\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\gain_analysis_static.lib ..\..\obj\debug\lib\libOggFLAC++_static.lib ..\..\obj\debug\lib\libOggFLAC_static.lib ..\..\obj\debug\lib\libFLAC++_static.lib ..\..\obj\debug\lib\libFLAC_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\replaygain_analysis_static.lib ..\..\obj\debug\lib\libOggFLAC++_static.lib ..\..\obj\debug\lib\libOggFLAC_static.lib ..\..\obj\debug\lib\libFLAC++_static.lib ..\..\obj\debug\lib\libFLAC_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
\r
!ENDIF \r
\r
noinst_PROGRAMS = test_libOggFLAC
test_libOggFLAC_LDADD = \
$(top_builddir)/src/share/grabbag/libgrabbag.la \
- $(top_builddir)/src/share/gain_analysis/libgain_analysis.la \
+ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \
$(top_builddir)/src/libOggFLAC/libOggFLAC.la \
$(top_builddir)/src/libFLAC/libFLAC.la \
@OGG_LIBS@ \
PROGRAM_NAME = test_libOggFLAC
#@@@ TODO: conditionalize ogg lib path and -logg
INCLUDES = -I$(topdir)/include
-LIBS = -lgrabbag -lgain_analysis -lOggFLAC -lFLAC -L$(HOME)/local/lib -logg -lm
+LIBS = -lgrabbag -lreplaygain_analysis -lOggFLAC -lFLAC -L$(HOME)/local/lib -logg -lm
SRCS_C = \
decoders.c \
encoders.c \
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\gain_analysis_static.lib ..\..\obj\release\lib\libOggFLAC_static.lib ..\..\obj\release\lib\libFLAC_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 ..\..\obj\release\lib\grabbag_static.lib ..\..\obj\release\lib\replaygain_analysis_static.lib ..\..\obj\release\lib\libOggFLAC_static.lib ..\..\obj\release\lib\libFLAC_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /machine:I386\r
\r
!ELSEIF "$(CFG)" == "test_libOggFLAC - Win32 Debug"\r
\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\gain_analysis_static.lib ..\..\obj\debug\lib\libOggFLAC_static.lib ..\..\obj\debug\lib\libFLAC_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 ..\..\obj\debug\lib\grabbag_static.lib ..\..\obj\debug\lib\replaygain_analysis_static.lib ..\..\obj\debug\lib\libOggFLAC_static.lib ..\..\obj\debug\lib\libFLAC_static.lib ..\..\obj\release\lib\ogg_static.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
\r
!ENDIF \r
\r