diff options
| author | luigi2us <luigi2us@gmail.com> | 2009-07-06 12:12:05 +0000 |
|---|---|---|
| committer | luigi2us <luigi2us@gmail.com> | 2009-07-06 12:12:05 +0000 |
| commit | ca51636f5cf67e393f271e7d057f51ceeee10f90 (patch) | |
| tree | 1e4c99b4698951e134c1bf66f84a8d72c8f5b663 /Source | |
| parent | a41c1b2d0a9fab51f8a75ccdb7dba0890f766820 (diff) | |
Put AFCdecodebuffer inside the CUCode_Zelda class.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3690 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
4 files changed, 50 insertions, 70 deletions
diff --git a/Source/Plugins/Plugin_DSP_HLE/Plugin_DSP_HLE.vcproj b/Source/Plugins/Plugin_DSP_HLE/Plugin_DSP_HLE.vcproj index ab6df2c916..1c16f33808 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Plugin_DSP_HLE.vcproj +++ b/Source/Plugins/Plugin_DSP_HLE/Plugin_DSP_HLE.vcproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
+ Version="9,00"
Name="Plugin_DSP_HLE"
ProjectGUID="{D6E56527-BBB9-4EAD-A6EC-49D4BF6AFCD8}"
RootNamespace="Plugin_DSP"
@@ -105,7 +105,7 @@ />
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
@@ -126,16 +126,19 @@ />
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
+ Optimization="2"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="true"
AdditionalIncludeDirectories="../../Core/Common/Src;../../Core/AudioCommon/Src;../../PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
- PreprocessorDefinitions="LOGGING;WIN32;_DEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS;_SECURE_SCL=0"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS;_SECURE_SCL=0"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ EnableEnhancedInstructionSet="2"
FloatingPointModel="0"
UsePrecompiledHeader="2"
AssemblerListingLocation="$(IntDir)\"
@@ -154,18 +157,20 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib rpcrt4.lib comctl32.lib winmm.lib OpenAL32.lib"
- OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_HLED.dll"
- LinkIncremental="2"
- AdditionalLibraryDirectories=""..\..\AudioCommon\$(PlatformName)\$(ConfigurationName)";../../../Externals/OpenAL/Win64/"
+ AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib winmm.lib OpenAL32.lib"
+ OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_HLE.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""..\..\AudioCommon\$(PlatformName)\$(ConfigurationName)";../../../Externals/OpenAL/Win32/"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
- TargetMachine="17"
+ TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
@@ -187,11 +192,11 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="copy ..\..\..\Externals\OpenAL\Win64\OpenAL32.dll ..\..\..\Binary\x64\OpenAL32.dll /Y
copy ..\..\..\Externals\OpenAL\Win64\wrap_oal.dll ..\..\..\Binary\x64\wrap_oal.dll /Y
"
+ CommandLine="copy ..\..\..\Externals\OpenAL\Win32\OpenAL32.dll ..\..\..\Binary\Win32\OpenAL32.dll /Y
copy ..\..\..\Externals\OpenAL\Win32\wrap_oal.dll ..\..\..\Binary\Win32\wrap_oal.dll /Y
"
/>
</Configuration>
<Configuration
- Name="Release|Win32"
+ Name="DebugFast|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
@@ -221,7 +226,7 @@ FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="../../Core/Common/Src;../../Core/AudioCommon/Src;../../PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS;_SECURE_SCL=0"
+ PreprocessorDefinitions="DEBUGFAST;WIN32;NDEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS;_SECURE_SCL=0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
@@ -244,7 +249,7 @@ <Tool
Name="VCLinkerTool"
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib winmm.lib OpenAL32.lib"
- OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_HLE.dll"
+ OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_HLEDF.dll"
LinkIncremental="1"
AdditionalLibraryDirectories=""..\..\AudioCommon\$(PlatformName)\$(ConfigurationName)";../../../Externals/OpenAL/Win32/"
GenerateManifest="false"
@@ -282,7 +287,7 @@ />
</Configuration>
<Configuration
- Name="Release|x64"
+ Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
@@ -307,15 +312,12 @@ />
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="2"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- OmitFramePointers="true"
+ Optimization="0"
AdditionalIncludeDirectories="../../Core/Common/Src;../../Core/AudioCommon/Src;../../PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS;_SECURE_SCL=0"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
+ PreprocessorDefinitions="LOGGING;WIN32;_DEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS;_SECURE_SCL=0"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
FloatingPointModel="0"
UsePrecompiledHeader="2"
AssemblerListingLocation="$(IntDir)\"
@@ -334,16 +336,14 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib winmm.lib OpenAL32.lib"
- OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_HLE.dll"
- LinkIncremental="1"
+ AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib rpcrt4.lib comctl32.lib winmm.lib OpenAL32.lib"
+ OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_HLED.dll"
+ LinkIncremental="2"
AdditionalLibraryDirectories=""..\..\AudioCommon\$(PlatformName)\$(ConfigurationName)";../../../Externals/OpenAL/Win64/"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
@@ -373,7 +373,7 @@ />
</Configuration>
<Configuration
- Name="DebugFast|Win32"
+ Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
@@ -394,6 +394,7 @@ />
<Tool
Name="VCMIDLTool"
+ TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
@@ -403,10 +404,9 @@ FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="../../Core/Common/Src;../../Core/AudioCommon/Src;../../PluginSpecs;..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc"
- PreprocessorDefinitions="DEBUGFAST;WIN32;NDEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS;_SECURE_SCL=0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSP_HLE_EXPORTS;_SECURE_SCL=0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
- EnableEnhancedInstructionSet="2"
FloatingPointModel="0"
UsePrecompiledHeader="2"
AssemblerListingLocation="$(IntDir)\"
@@ -426,9 +426,9 @@ <Tool
Name="VCLinkerTool"
AdditionalDependencies="dxguid.lib dsound.lib dxerr.lib comctl32.lib winmm.lib OpenAL32.lib"
- OutputFile="../../../Binary/Win32/Plugins/Plugin_DSP_HLEDF.dll"
+ OutputFile="../../../Binary/x64/Plugins/Plugin_DSP_HLE.dll"
LinkIncremental="1"
- AdditionalLibraryDirectories=""..\..\AudioCommon\$(PlatformName)\$(ConfigurationName)";../../../Externals/OpenAL/Win32/"
+ AdditionalLibraryDirectories=""..\..\AudioCommon\$(PlatformName)\$(ConfigurationName)";../../../Externals/OpenAL/Win64/"
GenerateManifest="false"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\$(TargetName).pdb"
@@ -438,7 +438,7 @@ RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(PlatformName)\$(ConfigurationName)\$(TargetName).lib"
- TargetMachine="1"
+ TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
@@ -460,7 +460,7 @@ />
<Tool
Name="VCPostBuildEventTool"
- CommandLine="copy ..\..\..\Externals\OpenAL\Win32\OpenAL32.dll ..\..\..\Binary\Win32\OpenAL32.dll /Y
copy ..\..\..\Externals\OpenAL\Win32\wrap_oal.dll ..\..\..\Binary\Win32\wrap_oal.dll /Y
"
+ CommandLine="copy ..\..\..\Externals\OpenAL\Win64\OpenAL32.dll ..\..\..\Binary\x64\OpenAL32.dll /Y
copy ..\..\..\Externals\OpenAL\Win64\wrap_oal.dll ..\..\..\Binary\x64\wrap_oal.dll /Y
"
/>
</Configuration>
<Configuration
@@ -616,7 +616,7 @@ />
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="DebugFast|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -624,7 +624,7 @@ />
</FileConfiguration>
<FileConfiguration
- Name="DebugFast|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -685,10 +685,6 @@ >
</File>
<File
- RelativePath=".\Src\UCodes\UCode_Zelda_ADPCM.h"
- >
- </File>
- <File
RelativePath=".\Src\UCodes\UCode_Zelda_Obsolete.txt"
>
</File>
@@ -822,7 +818,7 @@ />
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -830,7 +826,7 @@ />
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="DebugFast|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -838,7 +834,7 @@ />
</FileConfiguration>
<FileConfiguration
- Name="Release|x64"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -846,7 +842,7 @@ />
</FileConfiguration>
<FileConfiguration
- Name="DebugFast|Win32"
+ Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.h b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.h index 9bd049033b..4b5538a830 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.h @@ -213,6 +213,9 @@ private: void ExecuteList(); + // AFC decoder + void AFCdecodebuffer(const s16 *coef, const char *input, signed short *out, short *histp, short *hist2p, int type); + void ReadVoicePB(u32 _Addr, ZeldaVoicePB& PB); void WritebackVoicePB(u32 _Addr, ZeldaVoicePB& PB); diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp index b611a5c7d5..be5c7c5cf0 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp @@ -16,9 +16,9 @@ // http://code.google.com/p/dolphin-emu/ #include "Common.h" -#include "UCode_Zelda_ADPCM.h" +#include "UCode_Zelda.h" -void AFCdecodebuffer(const s16 *coef, const char *input, signed short *out, short *histp, short *hist2p, int type) +void CUCode_Zelda::AFCdecodebuffer(const s16 *coef, const char *input, signed short *out, short *histp, short *hist2p, int type) { short nibbles[16]; short hist = *histp; @@ -79,6 +79,7 @@ void AFCdecodebuffer(const s16 *coef, const char *input, signed short *out, shor int sample = (delta * nibbles[i]) << 11; sample += ((long)hist * coef[idx * 2]) + ((long)hist2 * coef[idx * 2 + 1]); sample = sample >> 11; + if (sample > 32767) { sample = 32767; } diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.h b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.h deleted file mode 100644 index 0af424494c..0000000000 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (C) 2003-2008 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#include "Common.h" - -void AFCdecodebuffer(const s16 *coef, const char *input, signed short *out, short *histp, short *hist2p, int type); |
