This commit is contained in:
2025-11-24 14:19:51 +05:30
commit f5c1412b28
6734 changed files with 1527575 additions and 0 deletions

View File

@ -0,0 +1,44 @@
#
# This file was taken from RakNet 4.082.
# Please see licenses/RakNet license.txt for the underlying license and related copyright.
#
#
# Modified work: Copyright (c) 2017-2019, SLikeSoft UG (haftungsbeschränkt)
#
# This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
# license found in the license.txt file in the root directory of this source tree.
#
cmake_minimum_required(VERSION 2.6)
GETCURRENTFOLDER()
FINDPORTAUDIO()
project(${current_folder})
IF(WIN32 AND NOT UNIX)
FILE(GLOB ALL_CPP_SRCS *.cpp ${SLikeNet_SOURCE_DIR}/DependentExtensions/RakVoice.cpp)
FILE(GLOB ALL_HEADER_SRCS *.h ${SLikeNet_SOURCE_DIR}/DependentExtensions/RakVoice.h)
FILE(GLOB PORTAUDIOFILES ${portaudio_SOURCE_DIR}/pa_common/*.c ${portaudio_SOURCE_DIR}/pa_win_wmme/pa_win_wmme.c ${portaudio_SOURCE_DIR}/pa_common/*.h)
FILE(GLOB SPEEXFILES ${speex_SOURCE_DIR}/win32/*.h ${speex_SOURCE_DIR}/include/*.h ${speex_SOURCE_DIR}/libspeex/*.h ${speex_SOURCE_DIR}/include/speex/*.h ${speex_SOURCE_DIR}/libspeex/*.c)
LIST(REMOVE_ITEM SPEEXFILES
${speex_SOURCE_DIR}/libspeex/pcm_wrapper.h)
LIST(REMOVE_ITEM SPEEXFILES
${speex_SOURCE_DIR}/libspeex/pcm_wrapper.c)
SOURCE_GROUP(Speex FILES ${SPEEXFILES})
SOURCE_GROUP(PortAudio FILES ${PORTAUDIOFILES})
ADDCPPDEF(HAVE_CONFIG_H)
include_directories(${SLIKENET_HEADER_FILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${SLikeNet_SOURCE_DIR}/DependentExtensions ${speex_SOURCE_DIR}/include ${portaudio_SOURCE_DIR} ${speex_SOURCE_DIR}/win32)
add_executable(${current_folder} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS} ${PORTAUDIOFILES} ${SPEEXFILES})
target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS})
VSUBFOLDER(${current_folder} Samples/Voice)
ELSE(WIN32 AND NOT UNIX)
FILE(GLOB ALL_CPP_SRCS *.cpp)
FILE(GLOB ALL_HEADER_SRCS *.h)
include_directories(${SLIKENET_HEADER_FILES} ./ ${PORTAUDIO_INCLUDE_DIR} ${SLikeNet_SOURCE_DIR}/DependentExtensions)
add_executable(${current_folder} ${ALL_CPP_SRCS} ${ALL_HEADER_SRCS})
target_link_libraries(${current_folder} ${SLIKENET_COMMON_LIBS} ${PORTAUDIO_LIBRARIES} LibRakVoice)
ENDIF(WIN32 AND NOT UNIX)

View File

@ -0,0 +1,513 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug - Unicode|Win32">
<Configuration>Debug - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release - Unicode|Win32">
<Configuration>Release - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail - Unicode|Win32">
<Configuration>Retail - Unicode</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Retail|Win32">
<Configuration>Retail</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>RakVoice</ProjectName>
<ProjectGuid>{25A096E0-645B-4852-913B-400E1C79388E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</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)'=='Retail|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 - Unicode|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)'=='Retail - Unicode|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)'=='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)'=='Debug - Unicode|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>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">$(Configuration)\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/portaudio_v18_1/pa_common;./../../DependentExtensions/portaudio_v18_1/pa_win_wmme;./../../DependentExtensions/speex-1.1.12/include;./../../DependentExtensions/speex-1.1.12/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug_Win32.lib;Winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)RakVoice.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/portaudio_v18_1/pa_common;./../../DependentExtensions/portaudio_v18_1/pa_win_wmme;./../../DependentExtensions/speex-1.1.12/include;./../../DependentExtensions/speex-1.1.12/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Debug - Unicode_Win32.lib;Winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)RakVoice.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/portaudio_v18_1/pa_common;./../../DependentExtensions/portaudio_v18_1/pa_win_wmme;./../../DependentExtensions/speex-1.1.12/include;./../../DependentExtensions/speex-1.1.12/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release_Win32.lib;Winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/portaudio_v18_1/pa_common;./../../DependentExtensions/portaudio_v18_1/pa_win_wmme;./../../DependentExtensions/speex-1.1.12/include;./../../DependentExtensions/speex-1.1.12/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail_Win32.lib;Winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/portaudio_v18_1/pa_common;./../../DependentExtensions/portaudio_v18_1/pa_win_wmme;./../../DependentExtensions/speex-1.1.12/include;./../../DependentExtensions/speex-1.1.12/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Release - Unicode_Win32.lib;Winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>./../../Source/include;./../../DependentExtensions;./../../DependentExtensions/portaudio_v18_1/pa_common;./../../DependentExtensions/portaudio_v18_1/pa_win_wmme;./../../DependentExtensions/speex-1.1.12/include;./../../DependentExtensions/speex-1.1.12/win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_RETAIL;NDEBUG;_CONSOLE;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>./../../Lib/SLikeNet_LibStatic_Retail - Unicode_Win32.lib;Winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
<ClCompile Include="..\..\DependentExtensions\RakVoice.cpp" />
<ClCompile Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\pa_convert.c" />
<ClCompile Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\pa_lib.c" />
<ClCompile Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\pa_trace.c" />
<ClCompile Include="..\..\DependentExtensions\portaudio_v18_1\pa_win_wmme\pa_win_wmme.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4189;4211;4245;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4189;4211;4245;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4189;4211;4245;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4189;4211;4245;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4189;4211;4245;4996</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4189;4211;4245;4996</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\bits.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\cb_search.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_10_16_table.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_10_32_table.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_20_32_table.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_5_256_table.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_5_64_table.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_8_128_table.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fftwrap.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\filters.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\gain_table.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\gain_table_lbr.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\hexc_10_32_table.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\hexc_table.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\high_lsp_tables.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\jitter.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4127;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4127;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4127;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4127;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4127;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4127;4244;4305</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\kiss_fft.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4018;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4018;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4018;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4018;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4018;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4018;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\kiss_fftr.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lbr_48k_tables.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lpc.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lsp.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lsp_tables_nb.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\ltp.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4101;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4101;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4101;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4101;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4101;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4101;4244;4305</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\math_approx.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\mdf.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244;4305</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\misc.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\modes.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4305</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\nb_celp.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244;4305;4701</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244;4305;4701</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244;4305;4701</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244;4305;4701</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244;4305;4701</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244;4305;4701</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\preprocess.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4244;4305</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\quant_lsp.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\sb_celp.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244;4305</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\smallft.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\speex.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\speex_callbacks.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\speex_header.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\stereo.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4244</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4244</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vbr.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100;4244;4305</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100;4244;4305</DisableSpecificWarnings>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vorbis_psy.c" />
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vq.c">
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release - Unicode|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4100</DisableSpecificWarnings>
<DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Retail - Unicode|Win32'">4100</DisableSpecificWarnings>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\RakVoice.h" />
<ClInclude Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\pa_host.h" />
<ClInclude Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\pa_trace.h" />
<ClInclude Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\portaudio.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\_kiss_fft_guts.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\arch.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\cb_search.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\cb_search_arm4.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\cb_search_bfin.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\cb_search_sse.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fftwrap.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\filters.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\filters_arm4.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\filters_bfin.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\filters_sse.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fixed_arm4.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fixed_arm5e.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fixed_bfin.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fixed_debug.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fixed_generic.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\kiss_fft.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\kiss_fftr.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lpc.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lpc_bfin.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lsp.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\ltp.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\ltp_arm4.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\ltp_bfin.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\ltp_sse.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\math_approx.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\misc.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\misc_bfin.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\modes.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\nb_celp.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\pseudofloat.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\quant_lsp.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\sb_celp.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\smallft.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\stack_alloc.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vbr.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vorbis_psy.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vq.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vq_arm4.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vq_bfin.h" />
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vq_sse.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lib\LibStatic\LibStatic.vcxproj">
<Project>{6533bdae-0f0c-45e4-8fe7-add0f37fe063}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,293 @@
<?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>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="PortAudio">
<UniqueIdentifier>{ee60c16e-fd9b-441d-b870-e7ae1e2c30b5}</UniqueIdentifier>
</Filter>
<Filter Include="Speex">
<UniqueIdentifier>{697ab237-c79e-4088-af87-3a38f52fe592}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\RakVoice.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\pa_convert.c">
<Filter>PortAudio</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\pa_lib.c">
<Filter>PortAudio</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\pa_trace.c">
<Filter>PortAudio</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\portaudio_v18_1\pa_win_wmme\pa_win_wmme.c">
<Filter>PortAudio</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\bits.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\cb_search.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_10_16_table.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_10_32_table.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_20_32_table.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_5_256_table.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_5_64_table.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\exc_8_128_table.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fftwrap.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\filters.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\gain_table.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\gain_table_lbr.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\hexc_10_32_table.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\hexc_table.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\high_lsp_tables.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\jitter.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\kiss_fft.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\kiss_fftr.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lbr_48k_tables.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lpc.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lsp.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lsp_tables_nb.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\ltp.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\math_approx.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\mdf.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\misc.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\modes.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\nb_celp.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\preprocess.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\quant_lsp.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\sb_celp.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\smallft.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\speex.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\speex_callbacks.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\speex_header.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\stereo.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vbr.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vorbis_psy.c">
<Filter>Speex</Filter>
</ClCompile>
<ClCompile Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vq.c">
<Filter>Speex</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\DependentExtensions\RakVoice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\pa_host.h">
<Filter>PortAudio</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\pa_trace.h">
<Filter>PortAudio</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\portaudio_v18_1\pa_common\portaudio.h">
<Filter>PortAudio</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\_kiss_fft_guts.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\arch.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\cb_search.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\cb_search_arm4.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\cb_search_bfin.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\cb_search_sse.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fftwrap.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\filters.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\filters_arm4.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\filters_bfin.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\filters_sse.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fixed_arm4.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fixed_arm5e.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fixed_bfin.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fixed_debug.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\fixed_generic.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\kiss_fft.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\kiss_fftr.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lpc.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lpc_bfin.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\lsp.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\ltp.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\ltp_arm4.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\ltp_bfin.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\ltp_sse.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\math_approx.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\misc.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\misc_bfin.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\modes.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\nb_celp.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\pseudofloat.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\quant_lsp.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\sb_celp.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\smallft.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\stack_alloc.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vbr.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vorbis_psy.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vq.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vq_arm4.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vq_bfin.h">
<Filter>Speex</Filter>
</ClInclude>
<ClInclude Include="..\..\DependentExtensions\speex-1.1.12\libspeex\vq_sse.h">
<Filter>Speex</Filter>
</ClInclude>
</ItemGroup>
</Project>

385
Samples/RakVoice/main.cpp Normal file
View File

@ -0,0 +1,385 @@
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file in the same directory.
*
*
* Modified work: Copyright (c) 2016-2020, SLikeSoft UG (haftungsbeschränkt)
*
* This source code was modified by SLikeSoft. Modifications are licensed under the MIT-style
* license found in the license.txt file in the root directory of this source tree.
*/
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <limits> // used for std::numeric_limits
#include "portaudio.h"
#include "slikenet/Kbhit.h"
#include "slikenet/peerinterface.h"
#include "slikenet/MessageIdentifiers.h"
#include "RakVoice.h"
#include "slikenet/statistics.h"
#include "slikenet/NatPunchthroughClient.h"
#include "slikenet/BitStream.h"
#include "slikenet/Getche.h"
#include "slikenet/Gets.h"
#include "slikenet/linux_adapter.h"
#include "slikenet/osx_adapter.h"
/// To test sending to myself. Also uncomment in RakVoice.cpp
//#define _TEST_LOOPBACK
// RakVoice only works with 16-bits sound data
#define PA_SAMPLE_TYPE paInt16
typedef short SAMPLE;
// Reads and writes per second of the sound data
// Speex only supports these 3 values
#define SAMPLE_RATE (8000)
//#define SAMPLE_RATE (16000)
//#define SAMPLE_RATE (32000)
SLNet::RakPeerInterface *rakPeer;
// I think one buffer has to be full (of samples) before you hear the sound.
// So higher frames per buffer means that there will be a larger latency before you hear the sound
// However, it would lock and unlock the buffer more often, hindering performance.
#define FRAMES_PER_BUFFER (2048 / (32000 / SAMPLE_RATE))
bool mute;
SLNet::RakVoice rakVoice;
// inputBuffer and outputBuffer is an array of SAMPLE of count framesPerBuffer
// A sample is one unit of sound.
// The sample rate is the number of sound samples taken per second
// I think one frame is a set of samples equal to the number of channels. I'm not sure though or how that sample is arranged.
static int PACallback( void *inputBuffer, void *outputBuffer,
unsigned long framesPerBuffer,
PaTimestamp outTime, void *userData )
{
// unused parameters
(void)framesPerBuffer;
(void)outTime;
(void)userData;
if (inputBuffer && !mute)
{
// TODO - if the input data is mostly silence, don't send and save the bandwidth.
#ifndef _TEST_LOOPBACK
unsigned i;
for (i=0; i < rakPeer->GetMaximumNumberOfPeers(); i++)
{
rakVoice.SendFrame(rakPeer->GetGUIDFromIndex(i), inputBuffer);
}
#else
rakVoice.SendFrame(SLNet::UNASSIGNED_SYSTEM_ADDRESS, inputBuffer);
#endif
}
rakVoice.ReceiveFrame(outputBuffer);
return 0;
}
#define NAT_PUNCHTHROUGH_FACILITATOR_PORT 61111
int main(void)
{
PortAudioStream *stream;
PaError err;
mute=false;
bool quit;
int ch;
printf("A sample on how to use RakVoice. You need a microphone for this sample.\n");
printf("RakVoice relies on Speex for voice encoding and decoding.\n");
printf("See DependentExtensions/RakVoice/speex-1.1.12 for speex projects.\n");
printf("For windows, I had to define HAVE_CONFIG_H, include win32/config.h,\n");
printf("and include the files under libspeex, except those that start with test.\n");
printf("PortAudio is also included and is used to read and write audio data. You\n");
printf("can substitute whatever you want if you do not want to use portaudio.\n");
printf("Difficulty: Advanced\n\n");
// Since voice is peer to peer, we give the option to use the nat punchthrough client if desired.
SLNet::NatPunchthroughClient natPunchthroughClient;
char port[256];
rakPeer = SLNet::RakPeerInterface::GetInstance();
printf("Enter local port (enter for default): ");
Gets(port, sizeof(port));
if (port[0]==0)
strcpy_s(port, "60000");
const int intLocalPort = atoi(port);
if ((intLocalPort < 0) || (intLocalPort > std::numeric_limits<unsigned short>::max())) {
printf("Specified local port %d is outside valid bounds [0, %u]", intLocalPort, std::numeric_limits<unsigned short>::max());
return 1;
}
SLNet::SocketDescriptor socketDescriptor(static_cast<unsigned short>(intLocalPort), 0);
rakPeer->Startup(4, &socketDescriptor, 1);
rakPeer->SetMaximumIncomingConnections(4);
rakPeer->AttachPlugin(&rakVoice);
rakPeer->AttachPlugin(&natPunchthroughClient);
rakVoice.Init(SAMPLE_RATE, FRAMES_PER_BUFFER*sizeof(SAMPLE));
err = Pa_Initialize();
if( err != paNoError ) goto error;
err = Pa_OpenStream(
&stream,
Pa_GetDefaultInputDeviceID(),
1, // Num channels, whatever that means
PA_SAMPLE_TYPE,
nullptr,
Pa_GetDefaultOutputDeviceID(),
1, // Num channels
PA_SAMPLE_TYPE,
nullptr,
SAMPLE_RATE,
FRAMES_PER_BUFFER, /* frames per buffer */
0, /* number of buffers, if zero then use default minimum */
0, /* paDitherOff, // flags */
PACallback,
0 );
if( err != paNoError ) goto error;
err = Pa_StartStream( stream );
if( err != paNoError ) goto error;
printf("Support NAT punchthrough? (y/n)? ");
bool useNatPunchthrough;
useNatPunchthrough=(_getche()=='y');
printf("\n");
char facilitatorIP[256];
{//Linux fix. Won't compile without it. Because of the goto error above, the scope is ambigious. Make it a block to define that it will not be used after the jump.
//Doesn't change current logic
SLNet::SystemAddress facilitator;
if (useNatPunchthrough)
{
printf("My GUID is %s\n", rakPeer->GetGuidFromSystemAddress(SLNet::UNASSIGNED_SYSTEM_ADDRESS).ToString());
printf("Enter IP of facilitator (enter for default): ");
Gets(facilitatorIP,sizeof(facilitatorIP));
if (facilitatorIP[0]==0)
strcpy_s(facilitatorIP, "natpunch.slikesoft.com");
facilitator.FromString(facilitatorIP);
facilitator.SetPortHostOrder(NAT_PUNCHTHROUGH_FACILITATOR_PORT);
rakPeer->Connect(facilitatorIP, NAT_PUNCHTHROUGH_FACILITATOR_PORT, 0, 0);
printf("Connecting to facilitator...\n");
}
else
{
printf("Not supporting NAT punchthrough.\n");
}
SLNet::Packet *p;
quit=false;
if (useNatPunchthrough==false)
printf("(Q)uit. (C)onnect. (D)isconnect. C(l)ose voice channels. (M)ute. ' ' for stats.\n");
while (!quit)
{
if (_kbhit())
{
ch=_getch();
if (ch=='y')
{
quit=true;
}
else if (ch=='c')
{
if (useNatPunchthrough)
{
SLNet::RakNetGUID destination;
printf("Enter GUID of destination: ");
char guidStr[256];
for(;;)
{
Gets(guidStr,sizeof(guidStr));
if (!destination.FromString(guidStr))
printf("Invalid GUID format. Try again.\nEnter GUID of destination: ");
else
break;
}
printf("Starting NAT punch. Please wait...\n");
natPunchthroughClient.OpenNAT(destination,facilitator);
}
else
{
char ip[256];
printf("Enter IP of remote system: ");
Gets(ip, sizeof(ip));
if (ip[0]==0)
strcpy_s(ip, "127.0.0.1");
printf("Enter port of remote system: ");
Gets(port, sizeof(port));
if (port[0]==0)
strcpy_s(port, "60000");
const int intRemotePort = atoi(port);
if ((intRemotePort < 0) || (intRemotePort > std::numeric_limits<unsigned short>::max())) {
printf("Specified remote port %d is outside valid bounds [0, %u]", intRemotePort, std::numeric_limits<unsigned short>::max());
return 2;
}
rakPeer->Connect(ip, static_cast<unsigned short>(intRemotePort), 0,0);
}
}
else if (ch=='m')
{
mute=!mute;
if (mute)
printf("Now muted.\n");
else
printf("No longer muted.\n");
}
else if (ch=='d')
{
rakPeer->Shutdown(100,0);
}
else if (ch=='l')
{
rakVoice.CloseAllChannels();
}
else if (ch==' ')
{
char message[2048];
SLNet::RakNetStatistics *rss=rakPeer->GetStatistics(rakPeer->GetSystemAddressFromIndex(0));
StatisticsToString(rss, message, 2048, 2);
printf("%s", message);
}
else if (ch=='q')
quit=true;
ch=0;
}
p=rakPeer->Receive();
while (p)
{
if (p->data[0]==ID_CONNECTION_REQUEST_ACCEPTED)
{
if (p->systemAddress==facilitator)
{
printf("Connection to facilitator completed\n");
printf("(Q)uit. (C)onnect. (D)isconnect. (M)ute. ' ' for stats.\n");
}
else
{
printf("ID_CONNECTION_REQUEST_ACCEPTED from %s\n", p->systemAddress.ToString());
rakVoice.RequestVoiceChannel(p->guid);
}
}
else if (p->data[0]==ID_CONNECTION_ATTEMPT_FAILED)
{
if (p->systemAddress==facilitator)
{
printf("Connection to facilitator failed. Using direct connections\n");
useNatPunchthrough=false;
printf("(Q)uit. (C)onnect. (D)isconnect. (M)ute. ' ' for stats.\n");
}
else
{
printf("ID_CONNECTION_ATTEMPT_FAILED\n");
}
}
else if (p->data[0]==ID_RAKVOICE_OPEN_CHANNEL_REQUEST || p->data[0]==ID_RAKVOICE_OPEN_CHANNEL_REPLY)
{
printf("Got new channel from %s\n", p->systemAddress.ToString());
}
else if (p->data[0]==ID_NAT_TARGET_NOT_CONNECTED)
{
SLNet::RakNetGUID g;
SLNet::BitStream b(p->data, p->length, false);
b.IgnoreBits(8); // Ignore the ID_...
b.Read(g);
printf("ID_NAT_TARGET_NOT_CONNECTED for %s\n", g.ToString());
}
else if (p->data[0]==ID_NAT_TARGET_UNRESPONSIVE)
{
SLNet::RakNetGUID g;
SLNet::BitStream b(p->data, p->length, false);
b.IgnoreBits(8); // Ignore the ID_...
b.Read(g);
printf("ID_NAT_TARGET_UNRESPONSIVE for %s\n", g.ToString());
}
else if (p->data[0]==ID_NAT_CONNECTION_TO_TARGET_LOST)
{
SLNet::RakNetGUID g;
SLNet::BitStream b(p->data, p->length, false);
b.IgnoreBits(8); // Ignore the ID_...
b.Read(g);
printf("ID_NAT_CONNECTION_TO_TARGET_LOST for %s\n", g.ToString());
}
else if (p->data[0]==ID_NAT_ALREADY_IN_PROGRESS)
{
SLNet::RakNetGUID g;
SLNet::BitStream b(p->data, p->length, false);
b.IgnoreBits(8); // Ignore the ID_...
b.Read(g);
printf("ID_NAT_ALREADY_IN_PROGRESS for %s\n", g.ToString());
}
else if (p->data[0]==ID_NAT_PUNCHTHROUGH_FAILED)
{
printf("ID_NAT_PUNCHTHROUGH_FAILED for %s\n", p->guid.ToString());
}
else if (p->data[0]==ID_NAT_PUNCHTHROUGH_SUCCEEDED)
{
printf("ID_NAT_PUNCHTHROUGH_SUCCEEDED for %s. Connecting...\n", p->guid.ToString());
rakPeer->Connect(p->systemAddress.ToString(false),p->systemAddress.GetPort(),0,0);
}
else if (p->data[0]==ID_ALREADY_CONNECTED)
{
printf("ID_ALREADY_CONNECTED\n");
}
else if (p->data[0]==ID_RAKVOICE_CLOSE_CHANNEL)
{
printf("ID_RAKVOICE_CLOSE_CHANNEL\n");
}
else if (p->data[0]==ID_DISCONNECTION_NOTIFICATION)
{
printf("ID_DISCONNECTION_NOTIFICATION\n");
}
else if (p->data[0]==ID_NEW_INCOMING_CONNECTION)
{
printf("ID_NEW_INCOMING_CONNECTION\n");
}
else
{
printf("Unknown packet ID %i\n", p->data[0]);
}
rakPeer->DeallocatePacket(p);
p=rakPeer->Receive();
}
Pa_Sleep( 30 );
}
}
err = Pa_CloseStream( stream );
if( err != paNoError ) goto error;
Pa_Terminate();
rakPeer->Shutdown(300);
SLNet::RakPeerInterface::DestroyInstance(rakPeer);
return 0;
error:
Pa_Terminate();
fprintf( stderr, "An error occured while using the portaudio stream\n" );
fprintf( stderr, "Error number: %d\n", err );
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
return -1;
}