mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
add undocumented option --apply-replaygain-which-is-not-lossless to flac; required a lot of reorganization; gain_analysis lib renamed to replaygain_analyis; replaygain_synthesis moved out of plugin_common into its own library in share/
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#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"
|
||||
@@ -151,7 +152,7 @@ int play(char *fn)
|
||||
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 */
|
||||
@@ -354,9 +355,10 @@ static DWORD WINAPI DecodeThread(void *unused)
|
||||
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,
|
||||
|
||||
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "in_flac - Win32 Debug"
|
||||
@@ -80,7 +80,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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"
|
||||
# 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"
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
Reference in New Issue
Block a user