Fix small error in optimized libresample layer

Enable optimizations in release mode
This commit is contained in:
DJRobX 2007-11-05 09:35:09 +00:00
parent db60506ec6
commit d7f7f2b1c0
2 changed files with 19 additions and 9 deletions

View File

@ -158,12 +158,13 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
Optimization="3"
InlineFunctionExpansion="0"
EnableIntrinsicFunctions="false"
FavorSizeOrSpeed="0"
OmitFramePointers="false"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="false"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="&quot;$(SolutionDir)zlib&quot;;&quot;$(SolutionDir)libpng&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;FINAL_VERSION;MMX;_CRT_SECURE_NO_WARNINGS"
IgnoreStandardIncludePath="false"
@ -219,7 +220,7 @@
ShowProgress="0"
OutputFile="$(ProjectDir)VisualBoyAdvance.exe"
Version=""
LinkIncremental="2"
LinkIncremental="0"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=""
GenerateManifest="false"
@ -233,6 +234,7 @@
OptimizeReferences="0"
EnableCOMDATFolding="0"
OptimizeForWindows98="1"
LinkTimeCodeGeneration="1"
TargetMachine="1"
/>
<Tool
@ -425,6 +427,14 @@
<File
RelativePath=".\src\2xSaI.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
WholeProgramOptimization="true"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\src\2xSaImmx.asm"

View File

@ -171,7 +171,7 @@ public:
return filled;
}
void push_back(T sample)
inline void push_back(T sample)
{
if (!buffer) buffer = new T[buffer_size];
buffer[ptr] = sample;
@ -179,13 +179,13 @@ public:
if (filled < buffer_size) filled++;
}
void erase(int count)
inline void erase(int count)
{
if (count > filled) filled = 0;
else filled -= count;
}
T operator[] (int index) const
inline T operator[] (int index) const
{
index += ptr - filled;
if (index < 0) index += buffer_size;
@ -459,7 +459,7 @@ public:
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)
{
samples.erase(used);