Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit 5a7fc56

Browse files
authored
Pull cross-platform plugin into develop
Pulling cross-platform spatializer feature into develop.
2 parents e544757 + 5884ae1 commit 5a7fc56

File tree

167 files changed

+4556
-6098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+4556
-6098
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[Ll]ibrary/
2+
[Ll]ogs/
23
[Tt]emp/
34
[Oo]bj/
45
[Bb]uild/
56
[Bb]uilds/
7+
[Uu]serSettings/
68
Assets/AssetStoreTools*
79

810
# Visual Studio cache directory
@@ -24,6 +26,7 @@ ExportedObj/
2426
*.pdb
2527
*.opendb
2628
*.log
29+
.vsconfig
2730

2831
# Unity3D generated meta files
2932
*.pidb.meta
@@ -37,6 +40,7 @@ sysinfo.txt
3740

3841
# No binaries
3942
*.dll
43+
*.so
4044

4145
# Ignore VS Code settings
42-
.vscode/launch.json
46+
.vscode/*
21.9 KB
Loading
42.7 KB
Loading
58.9 KB
Loading
35.8 KB
Loading

Documentation/QuickStart.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# How to add the plugin to Unity projects
2+
3+
## 1. Add the spatializer package reference to manifest.json
4+
This is the recommended way to add the plugin package to a project.
5+
- Open the `manifest.json` file from the project in a text editor
6+
- Add Microsoft's scoped registry and the package reference
7+
<pre>
8+
{
9+
"scopedRegistries": [
10+
{
11+
"name": "Microsoft Spatializer",
12+
"url": "https://microsoft.pkgs.visualstudio.com/Analog/_packaging/MixedReality-UPM-Internal/npm/registry/",
13+
"scopes": [
14+
"com.microsoft.spatialaudio"
15+
]
16+
},
17+
...
18+
],
19+
"dependencies": {
20+
...
21+
"com.microsoft.spatialaudio.spatializer.unity": "2.0.5-prerelease",
22+
...
23+
}
24+
}
25+
</pre>
26+
27+
For an example, see the [sample project manifest.](../samples/MicrosoftSpatializerSample/Packages/manifest.json)
28+
29+
The plugin package can also be downloaded from GitHub releases and imported into the project using `Assets > Import Package > Custom Package` menu.
30+
31+
## 2. Configure the project to use Microsoft Spatializer
32+
- Open the project settings using `Edit > Project Settings`
33+
- In the `Audio` tab, select `Microsoft Spatializer` in the `Spatializer Settings` dropdown. No other changes are necessary.
34+
35+
![Project Settings](./Images/ProjectSettings.png)
36+
37+
## 3. Add the Microsoft Spatializer Mixer to the project
38+
`Microsoft Spatializer Mixer` effect is necessary to process all the spatialized audio objects in a scene.
39+
- Add an audio mixer to the project
40+
- In the `Project` pane, right-click on the `Assets` folder, then `Create > Audio Mixer`
41+
- Give the mixer a name, e.g. `Master`
42+
- Open the mixer and right-click, then select `Add effect at bottom > Microsoft Spatializer Mixer`
43+
44+
![Microsoft Spatializer Mixer](./Images/SpatializerMixerSetup.png)
45+
46+
## 4. Spatialize audio objects
47+
- Setup spatialized audio objects as usual, making sure to route the `Output` to the `Master` audio mixer setup above.
48+
49+
![Audio Object Settings](./Images/AudioObjectSettings.png)
50+
51+
52+

Pipelines/Templates/Build.yaml

Lines changed: 44 additions & 186 deletions
Original file line numberDiff line numberDiff line change
@@ -2,195 +2,53 @@
22
# Licensed under the MIT License.
33

44
jobs:
5-
- job: Windows_x64_Desktop
6-
continueOnError: false
7-
pool:
8-
vmImage: 'windows-2019'
9-
Demands:
10-
- msbuild
11-
- visualstudio
125

13-
steps:
14-
- script: echo Building Windows x64 Desktop
15-
- checkout: self
16-
submodules: true
17-
- script: 'echo git submodule update --init --recursive'
18-
displayName: 'Update Submodules'
19-
- script: python tools\runcmake.py --windows --version $(ProductVersion)
20-
displayName: 'Run CMake'
21-
- task: MSBuild@1
22-
inputs:
23-
solution: 'build\windows\x64\Microsoft.SpatialAudio.Unity.sln'
24-
msbuildArchitecture: 'x64'
25-
configuration: 'RelWithDebInfo'
26-
clean: true
27-
- task: CopyFiles@2
28-
inputs:
29-
SourceFolder: 'build\windows\x64\bin\RelWithDebInfo'
30-
Contents: '**'
31-
TargetFolder: '$(Build.ArtifactStagingDirectory)\$(Agent.JobName)'
32-
- task: PublishBuildArtifacts@1
33-
inputs:
34-
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
35-
ArtifactName: $(Agent.JobName)
36-
publishLocation: 'Container'
6+
# Windows Flavors
7+
- template: BuildWindows.yaml
8+
parameters:
9+
platform: windows
10+
architecture: Win32
11+
configuration: RelWithDebInfo
3712

38-
- job: Windows_x86_Desktop
39-
continueOnError: false
40-
pool:
41-
vmImage: 'windows-2019'
42-
Demands:
43-
- msbuild
44-
- visualstudio
45-
steps:
46-
- script: echo Building Windows x86 Desktop
47-
- checkout: self
48-
submodules: true
49-
- script: 'echo git submodule update --init --recursive'
50-
displayName: 'Update Submodules'
51-
- script: python tools\runcmake.py --windows --version $(ProductVersion)
52-
displayName: 'Run CMake'
53-
- task: MSBuild@1
54-
inputs:
55-
solution: 'build\windows\x86\Microsoft.SpatialAudio.Unity.sln'
56-
msbuildArchitecture: 'x64'
57-
configuration: 'RelWithDebInfo'
58-
clean: true
59-
- task: CopyFiles@2
60-
inputs:
61-
SourceFolder: 'build\windows\x86\bin\RelWithDebInfo'
62-
Contents: '**'
63-
TargetFolder: '$(Build.ArtifactStagingDirectory)\$(Agent.JobName)'
64-
- task: PublishBuildArtifacts@1
65-
inputs:
66-
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
67-
ArtifactName: $(Agent.JobName)
68-
publishLocation: 'Container'
13+
- template: BuildWindows.yaml
14+
parameters:
15+
platform: windows
16+
architecture: x64
17+
configuration: RelWithDebInfo
6918

70-
- job: Windows_x64_UWP
71-
continueOnError: false
72-
pool:
73-
vmImage: 'windows-2019'
74-
Demands:
75-
- msbuild
76-
- visualstudio
77-
steps:
78-
- script: echo Building Windows x64 UWP
79-
- checkout: self
80-
submodules: true
81-
- script: 'echo git submodule update --init --recursive'
82-
displayName: 'Update Submodules'
83-
- script: python tools\runcmake.py --windowsstore --version $(ProductVersion)
84-
displayName: 'Run CMake'
85-
- task: MSBuild@1
86-
inputs:
87-
solution: 'build\WindowsStore\x64\Microsoft.SpatialAudio.Unity.sln'
88-
msbuildArchitecture: 'x64'
89-
configuration: 'RelWithDebInfo'
90-
clean: true
91-
- task: CopyFiles@2
92-
inputs:
93-
SourceFolder: 'build\WindowsStore\x64\bin\RelWithDebInfo'
94-
Contents: '**'
95-
TargetFolder: '$(Build.ArtifactStagingDirectory)\$(Agent.JobName)'
96-
- task: PublishBuildArtifacts@1
97-
inputs:
98-
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
99-
ArtifactName: $(Agent.JobName)
100-
publishLocation: 'Container'
19+
- template: BuildWindows.yaml
20+
parameters:
21+
platform: windowsstore
22+
architecture: Win32
23+
configuration: RelWithDebInfo
10124

102-
- job: Windows_x86_UWP
103-
continueOnError: false
104-
pool:
105-
vmImage: 'windows-2019'
106-
Demands:
107-
- msbuild
108-
- visualstudio
109-
steps:
110-
- script: echo Building Windows x86 UWP
111-
- checkout: self
112-
submodules: true
113-
- script: 'echo git submodule update --init --recursive'
114-
displayName: 'Update Submodules'
115-
- script: python tools\runcmake.py --windowsstore --version $(ProductVersion)
116-
displayName: 'Run CMake'
117-
- task: MSBuild@1
118-
inputs:
119-
solution: 'build\WindowsStore\x86\Microsoft.SpatialAudio.Unity.sln'
120-
msbuildArchitecture: 'x64'
121-
configuration: 'RelWithDebInfo'
122-
clean: true
123-
- task: CopyFiles@2
124-
inputs:
125-
SourceFolder: 'build\WindowsStore\x86\bin\RelWithDebInfo'
126-
Contents: '**'
127-
TargetFolder: '$(Build.ArtifactStagingDirectory)\$(Agent.JobName)'
128-
- task: PublishBuildArtifacts@1
129-
inputs:
130-
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
131-
ArtifactName: $(Agent.JobName)
132-
publishLocation: 'Container'
25+
- template: BuildWindows.yaml
26+
parameters:
27+
platform: windowsstore
28+
architecture: x64
29+
configuration: RelWithDebInfo
13330

134-
- job: Windows_ARM_UWP
135-
continueOnError: false
136-
pool:
137-
vmImage: 'windows-2019'
138-
Demands:
139-
- msbuild
140-
- visualstudio
141-
steps:
142-
- script: echo Building Windows ARM UWP
143-
- checkout: self
144-
submodules: true
145-
- script: 'echo git submodule update --init --recursive'
146-
displayName: 'Update Submodules'
147-
- script: python tools\runcmake.py --windowsstore --version $(ProductVersion)
148-
displayName: 'Run CMake'
149-
- task: MSBuild@1
150-
inputs:
151-
solution: 'build\WindowsStore\ARM\Microsoft.SpatialAudio.Unity.sln'
152-
msbuildArchitecture: 'x64'
153-
configuration: 'RelWithDebInfo'
154-
clean: true
155-
- task: CopyFiles@2
156-
inputs:
157-
SourceFolder: 'build\WindowsStore\ARM\bin\RelWithDebInfo'
158-
Contents: '**'
159-
TargetFolder: '$(Build.ArtifactStagingDirectory)\$(Agent.JobName)'
160-
- task: PublishBuildArtifacts@1
161-
inputs:
162-
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
163-
ArtifactName: $(Agent.JobName)
164-
publishLocation: 'Container'
31+
- template: BuildWindows.yaml
32+
parameters:
33+
platform: windowsstore
34+
architecture: ARM
35+
configuration: RelWithDebInfo
16536

166-
- job: Windows_ARM64_UWP
167-
continueOnError: false
168-
pool:
169-
vmImage: 'windows-2019'
170-
Demands:
171-
- msbuild
172-
- visualstudio
173-
steps:
174-
- script: echo Building Windows ARM64 UWP
175-
- checkout: self
176-
submodules: true
177-
- script: 'echo git submodule update --init --recursive'
178-
displayName: 'Update Submodules'
179-
- script: python tools\runcmake.py --windowsstore --version $(ProductVersion)
180-
displayName: 'Run CMake'
181-
- task: MSBuild@1
182-
inputs:
183-
solution: 'build\WindowsStore\ARM64\Microsoft.SpatialAudio.Unity.sln'
184-
msbuildArchitecture: 'x64'
185-
configuration: 'RelWithDebInfo'
186-
clean: true
187-
- task: CopyFiles@2
188-
inputs:
189-
SourceFolder: 'build\WindowsStore\ARM64\bin\RelWithDebInfo'
190-
Contents: '**'
191-
TargetFolder: '$(Build.ArtifactStagingDirectory)\$(Agent.JobName)'
192-
- task: PublishBuildArtifacts@1
193-
inputs:
194-
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
195-
ArtifactName: $(Agent.JobName)
196-
publishLocation: 'Container'
37+
- template: BuildWindows.yaml
38+
parameters:
39+
platform: windowsstore
40+
architecture: ARM64
41+
configuration: RelWithDebInfo
42+
43+
# Android Flavors
44+
- template: BuildAndroid.yaml
45+
parameters:
46+
configuration: RelWithDebInfo
47+
architecture: armeabi-v7a
48+
jobName: arm
49+
50+
- template: BuildAndroid.yaml
51+
parameters:
52+
configuration: RelWithDebInfo
53+
architecture: arm64-v8a
54+
jobName: arm64
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
parameters:
5+
- name: jobName
6+
type: string
7+
default: arm
8+
- name: architecture
9+
type: string
10+
default: armeabi-v7a
11+
- name: configuration
12+
type: string
13+
default: RelWithDebInfo
14+
values:
15+
- Debug
16+
- RelWithDebInfo
17+
18+
jobs:
19+
- job: Android_${{ parameters.jobName }}_${{ parameters.configuration }}
20+
pool:
21+
name: Analog-1ES-WindowsLatest
22+
vmImage: 'windows-2019'
23+
dependsOn: []
24+
steps:
25+
- checkout: self
26+
submodules: true
27+
fetchDepth: 1
28+
- template: DownloadPackage.yaml
29+
- task: PythonScript@0
30+
displayName: 'Run CMake'
31+
inputs:
32+
scriptSource: 'filePath'
33+
scriptPath: tools/runcmake.py
34+
arguments: --android --version $(ProductVersion)
35+
abortOnFail: true
36+
- task: PythonScript@0
37+
displayName: Build
38+
inputs:
39+
scriptSource: 'filePath'
40+
scriptPath: tools/build.py
41+
arguments: --platform android --arch ${{ parameters.architecture }} --config ${{ parameters.configuration }}
42+
abortOnFail: true
43+
- task: CopyFiles@2
44+
inputs:
45+
SourceFolder: 'build\android\${{ parameters.architecture }}\lib\${{ parameters.configuration }}'
46+
Contents: '**'
47+
TargetFolder: '$(Build.ArtifactStagingDirectory)\$(Agent.JobName)'
48+
- task: PublishBuildArtifacts@1
49+
inputs:
50+
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
51+
ArtifactName: $(Agent.JobName)
52+
publishLocation: 'Container'

0 commit comments

Comments
 (0)