Merge branch 'develop' into user/ashtat/FixSpatializerBuzz
This commit is contained in:
Коммит
5be0d412b9
|
@ -25,7 +25,6 @@ jobs:
|
|||
- checkout: self
|
||||
submodules: true
|
||||
fetchDepth: 1
|
||||
- template: DownloadPackage.yaml
|
||||
- task: PythonScript@0
|
||||
displayName: 'Run CMake'
|
||||
inputs:
|
||||
|
|
|
@ -30,7 +30,6 @@ jobs:
|
|||
submodules: true
|
||||
- script: 'echo git submodule update --init --recursive'
|
||||
displayName: 'Update Submodules'
|
||||
- template: DownloadPackage.yaml
|
||||
- script: python tools\runcmake.py --${{ parameters.platform }} --version $(ProductVersion)
|
||||
displayName: 'Run CMake'
|
||||
- task: MSBuild@1
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
parameters:
|
||||
- name: package
|
||||
type: string
|
||||
default: 'pa-hrtfdsp'
|
||||
- name: version
|
||||
type: string
|
||||
default: '2.1.727-prerelease'
|
||||
- name: destination
|
||||
type: string
|
||||
default: $(Build.SourcesDirectory)\Source\External\hrtfdsp
|
||||
|
||||
steps:
|
||||
- task: UniversalPackages@0
|
||||
displayName: Download Universal Package
|
||||
inputs:
|
||||
command: download
|
||||
downloadDirectory: ${{ parameters.destination }}
|
||||
feedsToUse: external
|
||||
externalFeedCredentials: $(AIPMRConnection)
|
||||
feedDownloadExternal: 'SpatialAudio-packages'
|
||||
packageDownloadExternal: ${{ parameters.package }}
|
||||
versionDownloadExternal: ${{ parameters.version }}
|
||||
|
||||
|
|
@ -26,11 +26,14 @@ endif ()
|
|||
# Configuration
|
||||
set (EXTERNAL_LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/External)
|
||||
|
||||
# HrtfDsp Version and Path
|
||||
set (HRTFDSP_VERSION "Microsoft.ProjectAcoustics.HrtfDsp.3.0.130-prerelease")
|
||||
|
||||
include_directories (
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${EXTERNAL_LIB_PATH}
|
||||
${EXTERNAL_LIB_PATH}/wil/include
|
||||
${EXTERNAL_LIB_PATH}/HrtfDsp/include)
|
||||
${EXTERNAL_LIB_PATH}/${HRTFDSP_VERSION}/HrtfDsp/include)
|
||||
|
||||
# Compiler and linker options
|
||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
|
||||
|
|
|
@ -21,9 +21,9 @@ set (AUDIOPLUGIN_SRC
|
|||
PluginList.h)
|
||||
|
||||
if (MSVC)
|
||||
set (HRTFDSP_LIB ${EXTERNAL_LIB_PATH}/HrtfDsp/${CMAKE_SYSTEM_NAME}/${ARCHITECTURE}/HrtfDsp.lib)
|
||||
set (HRTFDSP_LIB ${EXTERNAL_LIB_PATH}/${HRTFDSP_VERSION}/HrtfDsp/${CMAKE_SYSTEM_NAME}/${ARCHITECTURE}/HrtfDsp.lib)
|
||||
elseif (ANDROID)
|
||||
set (HRTFDSP_LIB ${EXTERNAL_LIB_PATH}/HrtfDsp/${CMAKE_SYSTEM_NAME}/${ARCHITECTURE}/libHrtfDsp.so)
|
||||
set (HRTFDSP_LIB ${EXTERNAL_LIB_PATH}/${HRTFDSP_VERSION}/HrtfDsp/${CMAKE_SYSTEM_NAME}/${ARCHITECTURE}/libHrtfDsp.so)
|
||||
endif()
|
||||
|
||||
add_library (${PROJECT_NAME} SHARED ${AUDIOPLUGIN_SRC})
|
||||
|
@ -43,15 +43,15 @@ target_link_libraries (${PROJECT_NAME}
|
|||
if (WIN32)
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${EXTERNAL_LIB_PATH}/HrtfDsp/${CMAKE_SYSTEM_NAME}/${ARCHITECTURE}/HrtfDsp.dll"
|
||||
"${EXTERNAL_LIB_PATH}/${HRTFDSP_VERSION}/HrtfDsp/${CMAKE_SYSTEM_NAME}/${ARCHITECTURE}/HrtfDsp.dll"
|
||||
$<TARGET_FILE_DIR:AudioPluginMicrosoftSpatializerCrossPlatform>)
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${EXTERNAL_LIB_PATH}/HrtfDsp/${CMAKE_SYSTEM_NAME}/${ARCHITECTURE}/HrtfDsp.pdb"
|
||||
"${EXTERNAL_LIB_PATH}/${HRTFDSP_VERSION}/HrtfDsp/${CMAKE_SYSTEM_NAME}/${ARCHITECTURE}/HrtfDsp.pdb"
|
||||
$<TARGET_FILE_DIR:AudioPluginMicrosoftSpatializerCrossPlatform>)
|
||||
elseif (ANDROID)
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${EXTERNAL_LIB_PATH}/HrtfDsp/${CMAKE_SYSTEM_NAME}/${ARCHITECTURE}/libHrtfDsp.so"
|
||||
"${EXTERNAL_LIB_PATH}/${HRTFDSP_VERSION}/HrtfDsp/${CMAKE_SYSTEM_NAME}/${ARCHITECTURE}/libHrtfDsp.so"
|
||||
$<TARGET_FILE_DIR:AudioPluginMicrosoftSpatializerCrossPlatform>)
|
||||
endif ()
|
|
@ -82,7 +82,7 @@ HrtfWrapper::HrtfWrapper()
|
|||
m_AvailableProcessingSlots.push(static_cast<unsigned char>(c_HrtfMaxSources - i - 1));
|
||||
}
|
||||
|
||||
if (!HrtfEngineInitialize(c_HrtfMaxSources, HrtfEngineType_Flex, c_HrtfFrameCount, &m_FlexEngine))
|
||||
if (!HrtfEngineInitialize(c_HrtfMaxSources, HrtfEngineType_FlexBinaural_High, c_HrtfFrameCount, &m_FlexEngine))
|
||||
{
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
|
|
|
@ -119,7 +119,6 @@ namespace Spatializer
|
|||
acousticParams.EarlyReflections60DbDecaySeconds = c_DefaultEarlyReflections60DbDecaySeconds;
|
||||
acousticParams.LateReverb60DbDecaySeconds = c_DefaultLateReverb60DbDecaySeconds;
|
||||
acousticParams.Outdoorness = c_DefaultOutdoorness;
|
||||
acousticParams.HrtfMode = static_cast<HrtfDspMode>(HrtfDspMode_Quality1);
|
||||
|
||||
data->EffectHrtfInfo->SetParameters(&acousticParams);
|
||||
}
|
||||
|
|
|
@ -22,12 +22,6 @@ crossplatform_spatializer_npm_package_name= "com.microsoft.spatialaudio.spatiali
|
|||
crossplatform_spatializer_plugin_name = "Microsoft.SpatialAudio.Spatializer.Unity"
|
||||
crossplatform_unity_project_dir = "Source/Plugins/CrossPlatformPluginGenerator"
|
||||
|
||||
# Where to get the Universal Package dependencies
|
||||
aipmr_azure_org = "https://dev.azure.com/aipmr/"
|
||||
aipmr_package_feed = "SpatialAudio-packages"
|
||||
hrtfdsp_package_name = "pa-hrtfdsp"
|
||||
hrtfdsp_package_version = "2.1.727-prerelease"
|
||||
|
||||
# Supported build platforms and configs
|
||||
build_platform_arch_map = {
|
||||
"Windows": ["Win32", "x64"],
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="SpatialAudio-Packages" value="https://pkgs.dev.azure.com/aipmr/MixedReality-Unity-Packages/_packaging/SpatialAudio-Packages/nuget/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.ProjectAcoustics.HrtfDsp" version="3.0.130-prerelease" targetFramework="native" />
|
||||
</packages>
|
|
@ -30,14 +30,19 @@ android_x86_debug_cmake = ["\"MinGW Makefiles\"", "-DCMAKE_BUILD_TYPE=Debug", "-
|
|||
def call_cmake():
|
||||
return "cmake -G "
|
||||
|
||||
def download_universal_package(org, feed, package, version, dest):
|
||||
command = \
|
||||
"az artifacts universal download --organization " + org + \
|
||||
" --feed " + feed + \
|
||||
" --name " + package + \
|
||||
" --version " + version + \
|
||||
" --path " + dest
|
||||
subprocess.run(command, cwd = githelpers.get_root(), check = True, shell = True)
|
||||
def install_nuget_package():
|
||||
tools_dir = oshelpers.fixpath(githelpers.get_root(), 'tools')
|
||||
externals_root = oshelpers.fixpath(githelpers.get_root(), "Source", "External")
|
||||
nuget_restore_command = [
|
||||
"nuget",
|
||||
"restore",
|
||||
oshelpers.fixpath(tools_dir, "packages.config"),
|
||||
"-PackagesDirectory",
|
||||
externals_root,
|
||||
"-ConfigFile",
|
||||
oshelpers.fixpath(tools_dir, "nuget.config")
|
||||
]
|
||||
subprocess.check_call(nuget_restore_command, cwd=githelpers.get_root())
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
|
@ -46,7 +51,6 @@ def main():
|
|||
parser.add_argument("--android", help="Generate Android configurations", action='store_true')
|
||||
parser.add_argument("--notest", help="Skip generation of test configurations", action='store_true')
|
||||
parser.add_argument("-v", "--version", help="Semantic version string", type=str.lower)
|
||||
parser.add_argument("--download", help="Download universal packages", action='store_true')
|
||||
args = parser.parse_args()
|
||||
|
||||
cmake_windows = False
|
||||
|
@ -77,15 +81,8 @@ def main():
|
|||
build_dir = oshelpers.fixpath(git_root, constants.build_root)
|
||||
print("Creating build dirs under '%s'" %build_dir)
|
||||
|
||||
# Download universal package dependencies
|
||||
if (args.download):
|
||||
# HrtfDsp
|
||||
download_universal_package(
|
||||
constants.aipmr_azure_org,
|
||||
constants.aipmr_package_feed,
|
||||
constants.hrtfdsp_package_name,
|
||||
constants.hrtfdsp_package_version,
|
||||
oshelpers.fixpath(constants.externals_path, "hrtfdsp"))
|
||||
# Install NuGet dependencies
|
||||
install_nuget_package()
|
||||
|
||||
# Pass version (if specified) to CMake
|
||||
product_version_cmake = ''
|
||||
|
|
Загрузка…
Ссылка в новой задаче