forked from metin2/client
Solution refactoring and restructuring, removed Boost dependency, removed unused tools
This commit is contained in:
476
src/MilesLib/MilesLib.vcxproj
Normal file
476
src/MilesLib/MilesLib.vcxproj
Normal file
@ -0,0 +1,476 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Distribute|Win32">
|
||||
<Configuration>Distribute</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MfcDebug|Win32">
|
||||
<Configuration>MfcDebug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="MfcRelease|Win32">
|
||||
<Configuration>MfcRelease</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="VTune|Win32">
|
||||
<Configuration>VTune</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<ProjectName>MilesLib</ProjectName>
|
||||
<ProjectGuid>{9189BA90-1997-4B47-A673-A54C7DF4A4F7}</ProjectGuid>
|
||||
<RootNamespace>MilesLib</RootNamespace>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<Keyword>MFCProj</Keyword>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>17.0.32203.90</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">
|
||||
<OutDir>$(SolutionDir)build\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">
|
||||
<OutDir>$(SolutionDir)build\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)build\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">
|
||||
<OutDir>$(SolutionDir)build\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">
|
||||
<OutDir>$(SolutionDir)build\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)build\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<VcpkgUseStatic>true</VcpkgUseStatic>
|
||||
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">
|
||||
<VcpkgUseStatic>true</VcpkgUseStatic>
|
||||
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<VcpkgUseStatic>true</VcpkgUseStatic>
|
||||
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<PrecompiledHeaderOutputFile>.\Distribute/mileslib.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerOutput>All</AssemblerOutput>
|
||||
<AssemblerListingLocation>.\Distribute/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Distribute/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Distribute/</ProgramDataBaseFileName>
|
||||
<BrowseInformation />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>/Gs %(AdditionalOptions)</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.;../../extern/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<PrecompiledHeaderOutputFile>.\VTune/mileslib.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerOutput>All</AssemblerOutput>
|
||||
<AssemblerListingLocation>.\VTune/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\VTune/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\VTune/</ProgramDataBaseFileName>
|
||||
<BrowseInformation />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>.\VTune\mileslib.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<PrecompiledHeaderOutputFile>.\Release/mileslib.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Release/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
|
||||
<BrowseInformation />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>.;../../extern/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>.\MfcRelease/mileslib.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerOutput>All</AssemblerOutput>
|
||||
<AssemblerListingLocation>.\MfcRelease/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\MfcRelease/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\MfcRelease/</ProgramDataBaseFileName>
|
||||
<BrowseInformation />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>.\MfcRelease\mileslib.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.;../../extern/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>.\mileslib___Win32_MfcDebug/mileslib.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\mileslib___Win32_MfcDebug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\mileslib___Win32_MfcDebug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\mileslib___Win32_MfcDebug/</ProgramDataBaseFileName>
|
||||
<BrowseInformation />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>.\mileslib___Win32_MfcDebug\mileslib.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)extern\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>.\Debug/mileslib.pch</PrecompiledHeaderOutputFile>
|
||||
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
|
||||
<ObjectFileName>.\Debug/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
|
||||
<BrowseInformation />
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
<IgnoreStandardIncludePath>true</IgnoreStandardIncludePath>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SoundBase.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundData.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundInstance2D.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundInstance3D.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundInstanceStream.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundManager.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundManager2D.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundManager3D.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundManagerStream.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Stdafx.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">stdafx.h</PrecompiledHeaderFile>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Create</PrecompiledHeader>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">Create</PrecompiledHeader>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">stdafx.h</PrecompiledHeaderFile>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">stdafx.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Type.cpp">
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">Disabled</Optimization>
|
||||
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">EnableFastChecks</BasicRuntimeChecks>
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='MfcDebug|Win32'">true</BrowseInformation>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='MfcRelease|Win32'">MaxSpeed</Optimization>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='VTune|Win32'">Size</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="SoundBase.h" />
|
||||
<ClInclude Include="SoundData.h" />
|
||||
<ClInclude Include="SoundInstance.h" />
|
||||
<ClInclude Include="SoundManager.h" />
|
||||
<ClInclude Include="SoundManager2D.h" />
|
||||
<ClInclude Include="SoundManager3D.h" />
|
||||
<ClInclude Include="SoundManagerStream.h" />
|
||||
<ClInclude Include="Stdafx.h" />
|
||||
<ClInclude Include="Type.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
77
src/MilesLib/MilesLib.vcxproj.filters
Normal file
77
src/MilesLib/MilesLib.vcxproj.filters
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{e555325f-fd61-4925-884c-473a6efa95be}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{23c5ddaa-4f1c-42f7-870b-66284bd92045}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SoundBase.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundData.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundInstance2D.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundInstance3D.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundInstanceStream.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundManager.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundManager2D.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundManager3D.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SoundManagerStream.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Type.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="SoundBase.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SoundData.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SoundInstance.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SoundManager.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SoundManager2D.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SoundManager3D.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SoundManagerStream.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Type.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
70
src/MilesLib/SoundBase.cpp
Normal file
70
src/MilesLib/SoundBase.cpp
Normal file
@ -0,0 +1,70 @@
|
||||
#include "Stdafx.h"
|
||||
#include "SoundBase.h"
|
||||
|
||||
HDIGDRIVER CSoundBase::ms_DIGDriver = NULL;
|
||||
TSoundDataMap CSoundBase::ms_dataMap;
|
||||
TProvider * CSoundBase::ms_pProviderDefault = NULL;
|
||||
std::vector<TProvider> CSoundBase::ms_ProviderVector;
|
||||
bool CSoundBase::ms_bInitialized = false;
|
||||
int CSoundBase::ms_iRefCount = 0;
|
||||
|
||||
CSoundBase::CSoundBase()
|
||||
{
|
||||
}
|
||||
|
||||
CSoundBase::~CSoundBase()
|
||||
{
|
||||
}
|
||||
|
||||
void CSoundBase::Destroy()
|
||||
{
|
||||
if (ms_iRefCount > 1)
|
||||
{
|
||||
--ms_iRefCount;
|
||||
return;
|
||||
}
|
||||
|
||||
ms_iRefCount = 0;
|
||||
|
||||
if (!ms_dataMap.empty())
|
||||
{
|
||||
TSoundDataMap::iterator i;
|
||||
for (i = ms_dataMap.begin(); i != ms_dataMap.end(); ++i)
|
||||
{
|
||||
CSoundData * pSoundData = i->second;
|
||||
delete pSoundData;
|
||||
}
|
||||
|
||||
ms_dataMap.clear();
|
||||
}
|
||||
|
||||
AIL_shutdown();
|
||||
}
|
||||
|
||||
void CSoundBase::Initialize()
|
||||
{
|
||||
++ms_iRefCount;
|
||||
|
||||
if (ms_iRefCount > 1)
|
||||
return;
|
||||
|
||||
AIL_set_redist_directory("miles");
|
||||
AIL_startup();
|
||||
|
||||
ms_ProviderVector.clear();
|
||||
ms_dataMap.clear();
|
||||
|
||||
}
|
||||
|
||||
DWORD CSoundBase::GetFileCRC(const char * filename)
|
||||
{
|
||||
return GetCRC32(filename, strlen(filename));
|
||||
}
|
||||
|
||||
CSoundData * CSoundBase::AddFile(DWORD dwFileCRC, const char* filename)
|
||||
{
|
||||
CSoundData * pSoundData = new CSoundData;
|
||||
pSoundData->Assign(filename);
|
||||
ms_dataMap.insert(TSoundDataMap::value_type(dwFileCRC, pSoundData));
|
||||
return pSoundData;
|
||||
}
|
37
src/MilesLib/SoundBase.h
Normal file
37
src/MilesLib/SoundBase.h
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef __MILESLIB_CSOUNDBASE_H__
|
||||
#define __MILESLIB_CSOUNDBASE_H__
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "SoundData.h"
|
||||
|
||||
typedef struct SProvider
|
||||
{
|
||||
char* name;
|
||||
HPROVIDER hProvider;
|
||||
} TProvider;
|
||||
|
||||
typedef std::map<DWORD, CSoundData*> TSoundDataMap;
|
||||
|
||||
class CSoundBase
|
||||
{
|
||||
public:
|
||||
CSoundBase();
|
||||
virtual ~CSoundBase();
|
||||
|
||||
void Initialize();
|
||||
void Destroy();
|
||||
|
||||
CSoundData * AddFile(DWORD dwFileCRC, const char* filename);
|
||||
DWORD GetFileCRC(const char* filename);
|
||||
|
||||
protected:
|
||||
static int ms_iRefCount;
|
||||
static HDIGDRIVER ms_DIGDriver;
|
||||
static TProvider * ms_pProviderDefault;
|
||||
static std::vector<TProvider> ms_ProviderVector;
|
||||
static TSoundDataMap ms_dataMap;
|
||||
static bool ms_bInitialized;
|
||||
};
|
||||
|
||||
#endif
|
212
src/MilesLib/SoundData.cpp
Normal file
212
src/MilesLib/SoundData.cpp
Normal file
@ -0,0 +1,212 @@
|
||||
#include "StdAfx.h"
|
||||
#include "SoundData.h"
|
||||
|
||||
#include "../EterPack/EterPackManager.h"
|
||||
#include "../eterBase/Timer.h"
|
||||
|
||||
bool CSoundData::ms_isSoundFile[SOUND_FILE_MAX_NUM];
|
||||
CMappedFile CSoundData::ms_SoundFile[SOUND_FILE_MAX_NUM];
|
||||
|
||||
const char * CSoundData::GetFileName()
|
||||
{
|
||||
return m_filename;
|
||||
}
|
||||
|
||||
void CSoundData::Assign(const char* filename)
|
||||
{
|
||||
assert(m_assigned == false);
|
||||
|
||||
strncpy(m_filename, filename, sizeof(m_filename)-1);
|
||||
m_assigned = true;
|
||||
}
|
||||
|
||||
LPVOID CSoundData::Get()
|
||||
{
|
||||
++m_iRefCount;
|
||||
m_dwAccessTime = ELTimer_GetMSec();
|
||||
|
||||
if (!m_data)
|
||||
ReadFromDisk();
|
||||
|
||||
if (m_flag & FLAG_DATA_SIZE)
|
||||
return ((S32 *) m_data + 1);
|
||||
else
|
||||
return (m_data);
|
||||
}
|
||||
|
||||
ULONG CSoundData::GetSize()
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
void CSoundData::Release()
|
||||
{
|
||||
assert(m_iRefCount != 0);
|
||||
--m_iRefCount;
|
||||
m_dwAccessTime = ELTimer_GetMSec();
|
||||
}
|
||||
|
||||
DWORD CSoundData::GetPlayTime()
|
||||
{
|
||||
return m_dwPlayTime;
|
||||
}
|
||||
|
||||
void CSoundData::SetPlayTime(DWORD dwPlayTime)
|
||||
{
|
||||
m_dwPlayTime = dwPlayTime;
|
||||
}
|
||||
|
||||
DWORD CSoundData::GetAccessTime()
|
||||
{
|
||||
return m_dwAccessTime;
|
||||
}
|
||||
|
||||
bool CSoundData::ReadFromDisk()
|
||||
{
|
||||
assert(m_assigned == true);
|
||||
|
||||
LARGE_INTEGER start;
|
||||
QueryPerformanceCounter(&start);
|
||||
|
||||
U32* s = (U32 *) AIL_file_read(m_filename, FILE_READ_WITH_SIZE);
|
||||
|
||||
if (s == NULL)
|
||||
return false;
|
||||
|
||||
S32 type = AIL_file_type(s + 1, s[0]);
|
||||
AILSOUNDINFO info;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case AILFILETYPE_PCM_WAV:
|
||||
{
|
||||
m_data = s;
|
||||
m_size = *((S32 *) s);
|
||||
m_flag |= FLAG_DATA_SIZE;
|
||||
}
|
||||
break;
|
||||
|
||||
case AILFILETYPE_ADPCM_WAV: // 3D <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> decompress <20>ؾ<EFBFBD> <20><>.
|
||||
{
|
||||
AIL_WAV_info(s + 1, &info);
|
||||
AIL_decompress_ADPCM(&info, &m_data, &m_size);
|
||||
AIL_mem_free_lock(s);
|
||||
}
|
||||
break;
|
||||
|
||||
case AILFILETYPE_MPEG_L3_AUDIO:
|
||||
{
|
||||
AIL_decompress_ASI(s + 1, *((S32 *) s), m_filename, &m_data, &m_size, 0);
|
||||
AIL_mem_free_lock(s);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(!"Unknown File Type");
|
||||
AIL_mem_free_lock(s);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSoundData::isSlotIndex(DWORD dwIndex)
|
||||
{
|
||||
if (dwIndex >= SOUND_FILE_MAX_NUM)
|
||||
return false;
|
||||
|
||||
if (!ms_isSoundFile[dwIndex])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int CSoundData::GetEmptySlotIndex()
|
||||
{
|
||||
for (int i = 0; i < SOUND_FILE_MAX_NUM; ++i)
|
||||
{
|
||||
if (!ms_isSoundFile[i])
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
U32 AILCALLBACK CSoundData::open_callback(char const * filename, U32 *file_handle)
|
||||
{
|
||||
int iIndex = GetEmptySlotIndex();
|
||||
|
||||
if (-1 == iIndex)
|
||||
return 0;
|
||||
|
||||
LPCVOID pMap;
|
||||
|
||||
if (!CEterPackManager::Instance().Get(ms_SoundFile[iIndex], filename, &pMap))
|
||||
return 0;
|
||||
|
||||
ms_isSoundFile[iIndex] = true;
|
||||
|
||||
*file_handle = iIndex;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void AILCALLBACK CSoundData::close_callback(U32 file_handle)
|
||||
{
|
||||
if (!isSlotIndex(file_handle))
|
||||
return;
|
||||
|
||||
ms_SoundFile[file_handle].Destroy();
|
||||
ms_isSoundFile[file_handle] = false;
|
||||
}
|
||||
|
||||
S32 AILCALLBACK CSoundData::seek_callback(U32 file_handle, S32 offset, U32 type)
|
||||
{
|
||||
if (!isSlotIndex(file_handle))
|
||||
return 0;
|
||||
|
||||
return ms_SoundFile[file_handle].Seek(offset, type);
|
||||
}
|
||||
|
||||
U32 AILCALLBACK CSoundData::read_callback(U32 file_handle, void * buffer, U32 bytes)
|
||||
{
|
||||
if (!isSlotIndex(file_handle))
|
||||
return 0;
|
||||
|
||||
DWORD dwRealSize = min(ms_SoundFile[file_handle].Size(), bytes);
|
||||
ms_SoundFile[file_handle].Read(buffer, dwRealSize);
|
||||
return dwRealSize;
|
||||
}
|
||||
|
||||
void CSoundData::SetPackMode()
|
||||
{
|
||||
// if sound data reads from pack file, the callbacks of the MSS should be changed.
|
||||
AIL_set_file_callbacks(open_callback, close_callback, seek_callback, read_callback);
|
||||
|
||||
for (int i = 0; i < SOUND_FILE_MAX_NUM; ++i)
|
||||
ms_isSoundFile[i] = false;
|
||||
}
|
||||
|
||||
void CSoundData::Destroy()
|
||||
{
|
||||
if (m_data)
|
||||
{
|
||||
AIL_mem_free_lock(m_data);
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
CSoundData::CSoundData() :
|
||||
m_assigned(false),
|
||||
m_iRefCount(0),
|
||||
m_dwPlayTime(0),
|
||||
m_dwAccessTime(ELTimer_GetMSec()),
|
||||
m_size(0),
|
||||
m_data(NULL),
|
||||
m_flag(0)
|
||||
{
|
||||
}
|
||||
|
||||
CSoundData::~CSoundData()
|
||||
{
|
||||
Destroy();
|
||||
}
|
59
src/MilesLib/SoundData.h
Normal file
59
src/MilesLib/SoundData.h
Normal file
@ -0,0 +1,59 @@
|
||||
#ifndef __MILESLIB_CSOUNDDATA_H__
|
||||
#define __MILESLIB_CSOUNDDATA_H__
|
||||
|
||||
#include <mss.h>
|
||||
#include "../eterBase/MappedFile.h"
|
||||
|
||||
class CSoundData
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
FLAG_DATA_SIZE = 1,
|
||||
SOUND_FILE_MAX_NUM = 5,
|
||||
};
|
||||
|
||||
public:
|
||||
static void SetPackMode();
|
||||
|
||||
CSoundData();
|
||||
virtual ~CSoundData();
|
||||
|
||||
void Assign(const char* filename);
|
||||
LPVOID Get();
|
||||
ULONG GetSize();
|
||||
void Release();
|
||||
DWORD GetAccessTime();
|
||||
const char * GetFileName();
|
||||
|
||||
void SetPlayTime(DWORD dwPlayTime);
|
||||
DWORD GetPlayTime();
|
||||
|
||||
protected:
|
||||
bool ReadFromDisk();
|
||||
void Destroy();
|
||||
|
||||
protected:
|
||||
char m_filename[128];
|
||||
int m_iRefCount;
|
||||
DWORD m_dwAccessTime;
|
||||
DWORD m_dwPlayTime;
|
||||
ULONG m_size;
|
||||
LPVOID m_data;
|
||||
long m_flag;
|
||||
bool m_assigned;
|
||||
|
||||
private:
|
||||
static U32 AILCALLBACK open_callback(char const * filename, U32 *file_handle);
|
||||
static void AILCALLBACK close_callback(U32 file_handle);
|
||||
static S32 AILCALLBACK seek_callback(U32 file_handle, S32 offset, U32 type);
|
||||
static U32 AILCALLBACK read_callback(U32 file_handle, void *buffer, U32 bytes);
|
||||
|
||||
static bool isSlotIndex(DWORD dwIndex);
|
||||
static int GetEmptySlotIndex();
|
||||
|
||||
static bool ms_isSoundFile[SOUND_FILE_MAX_NUM];
|
||||
static CMappedFile ms_SoundFile[SOUND_FILE_MAX_NUM];
|
||||
};
|
||||
|
||||
#endif
|
118
src/MilesLib/SoundInstance.h
Normal file
118
src/MilesLib/SoundInstance.h
Normal file
@ -0,0 +1,118 @@
|
||||
#ifndef __MILESLIB_CSOUNDINSTANCE_H__
|
||||
#define __MILESLIB_CSOUNDINSTANCE_H__
|
||||
|
||||
#include "SoundBase.h"
|
||||
|
||||
class ISoundInstance : public CSoundBase
|
||||
{
|
||||
public:
|
||||
ISoundInstance() {}
|
||||
virtual ~ISoundInstance() {}
|
||||
|
||||
virtual bool Initialize() = 0;
|
||||
virtual void Destroy() = 0;
|
||||
virtual bool SetSound(CSoundData* pSound) = 0;
|
||||
virtual void Play(int iLoopCount = 1, DWORD dwPlayCycleTimeLimit = 0) const = 0;
|
||||
virtual void Pause() const = 0;
|
||||
virtual void Resume() const = 0;
|
||||
virtual void Stop() = 0;
|
||||
virtual void GetVolume(float& rfVolume) const = 0;
|
||||
virtual void SetVolume(float volume) const = 0;
|
||||
virtual bool IsDone() const = 0;
|
||||
virtual void SetPosition(float x, float y, float z) const = 0;
|
||||
virtual void SetOrientation(float x_face, float y_face, float z_face,
|
||||
float x_normal, float y_normal, float z_normal) const = 0;
|
||||
virtual void SetVelocity(float x, float y, float z, float fMagnitude) const = 0;
|
||||
};
|
||||
|
||||
class CSoundInstance2D : public ISoundInstance
|
||||
{
|
||||
public:
|
||||
CSoundInstance2D();
|
||||
virtual ~CSoundInstance2D();
|
||||
|
||||
public: // from interface
|
||||
bool Initialize();
|
||||
void Destroy();
|
||||
|
||||
bool SetSound(CSoundData* pSound);
|
||||
void Play(int iLoopCount = 1, DWORD dwPlayCycleTimeLimit = 0) const;
|
||||
void Pause() const;
|
||||
void Resume() const;
|
||||
void Stop();
|
||||
void GetVolume(float& rfVolume) const;
|
||||
void SetVolume(float volume) const;
|
||||
bool IsDone() const;
|
||||
void SetPosition(float x, float y, float z) const;
|
||||
void SetOrientation(float x_face, float y_face, float z_face,
|
||||
float x_normal, float y_normal, float z_normal) const;
|
||||
void SetVelocity(float fx, float fy, float fz, float fMagnitude) const;
|
||||
|
||||
private:
|
||||
HSAMPLE m_sample;
|
||||
CSoundData* m_pSoundData;
|
||||
};
|
||||
|
||||
class CSoundInstance3D : public ISoundInstance
|
||||
{
|
||||
public:
|
||||
CSoundInstance3D();
|
||||
virtual ~CSoundInstance3D();
|
||||
|
||||
public: // from interface
|
||||
bool Initialize();
|
||||
void Destroy();
|
||||
|
||||
bool SetSound(CSoundData * pSound);
|
||||
void Play(int iLoopCount = 1, DWORD dwPlayCycleTimeLimit = 0) const;
|
||||
void Pause() const;
|
||||
void Resume() const;
|
||||
void Stop();
|
||||
void GetVolume(float& rfVolume) const;
|
||||
void SetVolume(float volume) const;
|
||||
bool IsDone() const;
|
||||
|
||||
void SetPosition(float x, float y, float z) const;
|
||||
void SetOrientation(float x_face, float y_face, float z_face,
|
||||
float x_normal, float y_normal, float z_normal) const;
|
||||
void SetVelocity(float fx, float fy, float fz, float fMagnitude) const;
|
||||
|
||||
void UpdatePosition(float fElapsedTime);
|
||||
|
||||
private:
|
||||
H3DSAMPLE m_sample;
|
||||
CSoundData * m_pSoundData;
|
||||
};
|
||||
|
||||
class CSoundInstanceStream : public ISoundInstance
|
||||
{
|
||||
public:
|
||||
CSoundInstanceStream();
|
||||
virtual ~CSoundInstanceStream();
|
||||
|
||||
public: // from interface
|
||||
bool Initialize();
|
||||
void Destroy();
|
||||
|
||||
void SetStream(HSTREAM stream);
|
||||
bool SetSound(CSoundData* pSound);
|
||||
|
||||
void Play(int iLoopCount = 1, DWORD dwPlayCycleTimeLimit = 0) const;
|
||||
void Pause() const;
|
||||
void Resume() const;
|
||||
void Stop();
|
||||
void GetVolume(float& rfVolume) const;
|
||||
void SetVolume(float volume) const;
|
||||
bool IsDone() const;
|
||||
bool IsData() const;
|
||||
|
||||
void SetPosition(float x, float y, float z) const;
|
||||
void SetOrientation(float x_face, float y_face, float z_face,
|
||||
float x_normal, float y_normal, float z_normal) const;
|
||||
void SetVelocity(float fx, float fy, float fz, float fMagnitude) const;
|
||||
|
||||
private:
|
||||
HSTREAM m_stream;
|
||||
};
|
||||
|
||||
#endif
|
121
src/MilesLib/SoundInstance2D.cpp
Normal file
121
src/MilesLib/SoundInstance2D.cpp
Normal file
@ -0,0 +1,121 @@
|
||||
#include "stdafx.h"
|
||||
#include "SoundManager2D.h"
|
||||
|
||||
CSoundInstance2D::CSoundInstance2D() : m_sample(NULL), m_pSoundData(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
CSoundInstance2D::~CSoundInstance2D()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void CSoundInstance2D::Destroy()
|
||||
{
|
||||
SAFE_RELEASE(m_pSoundData);
|
||||
|
||||
if (m_sample)
|
||||
{
|
||||
AIL_release_sample_handle(m_sample);
|
||||
m_sample = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool CSoundInstance2D::Initialize()
|
||||
{
|
||||
if (m_sample)
|
||||
return true;
|
||||
|
||||
m_sample = AIL_allocate_sample_handle(ms_DIGDriver);
|
||||
return m_sample ? true : false;
|
||||
}
|
||||
|
||||
bool CSoundInstance2D::SetSound(CSoundData * pSoundData)
|
||||
{
|
||||
assert(m_sample != NULL && pSoundData != NULL);
|
||||
|
||||
// <20><><EFBFBD>۷<EFBFBD><DBB7><EFBFBD> ī<><C4AB>Ʈ<EFBFBD><C6AE> 1<><31> <20><> <20><> <20>ε带 <20>ؾ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20>ǹǷ<C7B9> <20>ݵ<EFBFBD><DDB5><EFBFBD> Get<65><74> ȣ<><C8A3> <20>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
// <20><>, m_pSoundData<74><61> pSoundData<74><61> <20><><EFBFBD><EFBFBD> m_pSoundData<74><61> <20><><EFBFBD>۷<EFBFBD><DBB7><EFBFBD>
|
||||
// ī<><C4AB><EFBFBD>Ͱ<EFBFBD> 1<><31> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD>ʿ<EFBFBD><CABF>ϰ<EFBFBD> <20>ε尡 <20>Ͼ<CFBE>Ƿ<EFBFBD> <20≯<EFBFBD> <20><><EFBFBD>۷<EFBFBD><DBB7><EFBFBD>
|
||||
// ī<><C4AB><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
LPVOID lpData = pSoundData->Get();
|
||||
|
||||
AIL_init_sample(m_sample);
|
||||
|
||||
if (AIL_set_sample_file(m_sample, lpData, pSoundData->GetSize()) == NULL)
|
||||
{
|
||||
if (m_pSoundData != NULL)
|
||||
{
|
||||
m_pSoundData->Release();
|
||||
m_pSoundData = NULL;
|
||||
}
|
||||
|
||||
pSoundData->Release();
|
||||
TraceError("%s: %s", AIL_last_error(), pSoundData->GetFileName());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_pSoundData != NULL)
|
||||
{
|
||||
m_pSoundData->Release();
|
||||
m_pSoundData = NULL;
|
||||
}
|
||||
|
||||
m_pSoundData = pSoundData;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSoundInstance2D::IsDone() const
|
||||
{
|
||||
return AIL_sample_status(m_sample) == SMP_DONE;
|
||||
}
|
||||
|
||||
void CSoundInstance2D::Play(int iLoopCount, DWORD dwPlayCycleTimeLimit) const
|
||||
{
|
||||
AIL_set_sample_loop_count(m_sample, iLoopCount);
|
||||
AIL_start_sample(m_sample);
|
||||
}
|
||||
|
||||
void CSoundInstance2D::Pause() const
|
||||
{
|
||||
AIL_stop_sample(m_sample);
|
||||
}
|
||||
|
||||
void CSoundInstance2D::Resume() const
|
||||
{
|
||||
AIL_resume_sample(m_sample);
|
||||
}
|
||||
|
||||
void CSoundInstance2D::Stop()
|
||||
{
|
||||
AIL_end_sample(m_sample);
|
||||
m_sample = NULL;
|
||||
}
|
||||
|
||||
void CSoundInstance2D::GetVolume(float& rfVolume) const
|
||||
{
|
||||
AIL_sample_volume_pan(m_sample, &rfVolume, NULL);
|
||||
}
|
||||
|
||||
void CSoundInstance2D::SetVolume(float volume) const
|
||||
{
|
||||
volume = max(0.0f, min(1.0f, volume));
|
||||
AIL_set_sample_volume_pan(m_sample, volume, 0.5f);
|
||||
}
|
||||
|
||||
void CSoundInstance2D::SetPosition(float x, float y, float z) const
|
||||
{
|
||||
assert(!"must not call this method");
|
||||
}
|
||||
|
||||
void CSoundInstance2D::SetOrientation(float x_face, float y_face, float z_face,
|
||||
float x_normal, float y_normal, float z_normal) const
|
||||
{
|
||||
assert(!"must not call this method");
|
||||
}
|
||||
|
||||
void CSoundInstance2D::SetVelocity(float fx, float fy, float fz, float fMagnitude) const
|
||||
{
|
||||
assert(!"must not call this method");
|
||||
}
|
137
src/MilesLib/SoundInstance3D.cpp
Normal file
137
src/MilesLib/SoundInstance3D.cpp
Normal file
@ -0,0 +1,137 @@
|
||||
#include "stdafx.h"
|
||||
#include "SoundManager3D.h"
|
||||
#include "../eterBase/Timer.h"
|
||||
|
||||
CSoundInstance3D::CSoundInstance3D() : m_sample(NULL), m_pSoundData(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
CSoundInstance3D::~CSoundInstance3D()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void CSoundInstance3D::Destroy()
|
||||
{
|
||||
SAFE_RELEASE(m_pSoundData);
|
||||
|
||||
if (m_sample)
|
||||
{
|
||||
AIL_release_3D_sample_handle(m_sample);
|
||||
m_sample = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool CSoundInstance3D::Initialize()
|
||||
{
|
||||
if (m_sample)
|
||||
return true;
|
||||
|
||||
m_sample = AIL_allocate_3D_sample_handle(ms_pProviderDefault->hProvider);
|
||||
return m_sample ? true : false;
|
||||
}
|
||||
|
||||
bool CSoundInstance3D::SetSound(CSoundData* pSoundData)
|
||||
{
|
||||
assert(m_sample != NULL && pSoundData != NULL);
|
||||
|
||||
// <20><><EFBFBD>۷<EFBFBD><DBB7><EFBFBD> ī<><C4AB>Ʈ<EFBFBD><C6AE> 1<><31> <20><> <20><> <20>ε带 <20>ؾ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20>ǹǷ<C7B9> <20>ݵ<EFBFBD><DDB5><EFBFBD> Get<65><74> ȣ<><C8A3> <20>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
// <20><>, m_pSoundData<74><61> pSoundData<74><61> <20><><EFBFBD><EFBFBD> m_pSoundData<74><61> <20><><EFBFBD>۷<EFBFBD><DBB7><EFBFBD>
|
||||
// ī<><C4AB><EFBFBD>Ͱ<EFBFBD> 1<><31> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD>ʿ<EFBFBD><CABF>ϰ<EFBFBD> <20>ε尡 <20>Ͼ<CFBE>Ƿ<EFBFBD> <20≯<EFBFBD> <20><><EFBFBD>۷<EFBFBD><DBB7><EFBFBD>
|
||||
// ī<><C4AB><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
||||
LPVOID lpData = pSoundData->Get();
|
||||
|
||||
if (m_pSoundData != NULL)
|
||||
{
|
||||
m_pSoundData->Release();
|
||||
m_pSoundData = NULL;
|
||||
}
|
||||
|
||||
if (AIL_set_3D_sample_file(m_sample, lpData) == NULL)
|
||||
{
|
||||
TraceError("%s: %s", AIL_last_error(), pSoundData->GetFileName());
|
||||
pSoundData->Release();
|
||||
return false;
|
||||
}
|
||||
|
||||
m_pSoundData = pSoundData;
|
||||
|
||||
AIL_set_3D_position(m_sample, 0.0F, 0.0F, 0.0F);
|
||||
AIL_auto_update_3D_position(m_sample, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSoundInstance3D::IsDone() const
|
||||
{
|
||||
return AIL_3D_sample_status(m_sample) == SMP_DONE;
|
||||
}
|
||||
|
||||
void CSoundInstance3D::Play(int iLoopCount, DWORD dwPlayCycleTimeLimit) const
|
||||
{
|
||||
if (!m_pSoundData)
|
||||
return;
|
||||
|
||||
DWORD dwCurTime = ELTimer_GetMSec();
|
||||
|
||||
if (dwCurTime - m_pSoundData->GetPlayTime() < dwPlayCycleTimeLimit)
|
||||
return;
|
||||
|
||||
m_pSoundData->SetPlayTime(dwCurTime);
|
||||
|
||||
AIL_set_3D_sample_loop_count(m_sample, iLoopCount);
|
||||
AIL_start_3D_sample(m_sample);
|
||||
}
|
||||
|
||||
void CSoundInstance3D::Pause() const
|
||||
{
|
||||
AIL_stop_3D_sample(m_sample);
|
||||
}
|
||||
|
||||
void CSoundInstance3D::Resume() const
|
||||
{
|
||||
AIL_resume_3D_sample(m_sample);
|
||||
}
|
||||
|
||||
void CSoundInstance3D::Stop()
|
||||
{
|
||||
AIL_end_3D_sample(m_sample);
|
||||
// m_sample = NULL;
|
||||
// NOTE : IsDone<6E><65> üũ<C3BC>Ϸ<EFBFBD><CFB7><EFBFBD> m_sample<6C><65> <20><><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE><EFBFBD> <20>մϴ<D5B4> - [levites]
|
||||
}
|
||||
|
||||
void CSoundInstance3D::GetVolume(float& rfVolume) const
|
||||
{
|
||||
rfVolume = AIL_3D_sample_volume(m_sample);
|
||||
}
|
||||
|
||||
void CSoundInstance3D::SetVolume(float volume) const
|
||||
{
|
||||
volume = max(0.0f, min(1.0f, volume));
|
||||
AIL_set_3D_sample_volume(m_sample, volume);
|
||||
}
|
||||
|
||||
void CSoundInstance3D::SetPosition(float x, float y, float z) const
|
||||
{
|
||||
AIL_set_3D_position(m_sample, x, y, -z);
|
||||
}
|
||||
|
||||
void CSoundInstance3D::SetOrientation(float x_face, float y_face, float z_face,
|
||||
float x_normal, float y_normal, float z_normal) const
|
||||
{
|
||||
assert(!" CSoundInstance3D::SetOrientation - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20>Լ<EFBFBD>");
|
||||
// AIL_set_3D_orientation(m_sample,
|
||||
// x_face, y_face, z_face,
|
||||
// x_normal, y_normal, z_normal);
|
||||
}
|
||||
|
||||
void CSoundInstance3D::SetVelocity(float fDistanceX, float fDistanceY, float fDistanceZ, float fNagnitude) const
|
||||
{
|
||||
AIL_set_3D_velocity(m_sample, fDistanceX, fDistanceY, fDistanceZ, fNagnitude);
|
||||
AIL_auto_update_3D_position(m_sample, 1);
|
||||
}
|
||||
|
||||
void CSoundInstance3D::UpdatePosition(float fElapsedTime)
|
||||
{
|
||||
AIL_update_3D_position(m_sample, fElapsedTime);
|
||||
}
|
114
src/MilesLib/SoundInstanceStream.cpp
Normal file
114
src/MilesLib/SoundInstanceStream.cpp
Normal file
@ -0,0 +1,114 @@
|
||||
#include "stdafx.h"
|
||||
#include "SoundInstance.h"
|
||||
|
||||
CSoundInstanceStream::CSoundInstanceStream() : m_stream(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
CSoundInstanceStream::~CSoundInstanceStream()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::Destroy()
|
||||
{
|
||||
if (m_stream != NULL)
|
||||
{
|
||||
AIL_close_stream(m_stream);
|
||||
m_stream = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool CSoundInstanceStream::Initialize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::SetStream(HSTREAM stream)
|
||||
{
|
||||
m_stream = stream;
|
||||
}
|
||||
|
||||
bool CSoundInstanceStream::IsDone() const
|
||||
{
|
||||
return AIL_stream_status(m_stream) == -1;
|
||||
}
|
||||
|
||||
bool CSoundInstanceStream::IsData() const
|
||||
{
|
||||
if (m_stream)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::Play(int count, DWORD dwPlayCycleTimeLimit) const
|
||||
{
|
||||
if (!IsData())
|
||||
return;
|
||||
|
||||
AIL_set_stream_loop_count(m_stream, count);
|
||||
AIL_start_stream(m_stream);
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::Pause() const
|
||||
{
|
||||
if (!IsData())
|
||||
return;
|
||||
|
||||
AIL_pause_stream(m_stream, 1);
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::Resume() const
|
||||
{
|
||||
if (!IsData())
|
||||
return;
|
||||
|
||||
AIL_pause_stream(m_stream, 0);
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::Stop()
|
||||
{
|
||||
if (!IsData())
|
||||
return;
|
||||
|
||||
AIL_close_stream(m_stream);
|
||||
m_stream = NULL;
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::GetVolume(float& rfVolume) const
|
||||
{
|
||||
float tmp;
|
||||
|
||||
if (!IsData())
|
||||
return;
|
||||
|
||||
AIL_stream_volume_levels(m_stream, &rfVolume, &tmp);
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::SetVolume(float volume) const
|
||||
{
|
||||
if (!IsData())
|
||||
return;
|
||||
|
||||
volume = max(0.0f, min(1.0f, volume));
|
||||
AIL_set_stream_volume_levels(m_stream, volume, volume);
|
||||
}
|
||||
|
||||
bool CSoundInstanceStream::SetSound(CSoundData* pSound)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::SetPosition(float x, float y, float z) const
|
||||
{
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::SetOrientation(float x_face, float y_face, float z_face,
|
||||
float x_normal, float y_normal, float z_normal) const
|
||||
{
|
||||
}
|
||||
|
||||
void CSoundInstanceStream::SetVelocity(float fx, float fy, float fz, float fMagnitude) const
|
||||
{
|
||||
}
|
643
src/MilesLib/SoundManager.cpp
Normal file
643
src/MilesLib/SoundManager.cpp
Normal file
@ -0,0 +1,643 @@
|
||||
#include "StdAfx.h"
|
||||
#include <math.h>
|
||||
|
||||
#include "SoundManager.h"
|
||||
#include "../EterBase/Timer.h"
|
||||
|
||||
CSoundManager2D CSoundManager::ms_SoundManager2D;
|
||||
CSoundManager3D CSoundManager::ms_SoundManager3D;
|
||||
CSoundManagerStream CSoundManager::ms_SoundManagerStream;
|
||||
|
||||
CSoundManager::CSoundManager()
|
||||
{
|
||||
m_bInitialized = FALSE;
|
||||
m_isSoundDisable = FALSE;
|
||||
|
||||
m_fxPosition = 0.0f;
|
||||
m_fyPosition = 0.0f;
|
||||
m_fzPosition = 0.0f;
|
||||
|
||||
m_fSoundScale = 200.0f;
|
||||
m_fAmbienceSoundScale = 1000.0f;
|
||||
m_fSoundVolume = 1.0f;
|
||||
m_fMusicVolume = 1.0f;
|
||||
|
||||
m_fBackupMusicVolume = 0.0f;
|
||||
m_fBackupSoundVolume = 0.0f;
|
||||
|
||||
for (int i = 0; i < CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM; ++i)
|
||||
{
|
||||
TMusicInstance & rInstance = m_MusicInstances[i];
|
||||
rInstance.dwMusicFileNameCRC = 0;
|
||||
rInstance.MusicState = MUSIC_STATE_OFF;
|
||||
rInstance.fVolume = 0.0f;
|
||||
rInstance.fVolumeSpeed = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
CSoundManager::~CSoundManager()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL CSoundManager::Create()
|
||||
{
|
||||
if (!ms_SoundManager2D.Initialize()) {
|
||||
Tracen("CSoundManager::Create - Sound2D::Initialize - FAILURE");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!ms_SoundManagerStream.Initialize())
|
||||
{
|
||||
Tracen("CSoundManager::Create - SoundStream::Initialize - FAILURE");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!ms_SoundManager3D.Initialize())
|
||||
{
|
||||
Tracen("CSoundManager::Create - Sound3D::Initialize - FAILURE");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CSoundManager::Destroy()
|
||||
{
|
||||
ms_SoundManagerStream.Destroy();
|
||||
ms_SoundManager3D.Destroy();
|
||||
ms_SoundManager2D.Destroy();
|
||||
}
|
||||
|
||||
void CSoundManager::SetPosition(float fx, float fy, float fz)
|
||||
{
|
||||
m_fxPosition = fx;
|
||||
m_fyPosition = fy;
|
||||
m_fzPosition = fz;
|
||||
}
|
||||
|
||||
void CSoundManager::SetDirection(float fxDir, float fyDir, float fzDir, float fxUp, float fyUp, float fzUp)
|
||||
{
|
||||
ms_SoundManager3D.SetListenerDirection(fxDir, fyDir, fzDir, fxUp, fyUp, fzUp);
|
||||
}
|
||||
|
||||
void CSoundManager::Update()
|
||||
{
|
||||
// Update Information about 3D Sound
|
||||
ms_SoundManager3D.SetListenerPosition(0.0f, 0.0f, 0.0f);
|
||||
|
||||
for (int i = 0; i < CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM; ++i)
|
||||
{
|
||||
TMusicInstance & rMusicInstance = m_MusicInstances[i];
|
||||
if (MUSIC_STATE_OFF == rMusicInstance.MusicState)
|
||||
continue;
|
||||
|
||||
switch (rMusicInstance.MusicState)
|
||||
{
|
||||
case MUSIC_STATE_FADE_IN:
|
||||
rMusicInstance.fVolume += rMusicInstance.fVolumeSpeed;
|
||||
|
||||
if (rMusicInstance.fVolume >= GetMusicVolume())
|
||||
{
|
||||
rMusicInstance.fVolume = GetMusicVolume();
|
||||
rMusicInstance.fVolumeSpeed = 0.0f;
|
||||
rMusicInstance.MusicState = MUSIC_STATE_PLAY;
|
||||
}
|
||||
|
||||
{
|
||||
CSoundInstanceStream * pInstance = ms_SoundManagerStream.GetInstance(i);
|
||||
if (pInstance)
|
||||
pInstance->SetVolume(rMusicInstance.fVolume);
|
||||
}
|
||||
break;
|
||||
|
||||
case MUSIC_STATE_FADE_LIMIT_OUT:
|
||||
rMusicInstance.fVolume -= rMusicInstance.fVolumeSpeed;
|
||||
if (rMusicInstance.fVolume <= rMusicInstance.fLimitVolume)
|
||||
{
|
||||
rMusicInstance.fVolume = rMusicInstance.fLimitVolume;
|
||||
rMusicInstance.fVolumeSpeed = 0.0f;
|
||||
rMusicInstance.MusicState = MUSIC_STATE_PLAY;
|
||||
}
|
||||
{
|
||||
CSoundInstanceStream * pInstance = ms_SoundManagerStream.GetInstance(i);
|
||||
if (pInstance)
|
||||
pInstance->SetVolume(rMusicInstance.fVolume);
|
||||
}
|
||||
break;
|
||||
case MUSIC_STATE_FADE_OUT:
|
||||
rMusicInstance.fVolume -= rMusicInstance.fVolumeSpeed;
|
||||
if (rMusicInstance.fVolume <= 0.0f)
|
||||
{
|
||||
rMusicInstance.fVolume = 0.0f;
|
||||
rMusicInstance.fVolumeSpeed = 0.0f;
|
||||
rMusicInstance.MusicState = MUSIC_STATE_OFF;
|
||||
|
||||
StopMusic(i);
|
||||
}
|
||||
{
|
||||
CSoundInstanceStream * pInstance = ms_SoundManagerStream.GetInstance(i);
|
||||
if (pInstance)
|
||||
pInstance->SetVolume(rMusicInstance.fVolume);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CSoundManager::UpdateSoundData(DWORD dwcurTime, const NSound::TSoundDataVector * c_pSoundDataVector)
|
||||
{
|
||||
assert(!"CSoundManager::UpdateSoundData");
|
||||
}
|
||||
|
||||
void CSoundManager::UpdateSoundData(float fx, float fy, float fz, DWORD dwcurTime, const NSound::TSoundDataVector * c_pSoundDataVector)
|
||||
{
|
||||
assert(!"CSoundManager::UpdateSoundData");
|
||||
}
|
||||
|
||||
void CSoundManager::UpdateSoundInstance(float fx, float fy, float fz, DWORD dwcurFrame, const NSound::TSoundInstanceVector * c_pSoundInstanceVector, BOOL bCheckFrequency)
|
||||
{
|
||||
for (DWORD i = 0; i < c_pSoundInstanceVector->size(); ++i)
|
||||
{
|
||||
const NSound::TSoundInstance & c_rSoundInstance = c_pSoundInstanceVector->at(i);
|
||||
if (c_rSoundInstance.dwFrame == dwcurFrame)
|
||||
{
|
||||
//Tracenf("PLAY SOUND %s", c_rSoundInstance.strSoundFileName.c_str());
|
||||
PlayCharacterSound3D(fx, fy, fz, c_rSoundInstance.strSoundFileName.c_str(), bCheckFrequency);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CSoundManager::UpdateSoundInstance(DWORD dwcurFrame, const NSound::TSoundInstanceVector * c_pSoundInstanceVector)
|
||||
{
|
||||
for (DWORD i = 0; i < c_pSoundInstanceVector->size(); ++i)
|
||||
{
|
||||
const NSound::TSoundInstance & c_rSoundInstance = c_pSoundInstanceVector->at(i);
|
||||
|
||||
if (c_rSoundInstance.dwFrame == dwcurFrame)
|
||||
{
|
||||
PlaySound2D(c_rSoundInstance.strSoundFileName.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float CSoundManager::GetSoundScale()
|
||||
{
|
||||
return m_fSoundScale;
|
||||
}
|
||||
|
||||
void CSoundManager::SetSoundScale(float fScale)
|
||||
{
|
||||
m_fSoundScale = fScale;
|
||||
}
|
||||
|
||||
void CSoundManager::SetAmbienceSoundScale(float fScale)
|
||||
{
|
||||
m_fAmbienceSoundScale = fScale;
|
||||
}
|
||||
|
||||
void CSoundManager::SetSoundVolume(float fVolume)
|
||||
{
|
||||
if (m_isSoundDisable)
|
||||
{
|
||||
m_fBackupSoundVolume = fVolume;
|
||||
return;
|
||||
}
|
||||
|
||||
fVolume = fMAX(fVolume, 0.0f);
|
||||
fVolume = fMIN(fVolume, 1.0f);
|
||||
m_fSoundVolume = fVolume;
|
||||
|
||||
if (!m_isSoundDisable)
|
||||
{
|
||||
m_fBackupSoundVolume = fVolume;
|
||||
}
|
||||
}
|
||||
|
||||
void CSoundManager::__SetMusicVolume(float fVolume)
|
||||
{
|
||||
if (m_isSoundDisable)
|
||||
{
|
||||
m_fBackupMusicVolume = fVolume;
|
||||
return;
|
||||
}
|
||||
|
||||
fVolume = fMAX(fVolume, 0.0f);
|
||||
fVolume = fMIN(fVolume, 1.0f);
|
||||
m_fMusicVolume = fVolume;
|
||||
|
||||
if (!m_isSoundDisable)
|
||||
{
|
||||
m_fBackupMusicVolume = fVolume;
|
||||
}
|
||||
|
||||
for (int i = 0; i < CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM; ++i)
|
||||
{
|
||||
TMusicInstance & rMusicInstance = m_MusicInstances[i];
|
||||
if (MUSIC_STATE_OFF == rMusicInstance.MusicState)
|
||||
continue;
|
||||
if (MUSIC_STATE_FADE_OUT == rMusicInstance.MusicState)
|
||||
continue;
|
||||
|
||||
rMusicInstance.fVolume = fVolume;
|
||||
|
||||
CSoundInstanceStream * pInstance = ms_SoundManagerStream.GetInstance(i);
|
||||
if (pInstance)
|
||||
pInstance->SetVolume(fVolume);
|
||||
}
|
||||
}
|
||||
|
||||
float CSoundManager::__ConvertRatioVolumeToApplyVolume(float fRatioVolume)
|
||||
{
|
||||
if (0.1f>fRatioVolume)
|
||||
return fRatioVolume;
|
||||
|
||||
return (float)pow(10.0f, (-1.0f + fRatioVolume));
|
||||
}
|
||||
|
||||
float CSoundManager::__ConvertGradeVolumeToApplyVolume(int nGradeVolume)
|
||||
{
|
||||
return __ConvertRatioVolumeToApplyVolume(nGradeVolume/5.0f);
|
||||
}
|
||||
|
||||
|
||||
void CSoundManager::SetSoundVolumeGrade(int iGrade)
|
||||
{
|
||||
float fVolume=__ConvertGradeVolumeToApplyVolume(iGrade);
|
||||
SetSoundVolume(fVolume);
|
||||
}
|
||||
|
||||
//void CSoundManager::SetMusicVolumeGrade(int iGrade)
|
||||
//{
|
||||
// float fVolume=__ConvertGradeVolumeToApplyVolume(iGrade);
|
||||
// __SetMusicVolume(fVolume);
|
||||
//}
|
||||
|
||||
void CSoundManager::SetSoundVolumeRatio(float fRatio)
|
||||
{
|
||||
float fVolume = __ConvertRatioVolumeToApplyVolume(fRatio);
|
||||
SetSoundVolume(fVolume);
|
||||
}
|
||||
|
||||
void CSoundManager::SetMusicVolume(float fVolume)
|
||||
{
|
||||
//float fVolume = __ConvertRatioVolumeToApplyVolume(fRatio);
|
||||
__SetMusicVolume(fVolume);
|
||||
}
|
||||
|
||||
float CSoundManager::GetSoundVolume()
|
||||
{
|
||||
return m_fSoundVolume;
|
||||
}
|
||||
|
||||
float CSoundManager::GetMusicVolume()
|
||||
{
|
||||
return m_fMusicVolume;
|
||||
}
|
||||
|
||||
BOOL CSoundManager::GetSoundInstance2D(const char * c_szSoundFileName, ISoundInstance ** ppInstance)
|
||||
{
|
||||
*ppInstance = ms_SoundManager2D.GetInstance(c_szSoundFileName);
|
||||
|
||||
if (!*ppInstance)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL CSoundManager::GetSoundInstance3D(const char * c_szFileName, ISoundInstance ** ppInstance)
|
||||
{
|
||||
int iIndex = ms_SoundManager3D.SetInstance(c_szFileName);
|
||||
|
||||
if (-1 == iIndex)
|
||||
return FALSE;
|
||||
|
||||
*ppInstance = ms_SoundManager3D.GetInstance(iIndex);
|
||||
|
||||
if (!*ppInstance)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CSoundManager::PlaySound2D(const char * c_szFileName)
|
||||
{
|
||||
if (0.0f == GetSoundVolume())
|
||||
return;
|
||||
|
||||
ISoundInstance * pInstance;
|
||||
if (!GetSoundInstance2D(c_szFileName, &pInstance))
|
||||
return;
|
||||
|
||||
pInstance->SetVolume(GetSoundVolume());
|
||||
pInstance->Play(1);
|
||||
}
|
||||
|
||||
void CSoundManager::PlaySound3D(float fx, float fy, float fz, const char * c_szFileName, int iPlayCount)
|
||||
{
|
||||
if (0.0f == GetSoundVolume())
|
||||
return;
|
||||
|
||||
int iIndex = ms_SoundManager3D.SetInstance(c_szFileName);
|
||||
if (-1 == iIndex)
|
||||
return;
|
||||
|
||||
ISoundInstance * pInstance = ms_SoundManager3D.GetInstance(iIndex);
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
pInstance->SetPosition((fx - m_fxPosition) / m_fSoundScale,
|
||||
(fy - m_fyPosition) / m_fSoundScale,
|
||||
(fz - m_fzPosition) / m_fSoundScale);
|
||||
|
||||
pInstance->SetVolume(GetSoundVolume());
|
||||
pInstance->Play(iPlayCount);
|
||||
}
|
||||
|
||||
int CSoundManager::PlayAmbienceSound3D(float fx, float fy, float fz, const char * c_szFileName, int iPlayCount)
|
||||
{
|
||||
if (0.0f == GetSoundVolume())
|
||||
return -1;
|
||||
|
||||
int iIndex = ms_SoundManager3D.SetInstance(c_szFileName);
|
||||
if (-1 == iIndex)
|
||||
return -1;
|
||||
|
||||
ISoundInstance * pInstance = ms_SoundManager3D.GetInstance(iIndex);
|
||||
if (!pInstance)
|
||||
return -1;
|
||||
|
||||
pInstance->SetPosition((fx - m_fxPosition) / m_fAmbienceSoundScale,
|
||||
(fy - m_fyPosition) / m_fAmbienceSoundScale,
|
||||
(fz - m_fzPosition) / m_fAmbienceSoundScale);
|
||||
|
||||
pInstance->SetVolume(GetSoundVolume());
|
||||
pInstance->Play(iPlayCount);
|
||||
|
||||
return iIndex;
|
||||
}
|
||||
|
||||
void CSoundManager::PlayCharacterSound3D(float fx, float fy, float fz, const char * c_szFileName, BOOL bCheckFrequency)
|
||||
{
|
||||
if (0.0f == GetSoundVolume())
|
||||
return;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȭ<EFBFBD><C8AD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> - [levites]
|
||||
if (bCheckFrequency)
|
||||
{
|
||||
static float s_fLimitDistance = 5000*5000;
|
||||
float fdx = (fx - m_fxPosition) * (fx - m_fxPosition);
|
||||
float fdy = (fy - m_fyPosition) * (fy - m_fyPosition);
|
||||
|
||||
if (fdx+fdy > s_fLimitDistance)
|
||||
return;
|
||||
|
||||
std::map<std::string, float>::iterator itor = m_PlaySoundHistoryMap.find(c_szFileName);
|
||||
if (m_PlaySoundHistoryMap.end() != itor)
|
||||
{
|
||||
float fTime = itor->second;
|
||||
if (CTimer::Instance().GetCurrentSecond() - fTime < 0.3f)
|
||||
{
|
||||
//Tracef("<22>Ȱ<EFBFBD><C8B0><EFBFBD> <20>Ҹ<EFBFBD><D2B8><EFBFBD> 0.3<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ٽ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD> %s\n", c_szFileName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
m_PlaySoundHistoryMap.erase(c_szFileName);
|
||||
m_PlaySoundHistoryMap.insert(std::map<std::string, float>::value_type(c_szFileName, CTimer::Instance().GetCurrentSecond()));
|
||||
}
|
||||
|
||||
ISoundInstance * pInstance;
|
||||
|
||||
if (!GetSoundInstance3D(c_szFileName, &pInstance))
|
||||
return;
|
||||
|
||||
pInstance->SetPosition((fx - m_fxPosition) / m_fSoundScale,
|
||||
(fy - m_fyPosition) / m_fSoundScale,
|
||||
(fz - m_fzPosition) / m_fSoundScale);
|
||||
|
||||
pInstance->SetVolume(GetSoundVolume());
|
||||
pInstance->Play(1);
|
||||
}
|
||||
|
||||
void CSoundManager::StopSound3D(int iIndex)
|
||||
{
|
||||
ISoundInstance * pInstance = ms_SoundManager3D.GetInstance(iIndex);
|
||||
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
pInstance->Stop();
|
||||
//bool bisDone = pInstance->IsDone();
|
||||
}
|
||||
|
||||
void CSoundManager::SetSoundVolume3D(int iIndex, float fVolume)
|
||||
{
|
||||
ISoundInstance * pInstance = ms_SoundManager3D.GetInstance(iIndex);
|
||||
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
pInstance->SetVolume(fVolume);
|
||||
}
|
||||
|
||||
void CSoundManager::StopAllSound3D()
|
||||
{
|
||||
for (int i = 0; i < CSoundManager3D::INSTANCE_MAX_COUNT; ++i)
|
||||
{
|
||||
StopSound3D(i);
|
||||
}
|
||||
}
|
||||
|
||||
void CSoundManager::PlayMusic(const char * c_szFileName)
|
||||
{
|
||||
PlayMusic(0, c_szFileName, GetMusicVolume(), 0.0f);
|
||||
}
|
||||
|
||||
void CSoundManager::FadeInMusic(const char * c_szFileName, float fVolumeSpeed)
|
||||
{
|
||||
DWORD dwIndex;
|
||||
if (GetMusicIndex(c_szFileName, &dwIndex))
|
||||
{
|
||||
m_MusicInstances[dwIndex].MusicState = MUSIC_STATE_FADE_IN;
|
||||
m_MusicInstances[dwIndex].fVolumeSpeed = fVolumeSpeed;
|
||||
return;
|
||||
}
|
||||
|
||||
FadeOutAllMusic();
|
||||
|
||||
//Tracenf("FadeInMusic: %s", c_szFileName);
|
||||
|
||||
for (int i = 0; i < CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM; ++i)
|
||||
{
|
||||
TMusicInstance & rMusicInstance = m_MusicInstances[i];
|
||||
if (MUSIC_STATE_OFF != rMusicInstance.MusicState)
|
||||
continue;
|
||||
|
||||
PlayMusic(i, c_szFileName, 0.0f, fVolumeSpeed);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
// If there is no empty music slot, then play music on slot 0.
|
||||
/*
|
||||
StopMusic(0);
|
||||
PlayMusic(0, c_szFileName, 0.0f, fVolumeSpeed);
|
||||
*/
|
||||
}
|
||||
|
||||
void CSoundManager::FadeLimitOutMusic(const char * c_szFileName, float fLimitVolume, float fVolumeSpeed)
|
||||
{
|
||||
//Tracenf("FadeLimitOutMusic: %s", c_szFileName);
|
||||
|
||||
DWORD dwIndex;
|
||||
if (!GetMusicIndex(c_szFileName, &dwIndex))
|
||||
{
|
||||
Tracenf("FadeOutMusic: %s - ERROR NOT EXIST", c_szFileName);
|
||||
return;
|
||||
}
|
||||
|
||||
if (dwIndex >= CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM)
|
||||
{
|
||||
Tracenf("FadeOutMusic: %s - ERROR OUT OF RANGE", c_szFileName);
|
||||
return;
|
||||
}
|
||||
|
||||
SMusicInstance& rkMusicInst=m_MusicInstances[dwIndex];
|
||||
rkMusicInst.MusicState = MUSIC_STATE_FADE_LIMIT_OUT;
|
||||
rkMusicInst.fVolumeSpeed = fVolumeSpeed;
|
||||
rkMusicInst.fLimitVolume = __ConvertRatioVolumeToApplyVolume(fLimitVolume);
|
||||
|
||||
//Tracenf("LimitVolume %f(%f)", fLimitVolume, rkMusicInst.fLimitVolume);
|
||||
}
|
||||
|
||||
void CSoundManager::FadeOutMusic(const char * c_szFileName, float fVolumeSpeed)
|
||||
{
|
||||
//Tracenf("FadeOutMusic: %s", c_szFileName);
|
||||
|
||||
DWORD dwIndex;
|
||||
if (!GetMusicIndex(c_szFileName, &dwIndex))
|
||||
{
|
||||
Tracenf("FadeOutMusic: %s - ERROR NOT EXIST", c_szFileName);
|
||||
return;
|
||||
}
|
||||
|
||||
if (dwIndex >= CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM)
|
||||
{
|
||||
Tracenf("FadeOutMusic: %s - ERROR OUT OF RANGE", c_szFileName);
|
||||
return;
|
||||
}
|
||||
|
||||
m_MusicInstances[dwIndex].MusicState = MUSIC_STATE_FADE_OUT;
|
||||
m_MusicInstances[dwIndex].fVolumeSpeed = fVolumeSpeed;
|
||||
}
|
||||
|
||||
void CSoundManager::FadeOutAllMusic()
|
||||
{
|
||||
//Tracenf("FadeOutAllMusic");
|
||||
|
||||
for (int i = 0; i < CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM; ++i)
|
||||
{
|
||||
if (MUSIC_STATE_OFF == m_MusicInstances[i].MusicState)
|
||||
continue;
|
||||
|
||||
m_MusicInstances[i].MusicState = MUSIC_STATE_FADE_OUT;
|
||||
m_MusicInstances[i].fVolumeSpeed = 0.01f;
|
||||
}
|
||||
}
|
||||
|
||||
void CSoundManager::SaveVolume()
|
||||
{
|
||||
// NOTE : <20>ι<EFBFBD> <20>̻<EFBFBD> Save<76><65> <20>õ<EFBFBD><C3B5>Ҷ<EFBFBD><D2B6><EFBFBD> <20>׳<EFBFBD> Return
|
||||
if (m_isSoundDisable)
|
||||
return;
|
||||
|
||||
float fBackupMusicVolume = m_fMusicVolume;
|
||||
float fBackupSoundVolume = m_fSoundVolume;
|
||||
__SetMusicVolume(0.0f);
|
||||
SetSoundVolume(0.0f);
|
||||
m_fBackupMusicVolume = fBackupMusicVolume;
|
||||
m_fBackupSoundVolume = fBackupSoundVolume;
|
||||
m_isSoundDisable = TRUE;
|
||||
}
|
||||
|
||||
void CSoundManager::RestoreVolume()
|
||||
{
|
||||
m_isSoundDisable = FALSE;
|
||||
__SetMusicVolume(m_fBackupMusicVolume);
|
||||
SetSoundVolume(m_fBackupSoundVolume);
|
||||
}
|
||||
|
||||
void CSoundManager::PlayMusic(DWORD dwIndex, const char * c_szFileName, float fVolume, float fVolumeSpeed)
|
||||
{
|
||||
if (dwIndex >= CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM)
|
||||
return;
|
||||
|
||||
if (!ms_SoundManagerStream.SetInstance(dwIndex, c_szFileName))
|
||||
{
|
||||
TraceError("CSoundManager::PlayMusic - Failed to load stream sound : %s", c_szFileName);
|
||||
return;
|
||||
}
|
||||
|
||||
CSoundInstanceStream * pInstance = ms_SoundManagerStream.GetInstance(dwIndex);
|
||||
if (!pInstance)
|
||||
{
|
||||
TraceError("CSoundManager::PlayMusic - There is no stream sound instance : %s", c_szFileName);
|
||||
return;
|
||||
}
|
||||
|
||||
pInstance->SetVolume(fVolume);
|
||||
pInstance->Play(0);
|
||||
|
||||
TMusicInstance & rMusicInstance = m_MusicInstances[dwIndex];
|
||||
rMusicInstance.fVolume = fVolume;
|
||||
rMusicInstance.fVolumeSpeed = fVolumeSpeed;
|
||||
rMusicInstance.MusicState = MUSIC_STATE_FADE_IN;
|
||||
|
||||
std::string strFileName;
|
||||
StringPath(c_szFileName, strFileName);
|
||||
rMusicInstance.dwMusicFileNameCRC = GetCaseCRC32(strFileName.c_str(), strFileName.length());
|
||||
}
|
||||
|
||||
void CSoundManager::StopMusic(DWORD dwIndex)
|
||||
{
|
||||
if (dwIndex >= CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM)
|
||||
return;
|
||||
|
||||
CSoundInstanceStream * pInstance = ms_SoundManagerStream.GetInstance(dwIndex);
|
||||
if (!pInstance)
|
||||
return;
|
||||
|
||||
pInstance->Stop();
|
||||
|
||||
TMusicInstance & rMusicInstance = m_MusicInstances[dwIndex];
|
||||
rMusicInstance.fVolume = 0.0f;
|
||||
rMusicInstance.fVolumeSpeed = 0.0f;
|
||||
rMusicInstance.MusicState = MUSIC_STATE_OFF;
|
||||
rMusicInstance.dwMusicFileNameCRC = 0;
|
||||
}
|
||||
|
||||
BOOL CSoundManager::GetMusicIndex(const char * c_szFileName, DWORD * pdwIndex)
|
||||
{
|
||||
std::string strFileName;
|
||||
StringPath(c_szFileName, strFileName);
|
||||
DWORD dwCRC = GetCaseCRC32(strFileName.c_str(), strFileName.length());
|
||||
|
||||
for (int i = 0; i < CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM; ++i)
|
||||
{
|
||||
const TMusicInstance & c_rMusicInstance = m_MusicInstances[i];
|
||||
if (MUSIC_STATE_OFF != c_rMusicInstance.MusicState)
|
||||
if (c_rMusicInstance.dwMusicFileNameCRC == dwCRC)
|
||||
{
|
||||
*pdwIndex = i;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CSoundManager::FadeAll()
|
||||
{
|
||||
FadeOutAllMusic();
|
||||
}
|
111
src/MilesLib/SoundManager.h
Normal file
111
src/MilesLib/SoundManager.h
Normal file
@ -0,0 +1,111 @@
|
||||
#pragma once
|
||||
|
||||
#include "../eterBase/Singleton.h"
|
||||
|
||||
#include "SoundManagerStream.h"
|
||||
#include "SoundManager2D.h"
|
||||
#include "SoundManager3D.h"
|
||||
#include "Type.h"
|
||||
|
||||
class CSoundManager : public CSingleton<CSoundManager>
|
||||
{
|
||||
public:
|
||||
CSoundManager();
|
||||
virtual ~CSoundManager();
|
||||
|
||||
BOOL Create();
|
||||
void Destroy();
|
||||
|
||||
void SetPosition(float fx, float fy, float fz);
|
||||
void SetDirection(float fxDir, float fyDir, float fzDir, float fxUp, float fyUp, float fzUp);
|
||||
void Update();
|
||||
|
||||
float GetSoundScale();
|
||||
void SetSoundScale(float fScale);
|
||||
void SetAmbienceSoundScale(float fScale);
|
||||
void SetSoundVolume(float fVolume);
|
||||
void SetSoundVolumeRatio(float fRatio);
|
||||
void SetMusicVolume(float fVolume);
|
||||
void SetMusicVolumeRatio(float fRatio);
|
||||
void SetSoundVolumeGrade(int iGrade);
|
||||
void SetMusicVolumeGrade(int iGrade);
|
||||
void SaveVolume();
|
||||
void RestoreVolume();
|
||||
float GetSoundVolume();
|
||||
float GetMusicVolume();
|
||||
|
||||
// Sound
|
||||
void PlaySound2D(const char * c_szFileName);
|
||||
void PlaySound3D(float fx, float fy, float fz, const char * c_szFileName, int iPlayCount = 1);
|
||||
void StopSound3D(int iIndex);
|
||||
int PlayAmbienceSound3D(float fx, float fy, float fz, const char * c_szFileName, int iPlayCount = 1);
|
||||
void PlayCharacterSound3D(float fx, float fy, float fz, const char * c_szFileName, BOOL bCheckFrequency = FALSE);
|
||||
void SetSoundVolume3D(int iIndex, float fVolume);
|
||||
void StopAllSound3D();
|
||||
|
||||
// Music
|
||||
void PlayMusic(const char * c_szFileName);
|
||||
void FadeInMusic(const char * c_szFileName, float fVolumeSpeed = 0.016f);
|
||||
void FadeOutMusic(const char * c_szFileName, float fVolumeSpeed = 0.016f);
|
||||
void FadeLimitOutMusic(const char * c_szFileName, float fLimitVolume, float fVolumeSpeed = 0.016f);
|
||||
void FadeOutAllMusic();
|
||||
void FadeAll();
|
||||
|
||||
// Sound Node
|
||||
void UpdateSoundData(DWORD dwcurFrame, const NSound::TSoundDataVector * c_pSoundDataVector);
|
||||
void UpdateSoundData(float fx, float fy, float fz, DWORD dwcurFrame, const NSound::TSoundDataVector * c_pSoundDataVector);
|
||||
void UpdateSoundInstance(float fx, float fy, float fz, DWORD dwcurFrame, const NSound::TSoundInstanceVector * c_pSoundInstanceVector, BOOL bCheckFrequency = FALSE);
|
||||
void UpdateSoundInstance(DWORD dwcurFrame, const NSound::TSoundInstanceVector * c_pSoundInstanceVector);
|
||||
|
||||
protected:
|
||||
enum EMusicState
|
||||
{
|
||||
MUSIC_STATE_OFF,
|
||||
MUSIC_STATE_PLAY,
|
||||
MUSIC_STATE_FADE_IN,
|
||||
MUSIC_STATE_FADE_OUT,
|
||||
MUSIC_STATE_FADE_LIMIT_OUT,
|
||||
};
|
||||
typedef struct SMusicInstance
|
||||
{
|
||||
DWORD dwMusicFileNameCRC;
|
||||
EMusicState MusicState;
|
||||
float fVolume;
|
||||
float fLimitVolume;
|
||||
float fVolumeSpeed;
|
||||
} TMusicInstance;
|
||||
|
||||
void PlayMusic(DWORD dwIndex, const char * c_szFileName, float fVolume, float fVolumeSpeed);
|
||||
void StopMusic(DWORD dwIndex);
|
||||
BOOL GetMusicIndex(const char * c_szFileName, DWORD * pdwIndex);
|
||||
|
||||
protected:
|
||||
float __ConvertGradeVolumeToApplyVolume(int nVolumeGrade);
|
||||
float __ConvertRatioVolumeToApplyVolume(float fVolumeRatio);
|
||||
void __SetMusicVolume(float fVolume);
|
||||
BOOL GetSoundInstance2D(const char * c_szSoundFileName, ISoundInstance ** ppInstance);
|
||||
BOOL GetSoundInstance3D(const char * c_szFileName, ISoundInstance ** ppInstance);
|
||||
|
||||
protected:
|
||||
BOOL m_bInitialized;
|
||||
BOOL m_isSoundDisable;
|
||||
|
||||
float m_fxPosition;
|
||||
float m_fyPosition;
|
||||
float m_fzPosition;
|
||||
|
||||
float m_fSoundScale;
|
||||
float m_fAmbienceSoundScale;
|
||||
float m_fSoundVolume;
|
||||
float m_fMusicVolume;
|
||||
|
||||
float m_fBackupMusicVolume;
|
||||
float m_fBackupSoundVolume;
|
||||
|
||||
TMusicInstance m_MusicInstances[CSoundManagerStream::MUSIC_INSTANCE_MAX_NUM];
|
||||
std::map<std::string, float> m_PlaySoundHistoryMap;
|
||||
|
||||
static CSoundManager2D ms_SoundManager2D;
|
||||
static CSoundManager3D ms_SoundManager3D;
|
||||
static CSoundManagerStream ms_SoundManagerStream;
|
||||
};
|
79
src/MilesLib/SoundManager2D.cpp
Normal file
79
src/MilesLib/SoundManager2D.cpp
Normal file
@ -0,0 +1,79 @@
|
||||
#include "Stdafx.h"
|
||||
#include "SoundManager2D.h"
|
||||
|
||||
CSoundManager2D::CSoundManager2D()
|
||||
{
|
||||
}
|
||||
|
||||
CSoundManager2D::~CSoundManager2D()
|
||||
{
|
||||
}
|
||||
|
||||
bool CSoundManager2D::Initialize()
|
||||
{
|
||||
CSoundBase::Initialize();
|
||||
|
||||
if (ms_DIGDriver)
|
||||
return true;
|
||||
|
||||
ms_DIGDriver = AIL_open_digital_driver(44100, 16, 2, 0);
|
||||
|
||||
for (int i = 0; i < INSTANCE_MAX_COUNT; ++i)
|
||||
ms_Instances[i].Initialize();
|
||||
/* ms_DIGDriver = AIL_open_digital_driver(44100,
|
||||
(DIG_F_STEREO_16 & DIG_F_16BITS_MASK) ? 16 : 8,
|
||||
(DIG_F_STEREO_16 & DIG_F_16BITS_MASK) ? 2 : 1,
|
||||
0);
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
void CSoundManager2D::Destroy()
|
||||
{
|
||||
for (int i = 0; i < INSTANCE_MAX_COUNT; ++i)
|
||||
ms_Instances[i].Destroy();
|
||||
|
||||
if (ms_DIGDriver != NULL)
|
||||
{
|
||||
AIL_close_digital_driver(ms_DIGDriver);
|
||||
ms_DIGDriver = NULL;
|
||||
}
|
||||
|
||||
CSoundBase::Destroy();
|
||||
}
|
||||
|
||||
ISoundInstance * CSoundManager2D::GetInstance(const char * c_pszFileName)
|
||||
{
|
||||
DWORD dwFileCRC = GetFileCRC(c_pszFileName);
|
||||
TSoundDataMap::iterator itor = ms_dataMap.find(dwFileCRC);
|
||||
|
||||
CSoundData * pkSoundData;
|
||||
|
||||
if (itor == ms_dataMap.end())
|
||||
pkSoundData = AddFile(dwFileCRC, c_pszFileName); // CSoundBase::AddFile
|
||||
else
|
||||
pkSoundData = itor->second;
|
||||
|
||||
assert(pkSoundData != NULL);
|
||||
|
||||
static DWORD k = 0;
|
||||
|
||||
DWORD start = k++;
|
||||
DWORD end = start + INSTANCE_MAX_COUNT;
|
||||
|
||||
while (start < end)
|
||||
{
|
||||
CSoundInstance2D * pkInst = &ms_Instances[start % INSTANCE_MAX_COUNT];
|
||||
|
||||
if (pkInst->IsDone())
|
||||
{
|
||||
if (!pkInst->SetSound(pkSoundData))
|
||||
TraceError("CSoundManager2D::GetInstance (filename: %s)", c_pszFileName);
|
||||
return (pkInst);
|
||||
}
|
||||
|
||||
++start;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
27
src/MilesLib/SoundManager2D.h
Normal file
27
src/MilesLib/SoundManager2D.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef __MILESLIB_CSOUNDMANAGER2D_H__
|
||||
#define __MILESLIB_CSOUNDMANAGER2D_H__
|
||||
|
||||
#include "SoundBase.h"
|
||||
#include "SoundInstance.h"
|
||||
|
||||
class CSoundManager2D : public CSoundBase
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
INSTANCE_MAX_COUNT = 4
|
||||
};
|
||||
|
||||
CSoundManager2D();
|
||||
virtual ~CSoundManager2D();
|
||||
|
||||
bool Initialize();
|
||||
void Destroy();
|
||||
|
||||
ISoundInstance * GetInstance(const char* filename);
|
||||
|
||||
protected:
|
||||
CSoundInstance2D ms_Instances[INSTANCE_MAX_COUNT];
|
||||
};
|
||||
|
||||
#endif
|
205
src/MilesLib/SoundManager3D.cpp
Normal file
205
src/MilesLib/SoundManager3D.cpp
Normal file
@ -0,0 +1,205 @@
|
||||
#include "Stdafx.h"
|
||||
#include "SoundManager3D.h"
|
||||
|
||||
CSoundManager3D::CSoundManager3D()
|
||||
{
|
||||
m_bInit = false;
|
||||
}
|
||||
|
||||
CSoundManager3D::~CSoundManager3D()
|
||||
{
|
||||
}
|
||||
|
||||
bool CSoundManager3D::Initialize()
|
||||
{
|
||||
CSoundBase::Initialize();
|
||||
|
||||
if (ms_pProviderDefault)
|
||||
return true;
|
||||
|
||||
ms_ProviderVector.resize(MAX_PROVIDERS);
|
||||
|
||||
HPROENUM enum3D = HPROENUM_FIRST;
|
||||
int i = 0;
|
||||
|
||||
while (AIL_enumerate_3D_providers(&enum3D,
|
||||
&ms_ProviderVector[i].hProvider,
|
||||
&ms_ProviderVector[i].name) && (i < MAX_PROVIDERS))
|
||||
{
|
||||
TProvider * provider = &ms_ProviderVector[i];
|
||||
|
||||
//if (strcmp(provider->name, "DirectSound3D Software Emulation") == 0)
|
||||
//if (strcmp(provider->name, "DirectSound3D Hardware Support") == 0)
|
||||
//if (strcmp(provider->name, "DirectSound3D 7+ Software - Pan and Volume") == 0)
|
||||
//if (strcmp(provider->name, "DirectSound3D 7+ Software - Light HRTF") == 0)
|
||||
//if (strcmp(provider->name, "DirectSound3D 7+ Software - Full HRTF") == 0)
|
||||
//if (strcmp(provider->name, "RAD Game Tools RSX 3D Audio") == 0)
|
||||
//if (strcmp(provider->name, "Dolby Surround") == 0)
|
||||
if (strcmp(provider->name, "Miles Fast 2D Positional Audio") == 0)
|
||||
ms_pProviderDefault = provider;
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
if (!ms_pProviderDefault)
|
||||
{
|
||||
CSoundBase::Destroy();
|
||||
return false;
|
||||
}
|
||||
|
||||
assert(ms_pProviderDefault != NULL);
|
||||
|
||||
if (M3D_NOERR != AIL_open_3D_provider(ms_pProviderDefault->hProvider))
|
||||
{
|
||||
// assert(!"AIL_open_3D_provider error");
|
||||
// char buf[64];
|
||||
// sprintf(buf, "Error AIL_open_3D_provider: %s\n", AIL_last_error());
|
||||
// OutputDebugString(buf);
|
||||
|
||||
CSoundBase::Destroy();
|
||||
return false;
|
||||
}
|
||||
|
||||
m_pListener = AIL_open_3D_listener(ms_pProviderDefault->hProvider);
|
||||
|
||||
SetListenerPosition(0.0f, 0.0f, 0.0f);
|
||||
|
||||
for (i = 0; i < INSTANCE_MAX_COUNT; ++i)
|
||||
{
|
||||
m_Instances[i].Initialize();
|
||||
m_bLockingFlag[i] = false;
|
||||
}
|
||||
|
||||
m_bInit = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void CSoundManager3D::Destroy()
|
||||
{
|
||||
if (!m_bInit)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < INSTANCE_MAX_COUNT; ++i)
|
||||
m_Instances[i].Destroy();
|
||||
|
||||
if (m_pListener)
|
||||
{
|
||||
AIL_close_3D_listener(m_pListener);
|
||||
m_pListener = NULL;
|
||||
}
|
||||
|
||||
if (ms_pProviderDefault)
|
||||
{
|
||||
AIL_close_3D_provider(ms_pProviderDefault->hProvider);
|
||||
ms_pProviderDefault = NULL;
|
||||
}
|
||||
|
||||
CSoundBase::Destroy();
|
||||
m_bInit = false;
|
||||
}
|
||||
|
||||
void CSoundManager3D::SetListenerDirection(float fxDir, float fyDir, float fzDir, float fxUp, float fyUp, float fzUp)
|
||||
{
|
||||
if (NULL == m_pListener)
|
||||
return;
|
||||
AIL_set_3D_orientation(m_pListener, fxDir, fyDir, -fzDir, fxUp, fyUp, -fzUp);
|
||||
}
|
||||
|
||||
void CSoundManager3D::SetListenerPosition(float fX, float fY, float fZ)
|
||||
{
|
||||
// assert(m_pListener != NULL);
|
||||
if (NULL == m_pListener)
|
||||
return;
|
||||
AIL_set_3D_position(m_pListener, fX, fY, -fZ);
|
||||
}
|
||||
|
||||
void CSoundManager3D::SetListenerVelocity(float fDistanceX, float fDistanceY, float fDistanceZ, float fNagnitude)
|
||||
{
|
||||
// assert(m_pListener != NULL);
|
||||
if (NULL == m_pListener)
|
||||
return;
|
||||
AIL_set_3D_velocity(m_pListener, fDistanceX, fDistanceY, -fDistanceZ, fNagnitude);
|
||||
}
|
||||
|
||||
int CSoundManager3D::SetInstance(const char * c_pszFileName)
|
||||
{
|
||||
DWORD dwFileCRC = GetFileCRC(c_pszFileName);
|
||||
TSoundDataMap::iterator itor = ms_dataMap.find(dwFileCRC);
|
||||
|
||||
CSoundData * pkSoundData;
|
||||
|
||||
if (itor == ms_dataMap.end())
|
||||
pkSoundData = AddFile(dwFileCRC, c_pszFileName); // CSoundBase::AddFile
|
||||
else
|
||||
pkSoundData = itor->second;
|
||||
|
||||
assert(pkSoundData != NULL);
|
||||
|
||||
static DWORD k = 0;
|
||||
|
||||
DWORD start = k++;
|
||||
DWORD end = start + INSTANCE_MAX_COUNT;
|
||||
|
||||
while (start < end)
|
||||
{
|
||||
CSoundInstance3D * pkInst = &m_Instances[start % INSTANCE_MAX_COUNT];
|
||||
|
||||
if (pkInst->IsDone())
|
||||
{
|
||||
if (!pkInst->SetSound(pkSoundData))
|
||||
{
|
||||
TraceError("CSoundManager3D::GetInstance (filename: %s)", c_pszFileName);
|
||||
// NOTE : <20><><EFBFBD><EFBFBD><EFBFBD>尡 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Failed to set. return NULL. - [levites]
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (start % INSTANCE_MAX_COUNT);
|
||||
}
|
||||
|
||||
++start;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> DWORD <20>Ѱ谪<D1B0><E8B0AA> <20>Ѿ<D1BE><EEB0A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.. <20><EFBFBD><D7B7><EFBFBD>.. Ȥ<>ó<EFBFBD>.. - [levites]
|
||||
if (start > 50000)
|
||||
{
|
||||
start = 0;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
ISoundInstance * CSoundManager3D::GetInstance(DWORD dwIndex)
|
||||
{
|
||||
if (dwIndex >= INSTANCE_MAX_COUNT)
|
||||
{
|
||||
assert(dwIndex < INSTANCE_MAX_COUNT);
|
||||
return NULL;
|
||||
}
|
||||
return &m_Instances[dwIndex];
|
||||
}
|
||||
|
||||
__forceinline bool CSoundManager3D::IsValidInstanceIndex(int iIndex)
|
||||
{
|
||||
if (iIndex >= 0 && iIndex < INSTANCE_MAX_COUNT)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CSoundManager3D::Lock(int iIndex)
|
||||
{
|
||||
if (!IsValidInstanceIndex(iIndex))
|
||||
return;
|
||||
|
||||
m_bLockingFlag[iIndex] = true;
|
||||
}
|
||||
|
||||
void CSoundManager3D::Unlock(int iIndex)
|
||||
{
|
||||
if (!IsValidInstanceIndex(iIndex))
|
||||
return;
|
||||
|
||||
m_bLockingFlag[iIndex] = false;
|
||||
}
|
45
src/MilesLib/SoundManager3D.h
Normal file
45
src/MilesLib/SoundManager3D.h
Normal file
@ -0,0 +1,45 @@
|
||||
#ifndef __MILESLIB_CSOUNDMANAGER3D_H__
|
||||
#define __MILESLIB_CSOUNDMANAGER3D_H__
|
||||
|
||||
#include "SoundBase.h"
|
||||
#include "SoundInstance.h"
|
||||
|
||||
class CSoundManager3D : public CSoundBase
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
INSTANCE_MAX_COUNT = 32,
|
||||
MAX_PROVIDERS = 32,
|
||||
};
|
||||
|
||||
public:
|
||||
CSoundManager3D();
|
||||
virtual ~CSoundManager3D();
|
||||
|
||||
bool Initialize();
|
||||
void Destroy();
|
||||
|
||||
int GetEmptyInstanceIndex();
|
||||
int SetInstance(const char * c_szFileName);
|
||||
ISoundInstance * GetInstance(DWORD dwIndex);
|
||||
|
||||
void SetListenerDirection(float fxDir, float fyDir, float fzDir, float fxUp, float fyUp, float fzUp);
|
||||
void SetListenerPosition(float x, float y, float z);
|
||||
void SetListenerVelocity(float fDistanceX, float fDistanceY, float fDistanceZ, float fNagnitude);
|
||||
|
||||
void Lock(int iIndex);
|
||||
void Unlock(int iIndex);
|
||||
|
||||
protected:
|
||||
bool IsValidInstanceIndex(int iIndex);
|
||||
|
||||
protected:
|
||||
bool m_bLockingFlag[INSTANCE_MAX_COUNT];
|
||||
CSoundInstance3D m_Instances[INSTANCE_MAX_COUNT];
|
||||
H3DPOBJECT m_pListener;
|
||||
|
||||
bool m_bInit;
|
||||
};
|
||||
|
||||
#endif
|
64
src/MilesLib/SoundManagerStream.cpp
Normal file
64
src/MilesLib/SoundManagerStream.cpp
Normal file
@ -0,0 +1,64 @@
|
||||
#include "stdafx.h"
|
||||
#include "SoundManagerStream.h"
|
||||
|
||||
CSoundManagerStream::CSoundManagerStream()
|
||||
{
|
||||
}
|
||||
|
||||
CSoundManagerStream::~CSoundManagerStream()
|
||||
{
|
||||
}
|
||||
|
||||
bool CSoundManagerStream::Initialize()
|
||||
{
|
||||
CSoundBase::Initialize();
|
||||
|
||||
if (ms_DIGDriver)
|
||||
return true;
|
||||
|
||||
ms_DIGDriver = AIL_open_digital_driver(44100, 16, 2, 0);
|
||||
|
||||
for (int i = 0; i < MUSIC_INSTANCE_MAX_NUM; ++i)
|
||||
m_Instances[i].Initialize();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CSoundManagerStream::Destroy()
|
||||
{
|
||||
for (int i=0; i<MUSIC_INSTANCE_MAX_NUM; ++i)
|
||||
m_Instances[i].Stop();
|
||||
|
||||
CSoundBase::Destroy();
|
||||
}
|
||||
|
||||
bool CSoundManagerStream::SetInstance(DWORD dwIndex, const char* filename)
|
||||
{
|
||||
if (!CheckInstanceIndex(dwIndex))
|
||||
return false;
|
||||
|
||||
HSTREAM hStream = AIL_open_stream(ms_DIGDriver, filename, 0);
|
||||
|
||||
if (NULL == hStream)
|
||||
return false;
|
||||
|
||||
m_Instances[dwIndex].SetStream(hStream);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CSoundInstanceStream * CSoundManagerStream::GetInstance(DWORD dwIndex)
|
||||
{
|
||||
if (!CheckInstanceIndex(dwIndex))
|
||||
return NULL;
|
||||
|
||||
return &m_Instances[dwIndex];
|
||||
}
|
||||
|
||||
bool CSoundManagerStream::CheckInstanceIndex(DWORD dwIndex)
|
||||
{
|
||||
if (dwIndex >= DWORD(MUSIC_INSTANCE_MAX_NUM))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
32
src/MilesLib/SoundManagerStream.h
Normal file
32
src/MilesLib/SoundManagerStream.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef __MILESLIB_CSOUNDMANAGERSTREAM_H__
|
||||
#define __MILESLIB_CSOUNDMANAGERSTREAM_H__
|
||||
|
||||
#include "SoundBase.h"
|
||||
#include "SoundInstance.h"
|
||||
|
||||
class CSoundManagerStream : public CSoundBase
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
MUSIC_INSTANCE_MAX_NUM = 3,
|
||||
};
|
||||
|
||||
public:
|
||||
CSoundManagerStream();
|
||||
virtual ~CSoundManagerStream();
|
||||
|
||||
bool Initialize();
|
||||
void Destroy();
|
||||
|
||||
bool SetInstance(DWORD dwIndex, const char* filename);
|
||||
CSoundInstanceStream * GetInstance(DWORD dwIndex);
|
||||
|
||||
protected:
|
||||
bool CheckInstanceIndex(DWORD dwIndex);
|
||||
|
||||
protected:
|
||||
CSoundInstanceStream m_Instances[MUSIC_INSTANCE_MAX_NUM];
|
||||
};
|
||||
|
||||
#endif
|
2
src/MilesLib/Stdafx.cpp
Normal file
2
src/MilesLib/Stdafx.cpp
Normal file
@ -0,0 +1,2 @@
|
||||
#include "stdafx.h"
|
||||
|
29
src/MilesLib/Stdafx.h
Normal file
29
src/MilesLib/Stdafx.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef __INC_MILESLIB_STDAFX_H__
|
||||
#define __INC_MILESLIB_STDAFX_H__
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
//#include <crtdbg.h>
|
||||
|
||||
#include "../eterBase/CRC32.h"
|
||||
#include "../eterBase/Utils.h"
|
||||
#include "../eterBase/Debug.h"
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
// Armadillo nanomite protection
|
||||
#if !defined(NANOBEGIN) && !defined(NANOEND)
|
||||
#ifdef _DEBUG
|
||||
#define NANOBEGIN
|
||||
#define NANOEND
|
||||
#else
|
||||
#include <armadillo/SecuredSections.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
136
src/MilesLib/Type.cpp
Normal file
136
src/MilesLib/Type.cpp
Normal file
@ -0,0 +1,136 @@
|
||||
#include "StdAfx.h"
|
||||
#include "Type.h"
|
||||
#include "../EterLib/TextFileLoader.h"
|
||||
|
||||
std::string NSound::strResult;
|
||||
|
||||
const char * NSound::GetResultString()
|
||||
{
|
||||
return strResult.c_str();
|
||||
}
|
||||
|
||||
void NSound::SetResultString(const char * c_pszStr)
|
||||
{
|
||||
strResult.assign(c_pszStr);
|
||||
}
|
||||
|
||||
bool NSound::LoadSoundInformationPiece(const char * c_szFileName, NSound::TSoundDataVector & rSoundDataVector, const char * c_szPathHeader)
|
||||
{
|
||||
std::string strResult;
|
||||
strResult = c_szFileName;
|
||||
|
||||
CTextFileLoader* pkTextFileLoader=CTextFileLoader::Cache(c_szFileName);
|
||||
if (!pkTextFileLoader)
|
||||
return false;
|
||||
|
||||
CTextFileLoader& rkTextFileLoader=*pkTextFileLoader;
|
||||
if (rkTextFileLoader.IsEmpty())
|
||||
{
|
||||
SetResultString((strResult + " <20>б<EFBFBD><D0B1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD>").c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
rkTextFileLoader.SetTop();
|
||||
|
||||
int iCount;
|
||||
if (!rkTextFileLoader.GetTokenInteger("sounddatacount", &iCount))
|
||||
{
|
||||
SetResultString((strResult + " <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, SoundDataCount<6E><74> ã<><C3A3> <20><> <20><><EFBFBD><EFBFBD>").c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
rSoundDataVector.clear();
|
||||
rSoundDataVector.resize(iCount);
|
||||
|
||||
char szSoundDataHeader[32+1];
|
||||
for (DWORD i = 0; i < rSoundDataVector.size(); ++i)
|
||||
{
|
||||
_snprintf(szSoundDataHeader, sizeof(szSoundDataHeader), "sounddata%02d", i);
|
||||
CTokenVector * pTokenVector;
|
||||
if (!rkTextFileLoader.GetTokenVector(szSoundDataHeader, &pTokenVector))
|
||||
{
|
||||
SetResultString((strResult + " <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>: " + szSoundDataHeader + " <20><> ã<><C3A3> <20><> <20><><EFBFBD><EFBFBD>").c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (2 != pTokenVector->size())
|
||||
{
|
||||
SetResultString((strResult + " <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD> ũ<>Ⱑ 2<><32> <20>ƴ<EFBFBD>").c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
rSoundDataVector[i].fTime = (float) atof(pTokenVector->at(0).c_str());
|
||||
if (c_szPathHeader)
|
||||
{
|
||||
rSoundDataVector[i].strSoundFileName = c_szPathHeader;
|
||||
rSoundDataVector[i].strSoundFileName += pTokenVector->at(1).c_str();
|
||||
}
|
||||
else
|
||||
{
|
||||
rSoundDataVector[i].strSoundFileName = pTokenVector->at(1).c_str();
|
||||
}
|
||||
}
|
||||
|
||||
SetResultString((strResult + " <20>ҷ<EFBFBD><D2B7><EFBFBD>").c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NSound::SaveSoundInformationPiece(const char * c_szFileName, NSound::TSoundDataVector & rSoundDataVector)
|
||||
{
|
||||
if (rSoundDataVector.empty()) // <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
{
|
||||
if (IsFile(c_szFileName)) // <20><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ִµ<D6B4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִٸ<D6B4>
|
||||
{
|
||||
_unlink(c_szFileName); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string strResult;
|
||||
strResult = c_szFileName;
|
||||
|
||||
FILE * File = fopen(c_szFileName, "wt");
|
||||
|
||||
if (!File)
|
||||
{
|
||||
char szErrorText[256+1];
|
||||
_snprintf(szErrorText, sizeof(szErrorText), "Failed to save file (%s).\nPlease check if it is read-only or you have no space on the disk.\n", c_szFileName);
|
||||
LogBox(szErrorText, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
SetResultString((strResult + " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD>").c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
fprintf(File, "ScriptType CharacterSoundInformation\n");
|
||||
fprintf(File, "\n");
|
||||
|
||||
fprintf(File, "SoundDataCount %d\n", rSoundDataVector.size());
|
||||
|
||||
for (DWORD i = 0; i < rSoundDataVector.size(); ++i)
|
||||
{
|
||||
NSound::TSoundData & rSoundData = rSoundDataVector[i];
|
||||
fprintf(File, "SoundData%02d %f \"%s\"\n", i, rSoundData.fTime, rSoundData.strSoundFileName.c_str());
|
||||
}
|
||||
|
||||
fclose(File);
|
||||
return true;
|
||||
}
|
||||
|
||||
void NSound::DataToInstance(const TSoundDataVector & c_rSoundDataVector, TSoundInstanceVector * pSoundInstanceVector)
|
||||
{
|
||||
if (c_rSoundDataVector.empty())
|
||||
return;
|
||||
|
||||
DWORD dwFPS = 60;
|
||||
const float c_fFrameTime = 1.0f / float(dwFPS);
|
||||
|
||||
pSoundInstanceVector->clear();
|
||||
pSoundInstanceVector->resize(c_rSoundDataVector.size());
|
||||
for (DWORD i = 0; i < c_rSoundDataVector.size(); ++i)
|
||||
{
|
||||
const TSoundData & c_rSoundData = c_rSoundDataVector[i];
|
||||
TSoundInstance & rSoundInstance = pSoundInstanceVector->at(i);
|
||||
|
||||
rSoundInstance.dwFrame = (DWORD) (c_rSoundData.fTime / c_fFrameTime);
|
||||
rSoundInstance.strSoundFileName = c_rSoundData.strSoundFileName;
|
||||
}
|
||||
}
|
28
src/MilesLib/Type.h
Normal file
28
src/MilesLib/Type.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace NSound
|
||||
{
|
||||
extern std::string strResult;
|
||||
|
||||
typedef struct SSoundData
|
||||
{
|
||||
float fTime;
|
||||
std::string strSoundFileName;
|
||||
} TSoundData;
|
||||
typedef struct SSoundInstance
|
||||
{
|
||||
DWORD dwFrame;
|
||||
std::string strSoundFileName;
|
||||
} TSoundInstance;
|
||||
typedef std::vector<TSoundData> TSoundDataVector;
|
||||
typedef std::vector<TSoundInstance> TSoundInstanceVector;
|
||||
|
||||
bool LoadSoundInformationPiece(const char * c_szFileName, TSoundDataVector & rSoundDataVector, const char * c_szPathHeader = NULL);
|
||||
bool SaveSoundInformationPiece(const char * c_szFileName, TSoundDataVector & rSoundDataVector);
|
||||
void DataToInstance(const TSoundDataVector & c_rSoundDataVector, TSoundInstanceVector * pSoundInstanceVector);
|
||||
|
||||
const char * GetResultString();
|
||||
void SetResultString(const char * c_pszStr);
|
||||
};
|
Reference in New Issue
Block a user