Fix small error in optimized libresample layer
Enable optimizations in release mode
This commit is contained in:
parent
db60506ec6
commit
d7f7f2b1c0
20
VBA.vcproj
20
VBA.vcproj
|
@ -158,12 +158,13 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="0"
|
InlineFunctionExpansion="0"
|
||||||
EnableIntrinsicFunctions="false"
|
EnableIntrinsicFunctions="true"
|
||||||
FavorSizeOrSpeed="0"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="false"
|
OmitFramePointers="true"
|
||||||
EnableFiberSafeOptimizations="false"
|
EnableFiberSafeOptimizations="false"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib";"$(SolutionDir)libpng""
|
AdditionalIncludeDirectories=""$(SolutionDir)zlib";"$(SolutionDir)libpng""
|
||||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;FINAL_VERSION;MMX;_CRT_SECURE_NO_WARNINGS"
|
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;FINAL_VERSION;MMX;_CRT_SECURE_NO_WARNINGS"
|
||||||
IgnoreStandardIncludePath="false"
|
IgnoreStandardIncludePath="false"
|
||||||
|
@ -219,7 +220,7 @@
|
||||||
ShowProgress="0"
|
ShowProgress="0"
|
||||||
OutputFile="$(ProjectDir)VisualBoyAdvance.exe"
|
OutputFile="$(ProjectDir)VisualBoyAdvance.exe"
|
||||||
Version=""
|
Version=""
|
||||||
LinkIncremental="2"
|
LinkIncremental="0"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
AdditionalLibraryDirectories=""
|
AdditionalLibraryDirectories=""
|
||||||
GenerateManifest="false"
|
GenerateManifest="false"
|
||||||
|
@ -233,6 +234,7 @@
|
||||||
OptimizeReferences="0"
|
OptimizeReferences="0"
|
||||||
EnableCOMDATFolding="0"
|
EnableCOMDATFolding="0"
|
||||||
OptimizeForWindows98="1"
|
OptimizeForWindows98="1"
|
||||||
|
LinkTimeCodeGeneration="1"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -425,6 +427,14 @@
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\2xSaI.cpp"
|
RelativePath=".\src\2xSaI.cpp"
|
||||||
>
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
WholeProgramOptimization="true"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\2xSaImmx.asm"
|
RelativePath=".\src\2xSaImmx.asm"
|
||||||
|
|
|
@ -171,7 +171,7 @@ public:
|
||||||
return filled;
|
return filled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void push_back(T sample)
|
inline void push_back(T sample)
|
||||||
{
|
{
|
||||||
if (!buffer) buffer = new T[buffer_size];
|
if (!buffer) buffer = new T[buffer_size];
|
||||||
buffer[ptr] = sample;
|
buffer[ptr] = sample;
|
||||||
|
@ -179,13 +179,13 @@ public:
|
||||||
if (filled < buffer_size) filled++;
|
if (filled < buffer_size) filled++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void erase(int count)
|
inline void erase(int count)
|
||||||
{
|
{
|
||||||
if (count > filled) filled = 0;
|
if (count > filled) filled = 0;
|
||||||
else filled -= count;
|
else filled -= count;
|
||||||
}
|
}
|
||||||
|
|
||||||
T operator[] (int index) const
|
inline T operator[] (int index) const
|
||||||
{
|
{
|
||||||
index += ptr - filled;
|
index += ptr - filled;
|
||||||
if (index < 0) index += buffer_size;
|
if (index < 0) index += buffer_size;
|
||||||
|
@ -459,7 +459,7 @@ public:
|
||||||
in[used] = samples[used];
|
in[used] = samples[used];
|
||||||
}
|
}
|
||||||
|
|
||||||
returned = resample_process(resampler, 32767 / lrate, in, count, 0, &used, &out, 1);
|
returned = resample_process(resampler, 32767. / lrate, in, count, 0, &used, &out, 1);
|
||||||
if (used)
|
if (used)
|
||||||
{
|
{
|
||||||
samples.erase(used);
|
samples.erase(used);
|
||||||
|
|
Loading…
Reference in New Issue