diff --git a/Assets/Plugins/FMOD/Resources/FMODStudioSettings.asset b/Assets/Plugins/FMOD/Resources/FMODStudioSettings.asset
index 4a1424b7..246cbc0f 100644
--- a/Assets/Plugins/FMOD/Resources/FMODStudioSettings.asset
+++ b/Assets/Plugins/FMOD/Resources/FMODStudioSettings.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:75ddb953103f1ea8fe170064489dc298da624a9fbb37bfd868bd28d1d5269fb5
-size 20208
+oid sha256:5376e8b08c03fa0b41a7b0207d68fbe9fd800ca5f3f0a9e0212afa3fe9ebd9cf
+size 20242
diff --git a/Assets/Plugins/FMOD/platforms/android/lib/arm64-v8a/libphonon_fmod.so b/Assets/Plugins/FMOD/platforms/android/lib/arm64-v8a/libphonon_fmod.so
new file mode 100644
index 00000000..ee5bdeb1
Binary files /dev/null and b/Assets/Plugins/FMOD/platforms/android/lib/arm64-v8a/libphonon_fmod.so differ
diff --git a/Assets/Plugins/FMOD/platforms/android/lib/arm64-v8a/libphonon_fmod.so.meta b/Assets/Plugins/FMOD/platforms/android/lib/arm64-v8a/libphonon_fmod.so.meta
new file mode 100644
index 00000000..ed8c2bd4
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/android/lib/arm64-v8a/libphonon_fmod.so.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: 0b5b7bea62ea6294db94b4248f16efc2
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: ARM64
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/FMOD/platforms/android/lib/armeabi-v7a/libphonon_fmod.so b/Assets/Plugins/FMOD/platforms/android/lib/armeabi-v7a/libphonon_fmod.so
new file mode 100644
index 00000000..97fb50c2
Binary files /dev/null and b/Assets/Plugins/FMOD/platforms/android/lib/armeabi-v7a/libphonon_fmod.so differ
diff --git a/Assets/Plugins/FMOD/platforms/android/lib/armeabi-v7a/libphonon_fmod.so.meta b/Assets/Plugins/FMOD/platforms/android/lib/armeabi-v7a/libphonon_fmod.so.meta
new file mode 100644
index 00000000..cad98067
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/android/lib/armeabi-v7a/libphonon_fmod.so.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: 0b849e40fe5e81b469089900bf5a6c89
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/FMOD/platforms/android/lib/x86/libphonon_fmod.so b/Assets/Plugins/FMOD/platforms/android/lib/x86/libphonon_fmod.so
new file mode 100644
index 00000000..44a374de
Binary files /dev/null and b/Assets/Plugins/FMOD/platforms/android/lib/x86/libphonon_fmod.so differ
diff --git a/Assets/Plugins/FMOD/platforms/android/lib/x86/libphonon_fmod.so.meta b/Assets/Plugins/FMOD/platforms/android/lib/x86/libphonon_fmod.so.meta
new file mode 100644
index 00000000..e800d4ec
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/android/lib/x86/libphonon_fmod.so.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: c9b4dcae12879a94ca513dc8a7f31c1e
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/FMOD/platforms/ios/lib/libphonon_fmod.a b/Assets/Plugins/FMOD/platforms/ios/lib/libphonon_fmod.a
new file mode 100644
index 00000000..2a5a97d9
Binary files /dev/null and b/Assets/Plugins/FMOD/platforms/ios/lib/libphonon_fmod.a differ
diff --git a/Assets/Plugins/FMOD/platforms/ios/lib/libphonon_fmod.a.meta b/Assets/Plugins/FMOD/platforms/ios/lib/libphonon_fmod.a.meta
new file mode 100644
index 00000000..ea264b0a
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/ios/lib/libphonon_fmod.a.meta
@@ -0,0 +1,94 @@
+fileFormatVersion: 2
+guid: f413f432e23e149e8b50a104008c1894
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 0
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/FMOD/platforms/linux/lib/x86.meta b/Assets/Plugins/FMOD/platforms/linux/lib/x86.meta
new file mode 100644
index 00000000..8d92f14e
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/linux/lib/x86.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4d549d798d7a8c84aa999a3f78bfd9c2
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/FMOD/platforms/linux/lib/x86/libphonon_fmod.so b/Assets/Plugins/FMOD/platforms/linux/lib/x86/libphonon_fmod.so
new file mode 100644
index 00000000..942e2b93
Binary files /dev/null and b/Assets/Plugins/FMOD/platforms/linux/lib/x86/libphonon_fmod.so differ
diff --git a/Assets/Plugins/FMOD/platforms/linux/lib/x86/libphonon_fmod.so.meta b/Assets/Plugins/FMOD/platforms/linux/lib/x86/libphonon_fmod.so.meta
new file mode 100644
index 00000000..aeb082a2
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/linux/lib/x86/libphonon_fmod.so.meta
@@ -0,0 +1,133 @@
+fileFormatVersion: 2
+guid: 73ce13640e8f12f4bb33550f0c949cdf
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 0
+ Exclude OSXUniversal: 1
+ Exclude Win: 0
+ Exclude Win64: 0
+ Exclude WindowsStoreApps: 1
+ Exclude iOS: 1
+ Exclude tvOS: 1
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ DefaultValueInitialized: true
+ OS: Linux
+ - first:
+ Facebook: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Standalone: OSXIntel
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DontProcess: false
+ PlaceholderPath:
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ AddToEmbeddedBinaries: false
+ CompileFlags:
+ FrameworkDependencies:
+ - first:
+ tvOS: tvOS
+ second:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/FMOD/platforms/linux/lib/x86_64/libphonon_fmod.so b/Assets/Plugins/FMOD/platforms/linux/lib/x86_64/libphonon_fmod.so
new file mode 100644
index 00000000..492a69cf
Binary files /dev/null and b/Assets/Plugins/FMOD/platforms/linux/lib/x86_64/libphonon_fmod.so differ
diff --git a/Assets/Plugins/FMOD/platforms/linux/lib/x86_64/libphonon_fmod.so.meta b/Assets/Plugins/FMOD/platforms/linux/lib/x86_64/libphonon_fmod.so.meta
new file mode 100644
index 00000000..601b48a7
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/linux/lib/x86_64/libphonon_fmod.so.meta
@@ -0,0 +1,133 @@
+fileFormatVersion: 2
+guid: bce7dbe251c6a21478697206534484c0
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 0
+ Exclude Linux: 1
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXUniversal: 1
+ Exclude Win: 0
+ Exclude Win64: 0
+ Exclude WindowsStoreApps: 1
+ Exclude iOS: 1
+ Exclude tvOS: 1
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ OS: Windows
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DontProcess: false
+ PlaceholderPath:
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ AddToEmbeddedBinaries: false
+ CompileFlags:
+ FrameworkDependencies:
+ - first:
+ tvOS: tvOS
+ second:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle.meta b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle.meta
new file mode 100644
index 00000000..5eab45a1
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle.meta
@@ -0,0 +1,85 @@
+fileFormatVersion: 2
+guid: 126c394dcf1c597488688b2cc8ce5297
+folderAsset: yes
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ : Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux64: 1
+ Exclude OSXUniversal: 0
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 1
+ - first:
+ : OSXIntel
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ : OSXIntel64
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ AddToEmbeddedBinaries: false
+ CPU: AnyCPU
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/Info.plist b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/Info.plist
new file mode 100644
index 00000000..32d98d35
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/Info.plist
@@ -0,0 +1,44 @@
+
+
+
+
+ BuildMachineOSBuild
+ 22G630
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ phonon_fmod
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleLongVersionString
+
+ CFBundlePackageType
+ APPL
+ CFBundleSignature
+ ????
+ CFBundleSupportedPlatforms
+
+ MacOSX
+
+ CSResourcesFileMapped
+
+ DTCompiler
+ com.apple.compilers.llvm.clang.1_0
+ DTPlatformBuild
+
+ DTPlatformName
+ macosx
+ DTPlatformVersion
+ 14.2
+ DTSDKBuild
+ 23C53
+ DTSDKName
+ macosx14.2
+ DTXcode
+ 1520
+ DTXcodeBuild
+ 15C500b
+ LSMinimumSystemVersion
+ 10.13
+
+
diff --git a/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/Info.plist.meta b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/Info.plist.meta
new file mode 100644
index 00000000..bec4a0dc
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/Info.plist.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 4d505d7c65a257248835ab2e48494aef
diff --git a/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/MacOS/phonon_fmod b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/MacOS/phonon_fmod
new file mode 100644
index 00000000..46d7ee69
Binary files /dev/null and b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/MacOS/phonon_fmod differ
diff --git a/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/MacOS/phonon_fmod.meta b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/MacOS/phonon_fmod.meta
new file mode 100644
index 00000000..74f71700
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/MacOS/phonon_fmod.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 0da1b2994308d2d4d98ea0fa8e5c921f
diff --git a/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/_CodeSignature/CodeResources b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/_CodeSignature/CodeResources
new file mode 100644
index 00000000..d5d0fd74
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/_CodeSignature/CodeResources
@@ -0,0 +1,115 @@
+
+
+
+
+ files
+
+ files2
+
+ rules
+
+ ^Resources/
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Resources/Base\.lproj/
+
+ weight
+ 1010
+
+ ^version.plist$
+
+
+ rules2
+
+ .*\.dSYM($|/)
+
+ weight
+ 11
+
+ ^(.*/)?\.DS_Store$
+
+ omit
+
+ weight
+ 2000
+
+ ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
+
+ nested
+
+ weight
+ 10
+
+ ^.*
+
+ ^Info\.plist$
+
+ omit
+
+ weight
+ 20
+
+ ^PkgInfo$
+
+ omit
+
+ weight
+ 20
+
+ ^Resources/
+
+ weight
+ 20
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Resources/Base\.lproj/
+
+ weight
+ 1010
+
+ ^[^/]+$
+
+ nested
+
+ weight
+ 10
+
+ ^embedded\.provisionprofile$
+
+ weight
+ 20
+
+ ^version\.plist$
+
+ weight
+ 20
+
+
+
+
diff --git a/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/_CodeSignature/CodeResources.meta b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/_CodeSignature/CodeResources.meta
new file mode 100644
index 00000000..4c91f34b
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle/Contents/_CodeSignature/CodeResources.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: a78b57359ebb9b240a3756665c2ecdd3
diff --git a/Assets/Plugins/FMOD/platforms/win/lib/x86/phonon_fmod.dll b/Assets/Plugins/FMOD/platforms/win/lib/x86/phonon_fmod.dll
new file mode 100644
index 00000000..38196bef
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/win/lib/x86/phonon_fmod.dll
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5c09ef27e854126a6f8bb62106ec1499a25fd06ba884843089e55d7aaeff23d1
+size 134656
diff --git a/Assets/Plugins/FMOD/platforms/win/lib/x86/phonon_fmod.dll.meta b/Assets/Plugins/FMOD/platforms/win/lib/x86/phonon_fmod.dll.meta
new file mode 100644
index 00000000..c6fe03b9
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/win/lib/x86/phonon_fmod.dll.meta
@@ -0,0 +1,133 @@
+fileFormatVersion: 2
+guid: ce3c1a71f0bb8e94dab971e7b2d901fe
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXUniversal: 0
+ Exclude Win: 0
+ Exclude Win64: 1
+ Exclude WindowsStoreApps: 1
+ Exclude iOS: 1
+ Exclude tvOS: 1
+ - first:
+ '': OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ '': OSXIntel64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ DefaultValueInitialized: true
+ OS: Windows
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DontProcess: false
+ PlaceholderPath:
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ AddToEmbeddedBinaries: false
+ CompileFlags:
+ FrameworkDependencies:
+ - first:
+ tvOS: tvOS
+ second:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/FMOD/platforms/win/lib/x86_64/phonon_fmod.dll b/Assets/Plugins/FMOD/platforms/win/lib/x86_64/phonon_fmod.dll
new file mode 100644
index 00000000..59e03400
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/win/lib/x86_64/phonon_fmod.dll
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:78fd0461b7131811d2e111a10eeeffe645b1a369f2ac0114debfb76f886dba80
+size 177664
diff --git a/Assets/Plugins/FMOD/platforms/win/lib/x86_64/phonon_fmod.dll.meta b/Assets/Plugins/FMOD/platforms/win/lib/x86_64/phonon_fmod.dll.meta
new file mode 100644
index 00000000..704b5b2b
--- /dev/null
+++ b/Assets/Plugins/FMOD/platforms/win/lib/x86_64/phonon_fmod.dll.meta
@@ -0,0 +1,133 @@
+fileFormatVersion: 2
+guid: f248d69eef0950c4187076782e4fc109
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXUniversal: 0
+ Exclude Win: 1
+ Exclude Win64: 0
+ Exclude WindowsStoreApps: 1
+ Exclude iOS: 1
+ Exclude tvOS: 1
+ - first:
+ '': OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ '': OSXIntel64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ OS: Windows
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DontProcess: false
+ PlaceholderPath:
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ AddToEmbeddedBinaries: false
+ CompileFlags:
+ FrameworkDependencies:
+ - first:
+ tvOS: tvOS
+ second:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio.meta b/Assets/Plugins/SteamAudio.meta
new file mode 100644
index 00000000..8c33eefd
--- /dev/null
+++ b/Assets/Plugins/SteamAudio.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a3f0ef1b0fcc5ef4fbfcf8463a33ce44
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries.meta b/Assets/Plugins/SteamAudio/Binaries.meta
new file mode 100644
index 00000000..38e398b5
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f382311500bdbdf4e90e5228cb2788bd
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android.meta b/Assets/Plugins/SteamAudio/Binaries/Android.meta
new file mode 100644
index 00000000..948c8f89
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Android.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 702cfdc9907c1db4faf161f65ff4a94e
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/arm64.meta b/Assets/Plugins/SteamAudio/Binaries/Android/arm64.meta
new file mode 100644
index 00000000..73cbb2b7
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Android/arm64.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0c8f13fd3f59e3d4b870ff47df5d5960
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libaudioplugin_phonon.so b/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libaudioplugin_phonon.so
new file mode 100644
index 00000000..89f214d1
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libaudioplugin_phonon.so differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libaudioplugin_phonon.so.meta b/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libaudioplugin_phonon.so.meta
new file mode 100644
index 00000000..6f9e46de
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libaudioplugin_phonon.so.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: 65d940c607de5fe4083367b48ef41559
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 1
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: ARM64
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libphonon.so b/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libphonon.so
new file mode 100644
index 00000000..1e264517
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libphonon.so differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libphonon.so.meta b/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libphonon.so.meta
new file mode 100644
index 00000000..b021b9ca
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Android/arm64/libphonon.so.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: 32c74da812273c841a7c6f7adc2cda8f
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: ARM64
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/armv7.meta b/Assets/Plugins/SteamAudio/Binaries/Android/armv7.meta
new file mode 100644
index 00000000..83c7ebca
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Android/armv7.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 035133931f34382429e3f8f973458818
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libaudioplugin_phonon.so b/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libaudioplugin_phonon.so
new file mode 100644
index 00000000..2c6867b9
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libaudioplugin_phonon.so differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libaudioplugin_phonon.so.meta b/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libaudioplugin_phonon.so.meta
new file mode 100644
index 00000000..5e6e8226
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libaudioplugin_phonon.so.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: 45d56bf06868bce4d98f924a338394cf
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 1
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libphonon.so b/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libphonon.so
new file mode 100644
index 00000000..05048ba4
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libphonon.so differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libphonon.so.meta b/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libphonon.so.meta
new file mode 100644
index 00000000..885b853b
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Android/armv7/libphonon.so.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: 3280807063032c6488f8573e637182e0
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/x86.meta b/Assets/Plugins/SteamAudio/Binaries/Android/x86.meta
new file mode 100644
index 00000000..d8b7fa8e
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Android/x86.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 82f970e91fa348c4a9e1443d700f6765
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/x86/libaudioplugin_phonon.so b/Assets/Plugins/SteamAudio/Binaries/Android/x86/libaudioplugin_phonon.so
new file mode 100644
index 00000000..1376c1e1
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/Android/x86/libaudioplugin_phonon.so differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/x86/libaudioplugin_phonon.so.meta b/Assets/Plugins/SteamAudio/Binaries/Android/x86/libaudioplugin_phonon.so.meta
new file mode 100644
index 00000000..7a579fc0
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Android/x86/libaudioplugin_phonon.so.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: 2580d2d5225cd4942b96af150d9380b8
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 1
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/x86/libphonon.so b/Assets/Plugins/SteamAudio/Binaries/Android/x86/libphonon.so
new file mode 100644
index 00000000..37774bbe
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/Android/x86/libphonon.so differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/Android/x86/libphonon.so.meta b/Assets/Plugins/SteamAudio/Binaries/Android/x86/libphonon.so.meta
new file mode 100644
index 00000000..89dfd3db
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Android/x86/libphonon.so.meta
@@ -0,0 +1,32 @@
+fileFormatVersion: 2
+guid: d6d5bdf8052a5e146b27c150cf967d7e
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/HTML5.meta b/Assets/Plugins/SteamAudio/Binaries/HTML5.meta
new file mode 100644
index 00000000..5c6d1208
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/HTML5.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 053fd421ec3465845a0a35f08005afd0
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/HTML5/libaudioplugin_phonon.a b/Assets/Plugins/SteamAudio/Binaries/HTML5/libaudioplugin_phonon.a
new file mode 100644
index 00000000..da5eaba6
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/HTML5/libaudioplugin_phonon.a differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/HTML5/libaudioplugin_phonon.a.meta b/Assets/Plugins/SteamAudio/Binaries/HTML5/libaudioplugin_phonon.a.meta
new file mode 100644
index 00000000..91a52801
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/HTML5/libaudioplugin_phonon.a.meta
@@ -0,0 +1,126 @@
+fileFormatVersion: 2
+guid: 5ff8d05df35f4ba488394e36bf5a3782
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 1
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 0
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude WindowsStoreApps: 1
+ Exclude iOS: 1
+ Exclude tvOS: 1
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ WebGL: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DontProcess: False
+ PlaceholderPath:
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ - first:
+ tvOS: tvOS
+ second:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/HTML5/libphonon.a b/Assets/Plugins/SteamAudio/Binaries/HTML5/libphonon.a
new file mode 100644
index 00000000..e628db6a
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/HTML5/libphonon.a differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/HTML5/libphonon.a.meta b/Assets/Plugins/SteamAudio/Binaries/HTML5/libphonon.a.meta
new file mode 100644
index 00000000..4b752378
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/HTML5/libphonon.a.meta
@@ -0,0 +1,126 @@
+fileFormatVersion: 2
+guid: 1273757f124913f4d9cfe525309ccfe5
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 0
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude WindowsStoreApps: 1
+ Exclude iOS: 1
+ Exclude tvOS: 1
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ WebGL: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DontProcess: False
+ PlaceholderPath:
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ - first:
+ tvOS: tvOS
+ second:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux.meta b/Assets/Plugins/SteamAudio/Binaries/Linux.meta
new file mode 100644
index 00000000..2eab9e6e
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Linux.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4063b98da3a82e64ea56c5487aacd513
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux/x86.meta b/Assets/Plugins/SteamAudio/Binaries/Linux/x86.meta
new file mode 100644
index 00000000..b9966a53
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Linux/x86.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 0b0df2bea2345aa4f9e86bcacbc9608c
+folderAsset: yes
+timeCreated: 1500590827
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libaudioplugin_phonon.so b/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libaudioplugin_phonon.so
new file mode 100644
index 00000000..38dc074a
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libaudioplugin_phonon.so differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libaudioplugin_phonon.so.meta b/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libaudioplugin_phonon.so.meta
new file mode 100644
index 00000000..ce199035
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libaudioplugin_phonon.so.meta
@@ -0,0 +1,121 @@
+fileFormatVersion: 2
+guid: 2bcf76b2e4398cb49b45812674a7ec17
+timeCreated: 1500675747
+licenseType: Free
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 1
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 0
+ Exclude Win64: 0
+ data:
+ first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ OS: Linux
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ DefaultValueInitialized: true
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libphonon.so b/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libphonon.so
new file mode 100644
index 00000000..bc1262d1
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libphonon.so differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libphonon.so.meta b/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libphonon.so.meta
new file mode 100644
index 00000000..f29e41d6
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Linux/x86/libphonon.so.meta
@@ -0,0 +1,121 @@
+fileFormatVersion: 2
+guid: b73d370ef894b8d409fc51247d5b13cf
+timeCreated: 1500675748
+licenseType: Free
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 0
+ Exclude Win64: 0
+ data:
+ first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ OS: Linux
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ DefaultValueInitialized: true
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64.meta b/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64.meta
new file mode 100644
index 00000000..d082c308
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 72f15056fc1aa3e4e91f7d395110ca58
+folderAsset: yes
+timeCreated: 1497043676
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libaudioplugin_phonon.so b/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libaudioplugin_phonon.so
new file mode 100644
index 00000000..09e3306f
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libaudioplugin_phonon.so differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libaudioplugin_phonon.so.meta b/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libaudioplugin_phonon.so.meta
new file mode 100644
index 00000000..355d2409
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libaudioplugin_phonon.so.meta
@@ -0,0 +1,121 @@
+fileFormatVersion: 2
+guid: 45e1d12e441bb9a4d875c1c402cc3bab
+timeCreated: 1500675747
+licenseType: Free
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 1
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux: 1
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 0
+ Exclude Win64: 0
+ data:
+ first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ OS: Linux
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libphonon.so b/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libphonon.so
new file mode 100644
index 00000000..1afbc0ae
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libphonon.so differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libphonon.so.meta b/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libphonon.so.meta
new file mode 100644
index 00000000..578d8b39
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Linux/x86_64/libphonon.so.meta
@@ -0,0 +1,121 @@
+fileFormatVersion: 2
+guid: c9ba4a34d9f98f045ac750ca5a13cc0a
+timeCreated: 1500675748
+licenseType: Free
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux: 1
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 0
+ Exclude Win64: 0
+ data:
+ first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ OS: Linux
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows.meta b/Assets/Plugins/SteamAudio/Binaries/Windows.meta
new file mode 100644
index 00000000..769b4ea3
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f8d2e4abd33c0b841a8641dfe8a55c02
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86.meta b/Assets/Plugins/SteamAudio/Binaries/Windows/x86.meta
new file mode 100644
index 00000000..e7c3685b
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b350a431a2f520b4b9d3e7227b7ec517
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86/audioplugin_phonon.dll b/Assets/Plugins/SteamAudio/Binaries/Windows/x86/audioplugin_phonon.dll
new file mode 100644
index 00000000..a7b415b7
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86/audioplugin_phonon.dll
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:006d86782ac47d5ff79f5688bc317d0612225564c4daa0239238bff5fbee29a2
+size 125952
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86/audioplugin_phonon.dll.meta b/Assets/Plugins/SteamAudio/Binaries/Windows/x86/audioplugin_phonon.dll.meta
new file mode 100644
index 00000000..254c5ac2
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86/audioplugin_phonon.dll.meta
@@ -0,0 +1,121 @@
+fileFormatVersion: 2
+guid: 034df7716f3c2ee43b6049cbd524c6d7
+timeCreated: 1500675747
+licenseType: Free
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 1
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 0
+ Exclude OSXIntel64: 0
+ Exclude OSXUniversal: 0
+ Exclude Win: 0
+ Exclude Win64: 1
+ data:
+ first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ OS: Windows
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ DefaultValueInitialized: true
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86/phonon.dll b/Assets/Plugins/SteamAudio/Binaries/Windows/x86/phonon.dll
new file mode 100644
index 00000000..3f8a0e1f
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86/phonon.dll
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9c5b3f629ddf60220d5071c37633b810e025f00412821291b89413749578fe77
+size 46166528
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86/phonon.dll.meta b/Assets/Plugins/SteamAudio/Binaries/Windows/x86/phonon.dll.meta
new file mode 100644
index 00000000..35312d0a
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86/phonon.dll.meta
@@ -0,0 +1,121 @@
+fileFormatVersion: 2
+guid: df5a46ce5e3327545a16c08880340232
+timeCreated: 1500675748
+licenseType: Free
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 0
+ Exclude OSXIntel64: 0
+ Exclude OSXUniversal: 0
+ Exclude Win: 0
+ Exclude Win64: 1
+ data:
+ first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ OS: Windows
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ DefaultValueInitialized: true
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64.meta b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64.meta
new file mode 100644
index 00000000..b78a0f14
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7cba442208850444ea5f98da27753834
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/GPUUtilities.dll b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/GPUUtilities.dll
new file mode 100644
index 00000000..112330c9
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/GPUUtilities.dll
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e858bf4514aca48eab762adcecaeda1edeccdddfbe97feb8e67795329b2f37d2
+size 72192
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/GPUUtilities.dll.meta b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/GPUUtilities.dll.meta
new file mode 100644
index 00000000..42c9f567
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/GPUUtilities.dll.meta
@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: 2a3c4cfa413248a4190297fbd3eb2de7
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ : Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux64: 0
+ Exclude OSXUniversal: 0
+ Exclude Win: 1
+ Exclude Win64: 0
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ OS: Windows
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/TrueAudioNext.dll b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/TrueAudioNext.dll
new file mode 100644
index 00000000..b62c21f6
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/TrueAudioNext.dll
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:44e94a5de6345ffb2968fb1781e7edaab3ec3d2c0854f93be0bb581b94c5d48c
+size 1772032
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/TrueAudioNext.dll.meta b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/TrueAudioNext.dll.meta
new file mode 100644
index 00000000..c0bdc41b
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/TrueAudioNext.dll.meta
@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: 79aa0fc1a754b08408af853b0c212c19
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ : Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux64: 0
+ Exclude OSXUniversal: 0
+ Exclude Win: 1
+ Exclude Win64: 0
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ OS: Windows
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/audioplugin_phonon.dll b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/audioplugin_phonon.dll
new file mode 100644
index 00000000..09335ab6
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/audioplugin_phonon.dll
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:60061e4a20ca59cff3c9a1b8feadf01b54557752ba7130f1136c32cd9b32ed84
+size 168960
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/audioplugin_phonon.dll.meta b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/audioplugin_phonon.dll.meta
new file mode 100644
index 00000000..aef59f9a
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/audioplugin_phonon.dll.meta
@@ -0,0 +1,121 @@
+fileFormatVersion: 2
+guid: 5d6635a5cbc49144e9a2194784a1edc1
+timeCreated: 1497043676
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 1
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 0
+ Exclude OSXIntel64: 0
+ Exclude OSXUniversal: 0
+ Exclude Win: 1
+ Exclude Win64: 0
+ data:
+ first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ OS: Windows
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/phonon.dll b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/phonon.dll
new file mode 100644
index 00000000..df809dad
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/phonon.dll
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0d9d1b7fdabc0377b49af64ad121bc1f854a91329bc9c1e115767314d5a61817
+size 52937728
diff --git a/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/phonon.dll.meta b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/phonon.dll.meta
new file mode 100644
index 00000000..a8562d09
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/Windows/x86_64/phonon.dll.meta
@@ -0,0 +1,109 @@
+fileFormatVersion: 2
+guid: 01f204cdd3aa0d449bff1ab94d059ce3
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ : Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXIntel: 0
+ Exclude OSXIntel64: 0
+ Exclude OSXUniversal: 0
+ Exclude Win: 1
+ Exclude Win64: 0
+ - first:
+ : Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ OS: Windows
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXIntel
+ second:
+ enabled: 1
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS.meta b/Assets/Plugins/SteamAudio/Binaries/iOS.meta
new file mode 100644
index 00000000..ea3a19b2
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/iOS.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b00dde30afdafcc4b97589286ad69ef8
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.h b/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.h
new file mode 100644
index 00000000..91563743
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.h
@@ -0,0 +1,23 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#import "UnityAppController.h"
+
+@interface SteamAudioUnityAppController : UnityAppController
+
+- (void) preStartUnity;
+
+@end
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.h.meta b/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.h.meta
new file mode 100644
index 00000000..c9645e64
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.h.meta
@@ -0,0 +1,74 @@
+fileFormatVersion: 2
+guid: aec5ec84d39144709b3542dee295e0c4
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ : Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 1
+ Exclude Linux64: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 0
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ AddToEmbeddedBinaries: false
+ CPU: ARM64
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.mm b/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.mm
new file mode 100644
index 00000000..dbdca162
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.mm
@@ -0,0 +1,38 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#import "SteamAudioUnityAppController.h"
+
+extern "C" {
+
+struct UnityAudioEffectDefinition;
+
+extern void UnityRegisterAudioPlugin(int (*)(UnityAudioEffectDefinition***));
+extern int UnityGetAudioEffectDefinitions(UnityAudioEffectDefinition***);
+
+}
+
+@implementation SteamAudioUnityAppController
+
+- (void) preStartUnity
+{
+ [super preStartUnity];
+ UnityRegisterAudioPlugin(UnityGetAudioEffectDefinitions);
+}
+
+@end
+
+IMPL_APP_CONTROLLER_SUBCLASS(SteamAudioUnityAppController);
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.mm.meta b/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.mm.meta
new file mode 100644
index 00000000..377cf4f7
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/iOS/SteamAudioUnityAppController.mm.meta
@@ -0,0 +1,79 @@
+fileFormatVersion: 2
+guid: fee6b0e0ec75e4f1daa5bcd77cd3bef4
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ : Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 1
+ Exclude Linux64: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 0
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ AddToEmbeddedBinaries: false
+ CPU: ARM64
+ CompileFlags:
+ FrameworkDependencies:
+ - first:
+ tvOS: tvOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/libaudioplugin_phonon.a b/Assets/Plugins/SteamAudio/Binaries/iOS/libaudioplugin_phonon.a
new file mode 100644
index 00000000..1c16d324
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/iOS/libaudioplugin_phonon.a differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/libaudioplugin_phonon.a.meta b/Assets/Plugins/SteamAudio/Binaries/iOS/libaudioplugin_phonon.a.meta
new file mode 100644
index 00000000..e262ebac
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/iOS/libaudioplugin_phonon.a.meta
@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: fcfc722a37ba97343a529b1e4c9a7152
+timeCreated: 1702593740
+licenseType: Free
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 1
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 0
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/libmysofa.a b/Assets/Plugins/SteamAudio/Binaries/iOS/libmysofa.a
new file mode 100644
index 00000000..3d31c22b
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/iOS/libmysofa.a differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/libmysofa.a.meta b/Assets/Plugins/SteamAudio/Binaries/iOS/libmysofa.a.meta
new file mode 100644
index 00000000..3f8cbc6a
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/iOS/libmysofa.a.meta
@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: f412e2a7a2380df468289c5c708272af
+timeCreated: 1702593740
+licenseType: Free
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 0
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/libpffft.a b/Assets/Plugins/SteamAudio/Binaries/iOS/libpffft.a
new file mode 100644
index 00000000..f3bfad87
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/iOS/libpffft.a differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/libpffft.a.meta b/Assets/Plugins/SteamAudio/Binaries/iOS/libpffft.a.meta
new file mode 100644
index 00000000..cea02e62
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/iOS/libpffft.a.meta
@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: 21fc99dc19b580f488a2af01bfed0e5b
+timeCreated: 1702593740
+licenseType: Free
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 0
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/libphonon.a b/Assets/Plugins/SteamAudio/Binaries/iOS/libphonon.a
new file mode 100644
index 00000000..6472910b
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/iOS/libphonon.a differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/iOS/libphonon.a.meta b/Assets/Plugins/SteamAudio/Binaries/iOS/libphonon.a.meta
new file mode 100644
index 00000000..f637444f
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/iOS/libphonon.a.meta
@@ -0,0 +1,96 @@
+fileFormatVersion: 2
+guid: df0691872f031c54cb1bec2808c5080a
+timeCreated: 1702593740
+licenseType: Free
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 0
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS.meta b/Assets/Plugins/SteamAudio/Binaries/macOS.meta
new file mode 100644
index 00000000..a74c3b77
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d54bd4844aeb5224badec93622ce136b
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle.meta b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle.meta
new file mode 100644
index 00000000..e28b2485
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle.meta
@@ -0,0 +1,85 @@
+fileFormatVersion: 2
+guid: ff261044b04d6dd4a80f3cfc780c6782
+folderAsset: yes
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 1
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ : Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux64: 1
+ Exclude OSXUniversal: 0
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 1
+ - first:
+ : OSXIntel
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ : OSXIntel64
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ AddToEmbeddedBinaries: false
+ CPU: AnyCPU
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/Info.plist b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/Info.plist
new file mode 100644
index 00000000..760f83ae
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/Info.plist
@@ -0,0 +1,44 @@
+
+
+
+
+ BuildMachineOSBuild
+ 22G630
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ audioplugin_phonon
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleLongVersionString
+
+ CFBundlePackageType
+ APPL
+ CFBundleSignature
+ ????
+ CFBundleSupportedPlatforms
+
+ MacOSX
+
+ CSResourcesFileMapped
+
+ DTCompiler
+ com.apple.compilers.llvm.clang.1_0
+ DTPlatformBuild
+
+ DTPlatformName
+ macosx
+ DTPlatformVersion
+ 14.2
+ DTSDKBuild
+ 23C53
+ DTSDKName
+ macosx14.2
+ DTXcode
+ 1520
+ DTXcodeBuild
+ 15C500b
+ LSMinimumSystemVersion
+ 10.13
+
+
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/Info.plist.meta b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/Info.plist.meta
new file mode 100644
index 00000000..7591113d
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/Info.plist.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 79e751e6f40a4684bbd53511f1ae1202
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/MacOS/audioplugin_phonon b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/MacOS/audioplugin_phonon
new file mode 100644
index 00000000..eb6abf59
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/MacOS/audioplugin_phonon differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/MacOS/audioplugin_phonon.meta b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/MacOS/audioplugin_phonon.meta
new file mode 100644
index 00000000..80ef74bd
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/MacOS/audioplugin_phonon.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 60c57adaa975c314883baddbe39e0549
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/_CodeSignature/CodeResources b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/_CodeSignature/CodeResources
new file mode 100644
index 00000000..d5d0fd74
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/_CodeSignature/CodeResources
@@ -0,0 +1,115 @@
+
+
+
+
+ files
+
+ files2
+
+ rules
+
+ ^Resources/
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Resources/Base\.lproj/
+
+ weight
+ 1010
+
+ ^version.plist$
+
+
+ rules2
+
+ .*\.dSYM($|/)
+
+ weight
+ 11
+
+ ^(.*/)?\.DS_Store$
+
+ omit
+
+ weight
+ 2000
+
+ ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
+
+ nested
+
+ weight
+ 10
+
+ ^.*
+
+ ^Info\.plist$
+
+ omit
+
+ weight
+ 20
+
+ ^PkgInfo$
+
+ omit
+
+ weight
+ 20
+
+ ^Resources/
+
+ weight
+ 20
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Resources/Base\.lproj/
+
+ weight
+ 1010
+
+ ^[^/]+$
+
+ nested
+
+ weight
+ 10
+
+ ^embedded\.provisionprofile$
+
+ weight
+ 20
+
+ ^version\.plist$
+
+ weight
+ 20
+
+
+
+
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/_CodeSignature/CodeResources.meta b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/_CodeSignature/CodeResources.meta
new file mode 100644
index 00000000..48366a87
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/audioplugin_phonon.bundle/Contents/_CodeSignature/CodeResources.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: f4fdcca7b2c9c894bb8fbad588a125b5
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle.meta b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle.meta
new file mode 100644
index 00000000..5fd74833
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle.meta
@@ -0,0 +1,85 @@
+fileFormatVersion: 2
+guid: e4189b6e2cb753144b97fcd9b7283529
+folderAsset: yes
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ : Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Editor: 0
+ Exclude Linux64: 1
+ Exclude OSXUniversal: 0
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 1
+ - first:
+ : OSXIntel
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ : OSXIntel64
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ AddToEmbeddedBinaries: false
+ CPU: AnyCPU
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/Info.plist b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/Info.plist
new file mode 100644
index 00000000..c7dd6868
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/Info.plist
@@ -0,0 +1,44 @@
+
+
+
+
+ BuildMachineOSBuild
+ 22G630
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ phonon
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleLongVersionString
+
+ CFBundlePackageType
+ APPL
+ CFBundleSignature
+ ????
+ CFBundleSupportedPlatforms
+
+ MacOSX
+
+ CSResourcesFileMapped
+
+ DTCompiler
+ com.apple.compilers.llvm.clang.1_0
+ DTPlatformBuild
+
+ DTPlatformName
+ macosx
+ DTPlatformVersion
+ 14.2
+ DTSDKBuild
+ 23C53
+ DTSDKName
+ macosx14.2
+ DTXcode
+ 1520
+ DTXcodeBuild
+ 15C500b
+ LSMinimumSystemVersion
+ 10.13
+
+
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/Info.plist.meta b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/Info.plist.meta
new file mode 100644
index 00000000..1dfb03e3
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/Info.plist.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: ad1b7c20330ebce4ba3b90a5f604d834
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/MacOS/phonon b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/MacOS/phonon
new file mode 100644
index 00000000..fddc826a
Binary files /dev/null and b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/MacOS/phonon differ
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/MacOS/phonon.meta b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/MacOS/phonon.meta
new file mode 100644
index 00000000..854833ad
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/MacOS/phonon.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: f8543a548fd19d24e9db5a729cee896c
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/_CodeSignature/CodeResources b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/_CodeSignature/CodeResources
new file mode 100644
index 00000000..d5d0fd74
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/_CodeSignature/CodeResources
@@ -0,0 +1,115 @@
+
+
+
+
+ files
+
+ files2
+
+ rules
+
+ ^Resources/
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Resources/Base\.lproj/
+
+ weight
+ 1010
+
+ ^version.plist$
+
+
+ rules2
+
+ .*\.dSYM($|/)
+
+ weight
+ 11
+
+ ^(.*/)?\.DS_Store$
+
+ omit
+
+ weight
+ 2000
+
+ ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
+
+ nested
+
+ weight
+ 10
+
+ ^.*
+
+ ^Info\.plist$
+
+ omit
+
+ weight
+ 20
+
+ ^PkgInfo$
+
+ omit
+
+ weight
+ 20
+
+ ^Resources/
+
+ weight
+ 20
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Resources/Base\.lproj/
+
+ weight
+ 1010
+
+ ^[^/]+$
+
+ nested
+
+ weight
+ 10
+
+ ^embedded\.provisionprofile$
+
+ weight
+ 20
+
+ ^version\.plist$
+
+ weight
+ 20
+
+
+
+
diff --git a/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/_CodeSignature/CodeResources.meta b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/_CodeSignature/CodeResources.meta
new file mode 100644
index 00000000..89d487b7
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Binaries/macOS/phonon.bundle/Contents/_CodeSignature/CodeResources.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: dfd576ac290e06247a0cce7b0a991ba0
diff --git a/Assets/Plugins/SteamAudio/Resources.meta b/Assets/Plugins/SteamAudio/Resources.meta
new file mode 100644
index 00000000..269a1c17
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e5745ad563e845743b8920252a3e6611
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials.meta b/Assets/Plugins/SteamAudio/Resources/Materials.meta
new file mode 100644
index 00000000..baa619ec
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 88a93f7297473be4f8ebcdf7f46e5102
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Brick.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Brick.asset
new file mode 100644
index 00000000..b317ebf7
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Brick.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:109a8cf4fd457d0bcfc8e07860c90a70331b2a2836c0bd0cb6db5e4cf9998c19
+size 601
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Brick.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Brick.asset.meta
new file mode 100644
index 00000000..8f83147e
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Brick.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ed65b244617a3154ba34ebdb722855a9
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Carpet.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Carpet.asset
new file mode 100644
index 00000000..0cd1a3c5
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Carpet.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f701413d498aae34b25c0bd659292dbd3107c66227b21e6cc9f4d5afbf0b6a88
+size 601
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Carpet.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Carpet.asset.meta
new file mode 100644
index 00000000..06c2a094
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Carpet.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4ef433d5b2fa5ad4a9e19a415c6ab619
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Ceramic.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Ceramic.asset
new file mode 100644
index 00000000..8adeaeb6
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Ceramic.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:18e07f2d1c05036efc6c06dbea08ccef34e7c3e22bec9ca3d2106d15a98faad0
+size 602
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Ceramic.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Ceramic.asset.meta
new file mode 100644
index 00000000..7b9dd339
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Ceramic.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1ae39e85ad35335439c46ec8a6d27ea9
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Concrete.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Concrete.asset
new file mode 100644
index 00000000..92b669c6
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Concrete.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4db632dd73c9f46e0930081608aee46fbcc77b0d207556c47903cb7004014da0
+size 604
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Concrete.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Concrete.asset.meta
new file mode 100644
index 00000000..40b02c75
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Concrete.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2a011bab5de11df4c81c68931509f73a
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Default.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Default.asset
new file mode 100644
index 00000000..a2c18a0b
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Default.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d7c8a2fb9b114aad145e3f20184fd94bfe6af8a6838fdab8b0d5094762ea04f3
+size 596
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Default.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Default.asset.meta
new file mode 100644
index 00000000..46b79bc4
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Default.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a086f686223eed942816c70be67841b0
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Glass.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Glass.asset
new file mode 100644
index 00000000..981deec5
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Glass.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5188f3c2d9c90120eda2c9a01ebf7ccbd02e9784ff99a6b10a21e85fb32057f4
+size 600
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Glass.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Glass.asset.meta
new file mode 100644
index 00000000..c786bfd7
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Glass.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 08bf73ad12cb44944875b02ce7f9d694
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Gravel.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Gravel.asset
new file mode 100644
index 00000000..1983f15b
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Gravel.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:04d829f277bc7dc06268002189d154d5bed336f2318ee5d39f2ebb77ec4f3b72
+size 599
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Gravel.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Gravel.asset.meta
new file mode 100644
index 00000000..c49f55fa
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Gravel.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b1c2b85c159e39042b3aa49340f34357
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Metal.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Metal.asset
new file mode 100644
index 00000000..83dd69ad
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Metal.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6ad34a168843de61e1251ebabad20ef64de603c9d8d45d81bf1713f831fb9bbf
+size 597
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Metal.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Metal.asset.meta
new file mode 100644
index 00000000..52107749
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Metal.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d780f25df1d231d4aa9a31ab3ba935d0
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Plaster.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Plaster.asset
new file mode 100644
index 00000000..de022c38
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Plaster.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0db16748ed434ee0539259959cbb97111362ce668205cb36438b21519f4ff374
+size 603
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Plaster.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Plaster.asset.meta
new file mode 100644
index 00000000..25cbefd4
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Plaster.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9e0a6d5705eaec64ab63e6ac7132e0a7
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Rock.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Rock.asset
new file mode 100644
index 00000000..7cd71288
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Rock.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2b2c37d5bc2c22016c6114720157885a2f3c78a8291bc802df0f37b56e326c19
+size 599
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Rock.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Rock.asset.meta
new file mode 100644
index 00000000..3dbcbcb7
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Rock.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5c0320d65bcecce4abf2efe02ff313aa
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Wood.asset b/Assets/Plugins/SteamAudio/Resources/Materials/Wood.asset
new file mode 100644
index 00000000..6a5676d7
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Wood.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:94342a1174f0c89c0d66f600b68aa04df83b7229ba62b5b38734992aff0f8aa3
+size 599
diff --git a/Assets/Plugins/SteamAudio/Resources/Materials/Wood.asset.meta b/Assets/Plugins/SteamAudio/Resources/Materials/Wood.asset.meta
new file mode 100644
index 00000000..400a57cf
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/Materials/Wood.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5272c55b882edd34a9d80b11bd6f240c
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Resources/SteamAudioSettings.asset b/Assets/Plugins/SteamAudio/Resources/SteamAudioSettings.asset
new file mode 100644
index 00000000..6d9a7ff7
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/SteamAudioSettings.asset
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a25d614e3f85b6ddda9cfe04b4f3f3a0b9d306effe237cb6f862f0e76b8d0ca4
+size 1613
diff --git a/Assets/Plugins/SteamAudio/Resources/SteamAudioSettings.asset.meta b/Assets/Plugins/SteamAudio/Resources/SteamAudioSettings.asset.meta
new file mode 100644
index 00000000..31d21327
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Resources/SteamAudioSettings.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 6f8a3afa3969d894ca7745ad1e9afd42
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts.meta b/Assets/Plugins/SteamAudio/Scripts.meta
new file mode 100644
index 00000000..ee8ba30a
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e1350490d32560643b13a18c62a648fb
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor.meta b/Assets/Plugins/SteamAudio/Scripts/Editor.meta
new file mode 100644
index 00000000..3d64ec0e
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5daecada1ea129e47a5e0decc073a3af
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/Build.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/Build.cs
new file mode 100644
index 00000000..7581a59a
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/Build.cs
@@ -0,0 +1,151 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using UnityEngine; // deleteme?
+using UnityEditor;
+#if UNITY_2021_2_OR_NEWER
+using UnityEditor.Build;
+#endif
+using UnityEditor.Callbacks;
+#if UNITY_IOS
+using UnityEditor.iOS.Xcode;
+#endif
+
+namespace SteamAudio
+{
+ public static class Build
+ {
+ public static void BuildSteamAudio()
+ {
+ var baseAssets = new string[]
+ {
+ "Assets/Plugins/SteamAudio/SteamAudioUnity.asmdef",
+ "Assets/Plugins/SteamAudio/Binaries",
+ "Assets/Plugins/SteamAudio/Resources",
+ "Assets/Plugins/SteamAudio/Scripts/Runtime",
+ "Assets/Plugins/SteamAudio/Scripts/Editor",
+ };
+
+
+ var fmodAssets = new string[]
+ {
+ "Assets/Plugins/SteamAudio/Scripts/FMODStudio",
+ "Assets/Plugins/FMOD/platforms/win/lib/x86/phonon_fmod.dll",
+ "Assets/Plugins/FMOD/platforms/win/lib/x86_64/phonon_fmod.dll",
+ "Assets/Plugins/FMOD/platforms/linux/lib/x86/libphonon_fmod.so",
+ "Assets/Plugins/FMOD/platforms/linux/lib/x86_64/libphonon_fmod.so",
+ "Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle",
+ "Assets/Plugins/FMOD/platforms/android/lib/armeabi-v7a/libphonon_fmod.so",
+ "Assets/Plugins/FMOD/platforms/android/lib/arm64-v8a/libphonon_fmod.so",
+ "Assets/Plugins/FMOD/platforms/android/lib/x86/libphonon_fmod.so",
+ "Assets/Plugins/FMOD/platforms/ios/lib/libphonon_fmod.a",
+ };
+
+ var wwiseAssets = new string[]
+ {
+ "Assets/Plugins/SteamAudio/Scripts/Wwise",
+ "Assets/Wwise/API/Runtime/Plugins/Windows/x86/DSP/SteamAudioWwise.dll",
+ "Assets/Wwise/API/Runtime/Plugins/Windows/x86_64/DSP/SteamAudioWwise.dll",
+ "Assets/Wwise/API/Runtime/Plugins/Linux/x86_64/DSP/libSteamAudioWwise.so",
+ "Assets/Wwise/API/Runtime/Plugins/Mac/DSP/libSteamAudioWwise.bundle",
+ "Assets/Wwise/API/Runtime/Plugins/Android/armeabi-v7a/DSP/libSteamAudioWwise.so",
+ "Assets/Wwise/API/Runtime/Plugins/Android/arm64-v8a/DSP/libSteamAudioWwise.so",
+ "Assets/Wwise/API/Runtime/Plugins/Android/x86/DSP/libSteamAudioWwise.so",
+ "Assets/Wwise/API/Runtime/Plugins/iOS/iphoneos/DSP/SteamAudioWwiseFXFactory.h",
+ "Assets/Wwise/API/Runtime/Plugins/iOS/iphoneos/DSP/libSteamAudioWwiseFX.a",
+ "Assets/Wwise/API/Runtime/Plugins/iOS/iphonesimulator/DSP/SteamAudioWwiseFXFactory.h",
+ "Assets/Wwise/API/Runtime/Plugins/iOS/iphonesimulator/DSP/libSteamAudioWwiseFX.a",
+ };
+
+ BuildPackage("SteamAudio", baseAssets);
+ BuildPackage("SteamAudioFMODStudio", fmodAssets);
+ BuildPackage("SteamAudioWwise", wwiseAssets);
+ }
+
+ private static void BuildPackage(string name, string[] assets)
+ {
+ var args = Environment.GetCommandLineArgs();
+ var lastArg = args[args.Length - 1];
+
+ var fileName = name + ".unitypackage";
+ if (lastArg != "SteamAudio.Build.BuildSteamAudio")
+ {
+ fileName = lastArg + "/" + fileName;
+ }
+
+ AssetDatabase.ExportPackage(assets, fileName, ExportPackageOptions.Recurse);
+ }
+ }
+
+ [InitializeOnLoad]
+ public static class Defines
+ {
+ // Define the constant STEAMAUDIO_ENABLED for all platforms that are supported by
+ // Steam Audio. User scripts should check if this constant is defined
+ // (using #if STEAMAUDIO_ENABLED) before using any of the Steam Audio C# classes.
+ static Defines()
+ {
+#if UNITY_2021_2_OR_NEWER
+ NamedBuildTarget[] supportedPlatforms = {
+ NamedBuildTarget.Standalone,
+ NamedBuildTarget.Android,
+ NamedBuildTarget.iOS,
+ NamedBuildTarget.WebGL,
+ };
+
+ foreach (var supportedPlatform in supportedPlatforms)
+ {
+ var defines = PlayerSettings.GetScriptingDefineSymbols(supportedPlatform);
+ if (!defines.Contains("STEAMAUDIO_ENABLED"))
+ {
+ if (defines.Length > 0)
+ {
+ defines += ";";
+ }
+
+ defines += "STEAMAUDIO_ENABLED";
+
+ PlayerSettings.SetScriptingDefineSymbols(supportedPlatform, defines);
+ }
+ }
+#endif
+ }
+ }
+
+ public static class BuildProcessor
+ {
+ [PostProcessBuild]
+ public static void OnPostProcessBuild(BuildTarget buildTarget, string buildPath)
+ {
+ if (buildTarget == BuildTarget.iOS)
+ {
+#if UNITY_IOS
+ var projectPath = PBXProject.GetPBXProjectPath(buildPath);
+
+ var project = new PBXProject();
+ project.ReadFromFile(projectPath);
+
+ var file = project.AddFile("usr/lib/libz.tbd", "Frameworks/libz.tbd", PBXSourceTree.Sdk);
+ var target = project.TargetGuidByName("UnityFramework");
+ project.AddFileToBuild(target, file);
+
+ project.WriteToFile(projectPath);
+#endif
+ }
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/Build.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/Build.cs.meta
new file mode 100644
index 00000000..341a13a9
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/Build.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4cf552bb6c6d7894c8e64136a5d4a41c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileEditor.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileEditor.cs
new file mode 100644
index 00000000..0d0465b5
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileEditor.cs
@@ -0,0 +1,33 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEditor;
+
+namespace SteamAudio
+{
+ /*
+ * Custom editor GUI for SOFAFile assets.
+ */
+ [CustomEditor(typeof(SOFAFile))]
+ public class SOFAFileEditor : Editor
+ {
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("sofaName"));
+ EditorGUILayout.LabelField("Size", Common.HumanReadableDataSize(serializedObject.FindProperty("data").arraySize));
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileEditor.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileEditor.cs.meta
new file mode 100644
index 00000000..71e1f3cf
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileEditor.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ad7854f3d94e96f4795542d446b68921
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporter.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporter.cs
new file mode 100644
index 00000000..fa625b29
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporter.cs
@@ -0,0 +1,50 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System.IO;
+using UnityEngine;
+#if UNITY_2020_2_OR_NEWER
+using UnityEditor.AssetImporters;
+#else
+using UnityEditor.Experimental.AssetImporters;
+#endif
+
+namespace SteamAudio
+{
+ /*
+ * Imports .sofa files as SOFAFile asset objects.
+ */
+ [ScriptedImporter(2, "sofa")]
+ public class SOFAFileImporter : ScriptedImporter
+ {
+ [Range(-12.0f, 12.0f)]
+ public float hrtfVolumeGainDB = 0.0f;
+ public HRTFNormType hrtfNormalizationType = HRTFNormType.None;
+
+ public override void OnImportAsset(AssetImportContext ctx)
+ {
+ var sofaFile = ScriptableObject.CreateInstance();
+
+ sofaFile.sofaName = Path.GetFileName(ctx.assetPath);
+ sofaFile.data = File.ReadAllBytes(ctx.assetPath);
+ sofaFile.volume = hrtfVolumeGainDB;
+ sofaFile.normType = hrtfNormalizationType;
+
+ ctx.AddObjectToAsset("sofa file", sofaFile);
+ ctx.SetMainObject(sofaFile);
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporter.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporter.cs.meta
new file mode 100644
index 00000000..3db6eba2
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1731f5ddf70efee4c8320ac591373b56
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporterEditor.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporterEditor.cs
new file mode 100644
index 00000000..ba1895d2
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporterEditor.cs
@@ -0,0 +1,41 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEditor;
+#if UNITY_2020_2_OR_NEWER
+using UnityEditor.AssetImporters;
+#else
+using UnityEditor.Experimental.AssetImporters;
+#endif
+
+namespace SteamAudio
+{
+ /*
+ * Custom editor GUI for SOFAFile import settings.
+ */
+ [CustomEditor(typeof(SOFAFileImporter))]
+ public class SOFAFileImporterEditor : ScriptedImporterEditor
+ {
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("hrtfVolumeGainDB"), new UnityEngine.GUIContent("HRTF Volume Gain (dB)"));
+ EditorGUILayout.PropertyField(serializedObject.FindProperty("hrtfNormalizationType"), new UnityEngine.GUIContent("HRTF Normalization Type"));
+ serializedObject.ApplyModifiedProperties();
+ ApplyRevertGUI();
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporterEditor.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporterEditor.cs.meta
new file mode 100644
index 00000000..c1ecc0d5
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SOFAFileImporterEditor.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d3653cc84febdd64e8064c9e17883043
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SerializedDataInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SerializedDataInspector.cs
new file mode 100644
index 00000000..e4666ef3
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SerializedDataInspector.cs
@@ -0,0 +1,41 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SerializedData))]
+ public class SerializedDataInspector : Editor
+ {
+ SerializedProperty mData;
+
+ private void OnEnable()
+ {
+ mData = serializedObject.FindProperty("data");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ var size = mData.arraySize;
+ EditorGUILayout.LabelField("Serialized Data", Common.HumanReadableDataSize(size));
+
+ serializedObject.ApplyModifiedProperties();
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SerializedDataInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SerializedDataInspector.cs.meta
new file mode 100644
index 00000000..9152fbe7
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SerializedDataInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9184af0375b7f6140be4f789b5fc7083
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioAmbisonicSourceInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioAmbisonicSourceInspector.cs
new file mode 100644
index 00000000..61022a70
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioAmbisonicSourceInspector.cs
@@ -0,0 +1,50 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioAmbisonicSource))]
+ [CanEditMultipleObjects]
+ public class SteamAudioAmbisonicSourceInspector : Editor
+ {
+ SerializedProperty mApplyHRTF;
+
+ private void OnEnable()
+ {
+ mApplyHRTF = serializedObject.FindProperty("applyHRTF");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ if (SteamAudioSettings.Singleton.audioEngine != AudioEngineType.Unity)
+ {
+ EditorGUILayout.HelpBox(
+ "This component requires the audio engine to be set to Unity. Click" +
+ "Steam Audio > Settings to change this.", MessageType.Warning);
+
+ return;
+ }
+
+ serializedObject.Update();
+
+ EditorGUILayout.PropertyField(mApplyHRTF);
+
+ serializedObject.ApplyModifiedProperties();
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioAmbisonicSourceInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioAmbisonicSourceInspector.cs.meta
new file mode 100644
index 00000000..02e407b1
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioAmbisonicSourceInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 93bd07e672dff904ea2291dd4ac45a45
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedListenerInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedListenerInspector.cs
new file mode 100644
index 00000000..49844a20
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedListenerInspector.cs
@@ -0,0 +1,97 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioBakedListener))]
+ public class SteamAudioBakedListenerInspector : Editor
+ {
+#if STEAMAUDIO_ENABLED
+ SerializedProperty mInfluenceRadius;
+ SerializedProperty mUseAllProbeBatches;
+ SerializedProperty mProbeBatches;
+
+ bool mStatsFoldout = false;
+ bool mShouldShowProgressBar = false;
+
+ private void OnEnable()
+ {
+ mInfluenceRadius = serializedObject.FindProperty("influenceRadius");
+ mUseAllProbeBatches = serializedObject.FindProperty("useAllProbeBatches");
+ mProbeBatches = serializedObject.FindProperty("probeBatches");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ var oldGUIEnabled = GUI.enabled;
+ GUI.enabled = !Baker.IsBakeActive() && !EditorApplication.isPlayingOrWillChangePlaymode;
+
+ var tgt = target as SteamAudioBakedListener;
+
+ EditorGUILayout.PropertyField(mInfluenceRadius);
+ EditorGUILayout.PropertyField(mUseAllProbeBatches);
+ if (!mUseAllProbeBatches.boolValue)
+ {
+ EditorGUILayout.PropertyField(mProbeBatches);
+ }
+
+ EditorGUILayout.Space();
+ if (GUILayout.Button("Bake"))
+ {
+ tgt.BeginBake();
+ mShouldShowProgressBar = true;
+ }
+
+ GUI.enabled = oldGUIEnabled;
+
+ if (mShouldShowProgressBar && !Baker.IsBakeActive())
+ {
+ mShouldShowProgressBar = false;
+ }
+
+ if (mShouldShowProgressBar)
+ {
+ Baker.DrawProgressBar();
+ }
+
+ Repaint();
+
+ EditorGUILayout.Space();
+ mStatsFoldout = EditorGUILayout.Foldout(mStatsFoldout, "Baked Data Statistics");
+ if (mStatsFoldout && !Baker.IsBakeActive())
+ {
+ for (var i = 0; i < tgt.GetProbeBatchesUsed().Length; ++i)
+ {
+ EditorGUILayout.LabelField(tgt.GetProbeBatchesUsed()[i].gameObject.name, Common.HumanReadableDataSize(tgt.GetProbeDataSizes()[i]));
+ }
+ EditorGUILayout.LabelField("Total Size", Common.HumanReadableDataSize(tgt.GetTotalDataSize()));
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ }
+#else
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("Steam Audio is not supported for the target platform or STEAMAUDIO_ENABLED define symbol is missing.", MessageType.Warning);
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedListenerInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedListenerInspector.cs.meta
new file mode 100644
index 00000000..f419d264
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedListenerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5e99d6d8163e0e24cadf1add0983102e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedSourceInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedSourceInspector.cs
new file mode 100644
index 00000000..afd558d0
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedSourceInspector.cs
@@ -0,0 +1,97 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioBakedSource))]
+ public class SteamAudioBakedSourceInspector : Editor
+ {
+#if STEAMAUDIO_ENABLED
+ SerializedProperty mInfluenceRadius;
+ SerializedProperty mUseAllProbeBatches;
+ SerializedProperty mProbeBatches;
+
+ bool mStatsFoldout = false;
+ bool mShouldShowProgressBar = false;
+
+ private void OnEnable()
+ {
+ mInfluenceRadius = serializedObject.FindProperty("influenceRadius");
+ mUseAllProbeBatches = serializedObject.FindProperty("useAllProbeBatches");
+ mProbeBatches = serializedObject.FindProperty("probeBatches");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ var oldGUIEnabled = GUI.enabled;
+ GUI.enabled = !Baker.IsBakeActive() && !EditorApplication.isPlayingOrWillChangePlaymode;
+
+ var tgt = target as SteamAudioBakedSource;
+
+ EditorGUILayout.PropertyField(mInfluenceRadius);
+ EditorGUILayout.PropertyField(mUseAllProbeBatches);
+ if (!mUseAllProbeBatches.boolValue)
+ {
+ EditorGUILayout.PropertyField(mProbeBatches);
+ }
+
+ EditorGUILayout.Space();
+ if (GUILayout.Button("Bake"))
+ {
+ tgt.BeginBake();
+ mShouldShowProgressBar = true;
+ }
+
+ GUI.enabled = oldGUIEnabled;
+
+ if (mShouldShowProgressBar && !Baker.IsBakeActive())
+ {
+ mShouldShowProgressBar = false;
+ }
+
+ if (mShouldShowProgressBar)
+ {
+ Baker.DrawProgressBar();
+ }
+
+ Repaint();
+
+ EditorGUILayout.Space();
+ mStatsFoldout = EditorGUILayout.Foldout(mStatsFoldout, "Baked Data Statistics");
+ if (mStatsFoldout && !Baker.IsBakeActive())
+ {
+ for (var i = 0; i < tgt.GetProbeBatchesUsed().Length; ++i)
+ {
+ EditorGUILayout.LabelField(tgt.GetProbeBatchesUsed()[i].gameObject.name, Common.HumanReadableDataSize(tgt.GetProbeDataSizes()[i]));
+ }
+ EditorGUILayout.LabelField("Total Size", Common.HumanReadableDataSize(tgt.GetTotalDataSize()));
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ }
+#else
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("Steam Audio is not supported for the target platform or STEAMAUDIO_ENABLED define symbol is missing.", MessageType.Warning);
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedSourceInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedSourceInspector.cs.meta
new file mode 100644
index 00000000..61da6ab6
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioBakedSourceInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3333927edc4e4ec4e880a1ff9e9a7a2e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioDynamicObjectInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioDynamicObjectInspector.cs
new file mode 100644
index 00000000..e9a3a7c0
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioDynamicObjectInspector.cs
@@ -0,0 +1,75 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEditor;
+using UnityEditor.SceneManagement;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioDynamicObject))]
+ public class SteamAudioDynamicObjectInspector : Editor
+ {
+ #if STEAMAUDIO_ENABLED
+ SerializedProperty mAsset;
+
+ private void OnEnable()
+ {
+ mAsset = serializedObject.FindProperty("asset");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ EditorGUILayout.PropertyField(mAsset);
+
+ if (mAsset.objectReferenceValue == null)
+ {
+ EditorGUILayout.HelpBox(
+ "This Dynamic Object has not been exported to an asset yet. Please click Export Dynamic Object " +
+ "to do so.", MessageType.Warning);
+ }
+
+ EditorGUILayout.Space();
+
+ if (GUILayout.Button("Export Dynamic Object"))
+ {
+ if (mAsset.objectReferenceValue == null)
+ {
+ var name = (target as SteamAudioDynamicObject).gameObject.scene.name + "_" + target.name;
+ mAsset.objectReferenceValue = SerializedData.PromptForNewAsset(name);
+ serializedObject.ApplyModifiedProperties();
+ }
+
+ SteamAudioManager.ExportDynamicObject(target as SteamAudioDynamicObject, false);
+ }
+
+ if (GUILayout.Button("Export Dynamic Object as OBJ"))
+ {
+ SteamAudioManager.ExportDynamicObject(target as SteamAudioDynamicObject, true);
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ }
+#else
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("Steam Audio is not supported for the target platform or STEAMAUDIO_ENABLED define symbol is missing.", MessageType.Warning);
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioDynamicObjectInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioDynamicObjectInspector.cs.meta
new file mode 100644
index 00000000..efe7c700
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioDynamicObjectInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 980be31a5041c924094140b19f4276cd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioGeometryInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioGeometryInspector.cs
new file mode 100644
index 00000000..52e171b3
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioGeometryInspector.cs
@@ -0,0 +1,70 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioGeometry))]
+ [CanEditMultipleObjects]
+ public class SteamAudioGeometryInspector : Editor
+ {
+#if STEAMAUDIO_ENABLED
+ SerializedProperty mMaterial;
+ SerializedProperty mExportAllChildren;
+ SerializedProperty mTerrainSimplificationLevel;
+
+ private void OnEnable()
+ {
+ mMaterial = serializedObject.FindProperty("material");
+ mExportAllChildren = serializedObject.FindProperty("exportAllChildren");
+ mTerrainSimplificationLevel = serializedObject.FindProperty("terrainSimplificationLevel");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ var tgt = target as SteamAudioGeometry;
+
+ EditorGUILayout.PropertyField(mMaterial);
+
+ if (tgt.transform.childCount != 0)
+ {
+ EditorGUILayout.PropertyField(mExportAllChildren);
+ }
+
+ if (tgt.gameObject.GetComponent() != null)
+ {
+ EditorGUILayout.PropertyField(mTerrainSimplificationLevel);
+ }
+
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("Geometry Statistics", EditorStyles.boldLabel);
+ EditorGUILayout.LabelField("Vertices", tgt.GetNumVertices().ToString());
+ EditorGUILayout.LabelField("Triangles", tgt.GetNumTriangles().ToString());
+
+ serializedObject.ApplyModifiedProperties();
+ }
+#else
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("Steam Audio is not supported for the target platform or STEAMAUDIO_ENABLED define symbol is missing.", MessageType.Warning);
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioGeometryInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioGeometryInspector.cs.meta
new file mode 100644
index 00000000..344fdf3e
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioGeometryInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 58fcd8cc93a64734490ae21a46fb412d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioListenerInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioListenerInspector.cs
new file mode 100644
index 00000000..e32ddf2f
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioListenerInspector.cs
@@ -0,0 +1,108 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioListener))]
+ public class SteamAudioListenerInspector : Editor
+ {
+#if STEAMAUDIO_ENABLED
+ SerializedProperty mCurrentBakedListener;
+ SerializedProperty mApplyReverb;
+ SerializedProperty mReverbType;
+ SerializedProperty mUseAllProbeBatches;
+ SerializedProperty mProbeBatches;
+
+ bool mStatsFoldout = false;
+ bool mShouldShowProgressBar = false;
+
+ private void OnEnable()
+ {
+ mCurrentBakedListener = serializedObject.FindProperty("currentBakedListener");
+ mApplyReverb = serializedObject.FindProperty("applyReverb");
+ mReverbType = serializedObject.FindProperty("reverbType");
+ mUseAllProbeBatches = serializedObject.FindProperty("useAllProbeBatches");
+ mProbeBatches = serializedObject.FindProperty("probeBatches");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ EditorGUILayout.PropertyField(mCurrentBakedListener);
+
+ EditorGUILayout.PropertyField(mApplyReverb);
+ if (mApplyReverb.boolValue)
+ {
+ EditorGUILayout.PropertyField(mReverbType);
+ }
+
+ var oldGUIEnabled = GUI.enabled;
+ GUI.enabled = !Baker.IsBakeActive() && !EditorApplication.isPlayingOrWillChangePlaymode;
+
+ var tgt = target as SteamAudioListener;
+
+ EditorGUILayout.PropertyField(mUseAllProbeBatches);
+ if (!mUseAllProbeBatches.boolValue)
+ {
+ EditorGUILayout.PropertyField(mProbeBatches);
+ }
+
+ EditorGUILayout.Space();
+ if (GUILayout.Button("Bake"))
+ {
+ tgt.BeginBake();
+ mShouldShowProgressBar = true;
+ }
+
+ GUI.enabled = oldGUIEnabled;
+
+ if (mShouldShowProgressBar && !Baker.IsBakeActive())
+ {
+ mShouldShowProgressBar = false;
+ }
+
+ if (mShouldShowProgressBar)
+ {
+ Baker.DrawProgressBar();
+ }
+
+ Repaint();
+
+ EditorGUILayout.Space();
+ mStatsFoldout = EditorGUILayout.Foldout(mStatsFoldout, "Baked Data Statistics");
+ if (mStatsFoldout && !Baker.IsBakeActive())
+ {
+ for (var i = 0; i < tgt.GetProbeBatchesUsed().Length; ++i)
+ {
+ EditorGUILayout.LabelField(tgt.GetProbeBatchesUsed()[i].gameObject.name, Common.HumanReadableDataSize(tgt.GetProbeDataSizes()[i]));
+ }
+ EditorGUILayout.LabelField("Total Size", Common.HumanReadableDataSize(tgt.GetTotalDataSize()));
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ }
+#else
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("Steam Audio is not supported for the target platform or STEAMAUDIO_ENABLED define symbol is missing.", MessageType.Warning);
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioListenerInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioListenerInspector.cs.meta
new file mode 100644
index 00000000..74870b9c
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioListenerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 68c66682e05a3a744896f1452c21c860
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioManagerInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioManagerInspector.cs
new file mode 100644
index 00000000..7263f120
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioManagerInspector.cs
@@ -0,0 +1,57 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioManager))]
+ [CanEditMultipleObjects]
+ public class SteamAudioManagerInspector : Editor
+ {
+#if STEAMAUDIO_ENABLED
+ SerializedProperty mCurrentHRTF;
+
+ private void OnEnable()
+ {
+ mCurrentHRTF = serializedObject.FindProperty("currentHRTF");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ var tgt = target as SteamAudioManager;
+
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("HRTF Settings", EditorStyles.boldLabel);
+ mCurrentHRTF.intValue = EditorGUILayout.Popup("Current HRTF", mCurrentHRTF.intValue, tgt.hrtfNames);
+
+ EditorGUILayout.Space();
+ EditorGUILayout.HelpBox(
+ "This component should not be added manually to any GameObject. It is automatically created and" +
+ "destroyed by Steam Audio.", MessageType.Warning);
+
+ serializedObject.ApplyModifiedProperties();
+ }
+#else
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("Steam Audio is not supported for the target platform or STEAMAUDIO_ENABLED define symbol is missing.", MessageType.Warning);
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioManagerInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioManagerInspector.cs.meta
new file mode 100644
index 00000000..337ec45f
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioManagerInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e5adb5adac336b84fa2308b30315459d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMaterialInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMaterialInspector.cs
new file mode 100644
index 00000000..741d4388
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMaterialInspector.cs
@@ -0,0 +1,59 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioMaterial))]
+ [CanEditMultipleObjects]
+ public class SteamAudioMaterialInspector : Editor
+ {
+ SerializedProperty lowFreqAbsorption;
+ SerializedProperty midFreqAbsorption;
+ SerializedProperty highFreqAbsorption;
+ SerializedProperty scattering;
+ SerializedProperty lowFreqTransmission;
+ SerializedProperty midFreqTransmission;
+ SerializedProperty highFreqTransmission;
+
+ private void OnEnable()
+ {
+ lowFreqAbsorption = serializedObject.FindProperty("lowFreqAbsorption");
+ midFreqAbsorption = serializedObject.FindProperty("midFreqAbsorption");
+ highFreqAbsorption = serializedObject.FindProperty("highFreqAbsorption");
+ scattering = serializedObject.FindProperty("scattering");
+ lowFreqTransmission = serializedObject.FindProperty("lowFreqTransmission");
+ midFreqTransmission = serializedObject.FindProperty("midFreqTransmission");
+ highFreqTransmission = serializedObject.FindProperty("highFreqTransmission");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ EditorGUILayout.PropertyField(lowFreqAbsorption);
+ EditorGUILayout.PropertyField(midFreqAbsorption);
+ EditorGUILayout.PropertyField(highFreqAbsorption);
+ EditorGUILayout.PropertyField(scattering);
+ EditorGUILayout.PropertyField(lowFreqTransmission);
+ EditorGUILayout.PropertyField(midFreqTransmission);
+ EditorGUILayout.PropertyField(highFreqTransmission);
+
+ serializedObject.ApplyModifiedProperties();
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMaterialInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMaterialInspector.cs.meta
new file mode 100644
index 00000000..015c6ae8
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMaterialInspector.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d390cf1bb6f67ca47b6b5d3c43ec5956
+timeCreated: 1499375927
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMixerReturnGUI.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMixerReturnGUI.cs
new file mode 100644
index 00000000..a1e7b815
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMixerReturnGUI.cs
@@ -0,0 +1,74 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using UnityEditor;
+
+namespace SteamAudio
+{
+ public class SteamAudioMixerReturnGUI : IAudioEffectPluginGUI
+ {
+ public override string Name
+ {
+ get
+ {
+ return "Steam Audio Mixer Return";
+ }
+ }
+
+ public override string Vendor
+ {
+ get
+ {
+ return "Valve Corporation";
+ }
+ }
+
+ public override string Description
+ {
+ get
+ {
+ return "Enables accelerated mixing of reflections for sources spatialized using Steam Audio.";
+ }
+ }
+
+ public override bool OnGUI(IAudioEffectPlugin plugin)
+ {
+ if (SteamAudioSettings.Singleton.audioEngine != AudioEngineType.Unity)
+ {
+ EditorGUILayout.HelpBox(
+ "This Audio Mixer effect requires the audio engine to be set to Unity. Click" +
+ "Steam Audio > Settings to change this.", MessageType.Warning);
+
+ return false;
+ }
+
+ var binauralValue = 0.0f;
+
+ plugin.GetFloatParameter("Binaural", out binauralValue);
+
+ var binaural = (binauralValue == 1.0f);
+
+ binaural = EditorGUILayout.Toggle("Apply HRTF", binaural);
+
+ binauralValue = (binaural) ? 1.0f : 0.0f;
+
+ plugin.SetFloatParameter("Binaural", binauralValue);
+
+ return false;
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMixerReturnGUI.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMixerReturnGUI.cs.meta
new file mode 100644
index 00000000..8594faa0
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioMixerReturnGUI.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 03cab73d8173c364bb30b17574e2f240
+timeCreated: 1499881264
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioProbeBatchInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioProbeBatchInspector.cs
new file mode 100644
index 00000000..06b0e7d8
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioProbeBatchInspector.cs
@@ -0,0 +1,143 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using UnityEngine.SceneManagement;
+using UnityEditor;
+using UnityEditor.SceneManagement;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioProbeBatch))]
+ public class SteamAudioProbeBatchInspector : Editor
+ {
+#if STEAMAUDIO_ENABLED
+ SerializedProperty mPlacementStrategy;
+ SerializedProperty mHorizontalSpacing;
+ SerializedProperty mHeightAboveFloor;
+ SerializedProperty mAsset;
+
+ bool mShouldShowProgressBar = false;
+
+ private void OnEnable()
+ {
+ mPlacementStrategy = serializedObject.FindProperty("placementStrategy");
+ mHorizontalSpacing = serializedObject.FindProperty("horizontalSpacing");
+ mHeightAboveFloor = serializedObject.FindProperty("heightAboveFloor");
+ mAsset = serializedObject.FindProperty("asset");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ var oldGUIEnabled = GUI.enabled;
+ GUI.enabled = !Baker.IsBakeActive() && !EditorApplication.isPlayingOrWillChangePlaymode;
+
+ var tgt = target as SteamAudioProbeBatch;
+
+ EditorGUILayout.PropertyField(mAsset);
+
+ EditorGUILayout.PropertyField(mPlacementStrategy);
+ if ((ProbeGenerationType) mPlacementStrategy.enumValueIndex == ProbeGenerationType.UniformFloor)
+ {
+ EditorGUILayout.PropertyField(mHorizontalSpacing);
+ EditorGUILayout.PropertyField(mHeightAboveFloor);
+ }
+
+ EditorGUILayout.Space();
+ if (GUILayout.Button("Generate Probes"))
+ {
+ tgt.GenerateProbes();
+ EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
+ }
+
+ if (tgt.GetNumProbes() > 0)
+ {
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("Baked Pathing Settings", EditorStyles.boldLabel);
+ if (GUILayout.Button("Bake"))
+ {
+ tgt.BeginBake();
+ mShouldShowProgressBar = true;
+ }
+ }
+
+ GUI.enabled = oldGUIEnabled;
+
+ if (mShouldShowProgressBar && !Baker.IsBakeActive())
+ {
+ mShouldShowProgressBar = false;
+ }
+
+ if (mShouldShowProgressBar)
+ {
+ Baker.DrawProgressBar();
+ }
+
+ Repaint();
+
+ if (tgt.GetNumProbes() > 0)
+ {
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("Probe Statistics", EditorStyles.boldLabel);
+ EditorGUILayout.LabelField("Probes", tgt.GetNumProbes().ToString());
+ EditorGUILayout.LabelField("Data Size", Common.HumanReadableDataSize(tgt.probeDataSize));
+
+ if (tgt.GetNumLayers() > 0)
+ {
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("Detailed Statistics", EditorStyles.boldLabel);
+ for (var i = 0; i < tgt.GetNumLayers(); ++i)
+ {
+ var layerInfo = tgt.GetInfoForLayer(i);
+
+ var name = "";
+ if (layerInfo.identifier.type == BakedDataType.Pathing)
+ {
+ name = "Pathing";
+ }
+ else if (layerInfo.identifier.variation == BakedDataVariation.Reverb)
+ {
+ name = "Reverb";
+ }
+ else
+ {
+ name = layerInfo.gameObject.name;
+ }
+
+ EditorGUILayout.BeginHorizontal();
+ EditorGUILayout.LabelField(name, Common.HumanReadableDataSize(layerInfo.dataSize));
+ if (GUILayout.Button("Clear"))
+ {
+ tgt.DeleteBakedDataForIdentifier(layerInfo.identifier);
+ EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
+ }
+ EditorGUILayout.EndHorizontal();
+ }
+ }
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ }
+#else
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("Steam Audio is not supported for the target platform or STEAMAUDIO_ENABLED define symbol is missing.", MessageType.Warning);
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioProbeBatchInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioProbeBatchInspector.cs.meta
new file mode 100644
index 00000000..d6cd3aef
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioProbeBatchInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: db54b1d0b8cefcf4486eccd5e7c185f7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataEditor.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataEditor.cs
new file mode 100644
index 00000000..ab3ae881
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataEditor.cs
@@ -0,0 +1,147 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System.Data;
+using System.Linq;
+using UnityEditor;
+using UnityEngine;
+
+namespace SteamAudio
+{
+
+ [CustomEditor(typeof(SteamAudioReverbData)), CanEditMultipleObjects]
+ public class ReverbDataEditor : Editor
+ {
+ private string mReverbTimeFoldoutKey = "SteamAudioProbeInspector_ReverbTimeFoldoutState";
+ private string mEnergyFieldFoldoutKey = "SteamAudioProbeInspector_EnergyFieldFoldoutState";
+ private string mImpulseResponseFoldoutKey = "SteamAudioProbeInspector_ImpulseResponseFoldoutState";
+ public bool mOwnerIsMultiEditing = false; // Typically set by parent.
+
+
+ public override void OnInspectorGUI()
+ {
+ var tgt = target as SteamAudioReverbData;
+ bool bReverbTimesFoldoutExpanded = SessionState.GetBool(mReverbTimeFoldoutKey, false);
+ bReverbTimesFoldoutExpanded = EditorGUILayout.BeginFoldoutHeaderGroup(bReverbTimesFoldoutExpanded, "Reverb Times");
+ if (bReverbTimesFoldoutExpanded)
+ {
+ if (serializedObject.isEditingMultipleObjects | mOwnerIsMultiEditing)
+ {
+ EditorGUILayout.HelpBox("Multiple objects selected.", MessageType.Info);
+ }
+ else if (tgt.reverbTimes == null || tgt.reverbTimes.Length == 0)
+ {
+ EditorGUILayout.HelpBox("No reverb time data to display.", MessageType.Info);
+ }
+ else
+ {
+ for (int i = 0; i < tgt.reverbTimes.Length; ++i)
+ {
+ EditorGUILayout.LabelField("Band " + i + " (seconds)", tgt.reverbTimes[i].ToString("0.000"));
+ }
+ }
+ }
+ EditorGUILayout.EndFoldoutHeaderGroup();
+ SessionState.SetBool(mReverbTimeFoldoutKey, bReverbTimesFoldoutExpanded);
+
+ EditorGUILayout.Space();
+ bool bEnergyFieldFoldoutExpanded = SessionState.GetBool(mEnergyFieldFoldoutKey, false);
+ bEnergyFieldFoldoutExpanded = EditorGUILayout.BeginFoldoutHeaderGroup(bEnergyFieldFoldoutExpanded, "Reverb Energy Field Stats");
+ if (bEnergyFieldFoldoutExpanded)
+ {
+ if (serializedObject.isEditingMultipleObjects || mOwnerIsMultiEditing)
+ {
+ EditorGUILayout.HelpBox("Multiple objects selected.", MessageType.Info);
+ }
+ else if (tgt.reverbEnergyField == null || tgt.reverbEnergyField.Length == 0)
+ {
+ EditorGUILayout.HelpBox("No energy field data to display.", MessageType.Info);
+ }
+ else
+ {
+ string sampleCountString = tgt.reverbEnergyField.Length.ToString();
+ sampleCountString += " (" + tgt.reverbEnergyFieldNumChannels + (tgt.reverbEnergyFieldNumChannels > 1 ? " channels" : " channel");
+ sampleCountString += " x " + tgt.reverbEnergyFieldNumBands + " bands";
+ sampleCountString += " x " + tgt.reverbEnergyFieldNumBins + " bins)";
+ EditorGUILayout.LabelField("Sample Count", sampleCountString);
+ EditorGUILayout.LabelField("Total Size", Common.HumanReadableDataSize(tgt.GetEnergyFieldSize()));
+
+ int numChannels = tgt.reverbEnergyFieldNumChannels;
+ int numBands = tgt.reverbEnergyFieldNumBands;
+ int numSamples = tgt.reverbEnergyFieldNumBins;
+ float[] channelEnergy = new float[numChannels];
+ for (int i = 0; i < numChannels; ++i)
+ {
+ channelEnergy[i] = .0f;
+ for (int j = 0; j < numBands; ++j)
+ {
+ for (int k = 0; k < numSamples; ++k)
+ {
+ channelEnergy[i] += tgt.GetEnergyFieldData(i, j, k);
+ }
+ }
+ }
+ EditorGUILayout.LabelField("Per Channel Energy", string.Join(", ", channelEnergy.Select(value => value.ToString("e2"))));
+ }
+ }
+ EditorGUILayout.EndFoldoutHeaderGroup();
+ SessionState.SetBool(mEnergyFieldFoldoutKey, bEnergyFieldFoldoutExpanded);
+
+ EditorGUILayout.Space();
+ bool bImpulseResponseFoldoutExpanded = SessionState.GetBool(mImpulseResponseFoldoutKey, false);
+ bImpulseResponseFoldoutExpanded = EditorGUILayout.BeginFoldoutHeaderGroup(bImpulseResponseFoldoutExpanded, "Reverb Impulse Response Stats");
+ if (bImpulseResponseFoldoutExpanded)
+ {
+ if (serializedObject.isEditingMultipleObjects || mOwnerIsMultiEditing)
+ {
+ EditorGUILayout.HelpBox("Multiple objects selected.", MessageType.Info);
+ }
+ else if (tgt.reverbIR == null || tgt.reverbIR.Length == 0)
+ {
+ EditorGUILayout.HelpBox("No impulse response data to display.", MessageType.Info);
+ }
+ else
+ {
+ string sampleCountString = tgt.reverbIR.Length.ToString();
+ sampleCountString += " (" + tgt.reverbIRNumChannels + (tgt.reverbIRNumChannels > 1 ? " channels" : " channel");
+ sampleCountString += " x " + tgt.reverbIRNumSamples + " samples)";
+ EditorGUILayout.LabelField("Sample Count", sampleCountString);
+ EditorGUILayout.LabelField("Total Size", Common.HumanReadableDataSize(tgt.GetImpulseResponseSize()));
+
+ int numChannels = tgt.reverbIRNumChannels;
+ int numSamples = tgt.reverbIRNumSamples;
+ float[] channelMax = new float[numChannels];
+ float[] channelMin = new float[numChannels];
+ for (int i = 0; i < numChannels; ++i)
+ {
+ channelMax[i] = float.MinValue;
+ channelMin[i] = float.MaxValue;
+ for (int k = 0; k < numSamples; ++k)
+ {
+ channelMax[i] = Mathf.Max(tgt.GetImpulseResponseData(i, k), channelMax[i]);
+ channelMin[i] = Mathf.Min(tgt.GetImpulseResponseData(i, k), channelMin[i]);
+ }
+ }
+
+ EditorGUILayout.LabelField("Per Channel Min", string.Join(", ", channelMin.Select(value => value.ToString("e2"))));
+ EditorGUILayout.LabelField("Per Channel Max", string.Join(", ", channelMax.Select(value => value.ToString("e2"))));
+ }
+ }
+ EditorGUILayout.EndFoldoutHeaderGroup();
+ SessionState.SetBool(mImpulseResponseFoldoutKey, bImpulseResponseFoldoutExpanded);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataEditor.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataEditor.cs.meta
new file mode 100644
index 00000000..efd1cf16
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataEditor.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ded1a41ba66630a418b44e6d9411e3db
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataPointInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataPointInspector.cs
new file mode 100644
index 00000000..5bce0f0f
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataPointInspector.cs
@@ -0,0 +1,233 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using UnityEngine.SceneManagement;
+using UnityEditor;
+using UnityEditor.SceneManagement;
+using System.Linq;
+using System.Data;
+using System.Collections.Generic;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioReverbDataPoint)), CanEditMultipleObjects]
+ public class SteamAudioReverbDataPointInspector : Editor
+ {
+#if STEAMAUDIO_ENABLED
+ private int[] alllowedSampleRates = new int[] { 24000, 44100, 48000, 96000 };
+ private string[] displaySampleRates = new string[] { "24000 Hz", "44100 Hz", "48000 Hz", "96000 Hz" };
+ public SerializedProperty mSamplingRate;
+
+ public SerializedProperty mAmbisonicOrder;
+ public SerializedProperty mReverbDuration;
+ public SerializedProperty mReverbDataAsset;
+ public SerializedProperty mStoreEnergyField;
+ public SerializedProperty mStoreImpulseResponse;
+ private Editor mReverbDataEditor;
+
+ static bool mShouldShowProgressBar = false;
+
+ private void OnEnable()
+ {
+ mSamplingRate = serializedObject.FindProperty("sampleRate");
+ mAmbisonicOrder = serializedObject.FindProperty("ambisonicOrder");
+ mReverbDuration = serializedObject.FindProperty("reverbDuration");
+ mReverbDataAsset = serializedObject.FindProperty("reverbData");
+ mStoreEnergyField = serializedObject.FindProperty("storeEnergyField");
+ mStoreImpulseResponse = serializedObject.FindProperty("storeImpulseResponse");
+ }
+
+ [MenuItem("GameObject/Steam Audio/Steam Audio Reverb Data Point", false, 10)]
+ static void CreateGameObjectWithProbe(MenuCommand menuCommand)
+ {
+ var gameObject = new GameObject("Steam Audio Reverb Data Point");
+ gameObject.AddComponent();
+
+ GameObjectUtility.SetParentAndAlign(gameObject, menuCommand.context as GameObject);
+
+ Undo.RegisterCreatedObjectUndo(gameObject, "Create " + gameObject.name);
+ }
+
+ [MenuItem("Steam Audio/Steam Audio Reverb Data Point/Bake All", false, 61)]
+ public static void BakeAllProbes()
+ {
+ var allProbes = FindObjectsByType(FindObjectsSortMode.None);
+
+ if (allProbes.Length == 0)
+ {
+ EditorUtility.DisplayDialog("No Steam Audio Reverb Data Points Found", "No Steam Audio Reverb Data Point components were found in the currently-open scene.", "OK");
+ return;
+ }
+
+ SteamAudioReverbDataPoint.BeginBake(allProbes);
+ mShouldShowProgressBar = true;
+ EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
+ }
+
+ [MenuItem("Steam Audio/Steam Audio Reverb Data Point/Clear Unreferenced Data", false, 62)]
+ public static void DeleteUnreferencedAssets()
+ {
+ AssetDatabase.StartAssetEditing();
+
+ // Find all assets in SteamAudioProbe.GetAssetFolderPath() path.
+ string[] reverbDataFolder = new string[] { SteamAudioReverbDataPoint.GetAssetFolderPath() };
+ string assetType = typeof(SteamAudioReverbData).Name;
+
+ // Createa a list of all SteamAudioReverbData Assets which are inside reverbDataFolder folder.
+ string[] reverbDataAssets = AssetDatabase.FindAssets("t:" + assetType, reverbDataFolder);
+
+ if (reverbDataAssets.Length == 0)
+ {
+ Debug.Log("No cleanup needed. No Steam Audio Reverb Data assets found in " + reverbDataFolder[0] );
+ AssetDatabase.StopAssetEditing();
+ return;
+ }
+
+ // Go through all the assets and make a list of referenced SteamAudioProbe Assets.
+ List referencedReverbDataAssetPaths = new List();
+ var assetPaths = AssetDatabase.GetAllAssetPaths();
+ foreach (var assetPath in assetPaths)
+ {
+ if (!(assetPath.EndsWith(".unity") || assetPath.EndsWith(".prefab")))
+ continue;
+
+ var assetDependencies = AssetDatabase.GetDependencies(assetPath, false);
+ foreach (var assetDependency in assetDependencies)
+ {
+ if (assetDependency.Contains(reverbDataFolder[0]))
+ referencedReverbDataAssetPaths.Add(assetDependency);
+ }
+ }
+
+ // Go through all the assets of type SteamAudioReverbData inside reverbDataFolder.
+ // Delete the once which are not found in referenced SteamAudioProbe Assets found above.
+ int numReverbDataAssetsDeleted = 0;
+ foreach (var reverbDataAsset in reverbDataAssets)
+ {
+ var reverbDataAssetPath = AssetDatabase.GUIDToAssetPath(reverbDataAsset);
+ if (string.IsNullOrEmpty(reverbDataAssetPath))
+ continue;
+
+ bool deleteReverbDataAsset = !referencedReverbDataAssetPaths.Contains(reverbDataAssetPath);
+ if (deleteReverbDataAsset)
+ {
+ bool deleteSuccessful = AssetDatabase.DeleteAsset(reverbDataAssetPath);
+ var deleteSuccessfulString = "Delete Failed:";
+ if (deleteSuccessful)
+ {
+ ++numReverbDataAssetsDeleted;
+ deleteSuccessfulString = "Deleted:";
+ }
+
+ Debug.Log(deleteSuccessfulString + " " + reverbDataAssetPath);
+ }
+ }
+
+ Debug.Log("Number of SteamAudioReverbData Assets deleted: " + numReverbDataAssetsDeleted);
+ AssetDatabase.StopAssetEditing();
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ var oldGUIEnabled = GUI.enabled;
+ GUI.enabled = !Baker.IsBakeActive() && !EditorApplication.isPlayingOrWillChangePlaymode;
+
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("Reverb Settings", EditorStyles.boldLabel);
+
+ var tgt = target as SteamAudioReverbDataPoint;
+ int sampleRateIndex = System.Array.IndexOf(alllowedSampleRates, tgt.sampleRate);
+ if (sampleRateIndex < 0)
+ {
+ sampleRateIndex = 0;
+ tgt.sampleRate = alllowedSampleRates[sampleRateIndex];
+ }
+
+ EditorGUI.showMixedValue = mSamplingRate.hasMultipleDifferentValues;
+ EditorGUI.BeginChangeCheck();
+ int newSampleRate = EditorGUILayout.IntPopup("Sampling Rate", tgt.sampleRate, displaySampleRates, alllowedSampleRates);
+ var selectedProbes = targets.Cast().ToArray();
+
+ if (EditorGUI.EndChangeCheck())
+ {
+ foreach (SteamAudioReverbDataPoint probe in selectedProbes)
+ {
+ if (newSampleRate != probe.sampleRate)
+ {
+ probe.sampleRate = newSampleRate;
+ EditorUtility.SetDirty(probe);
+ }
+ }
+ }
+
+ EditorGUILayout.PropertyField(mAmbisonicOrder);
+ EditorGUILayout.PropertyField(mReverbDuration, new UnityEngine.GUIContent("Reverb Duration (seconds)"));
+ EditorGUILayout.PropertyField(mStoreEnergyField);
+ EditorGUILayout.PropertyField(mStoreImpulseResponse);
+
+ GUI.enabled = !Baker.IsBakeActive() && !EditorApplication.isPlayingOrWillChangePlaymode;
+ EditorGUILayout.Space();
+ string bakeButtonString = serializedObject.isEditingMultipleObjects ? "Bake Selected Probes" : "Bake";
+ if (GUILayout.Button(bakeButtonString))
+ {
+ SteamAudioReverbDataPoint.BeginBake(selectedProbes);
+ mShouldShowProgressBar = true;
+ EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
+ }
+
+ GUI.enabled = oldGUIEnabled;
+
+ if (mShouldShowProgressBar && !Baker.IsBakeActive())
+ {
+ mShouldShowProgressBar = false;
+ }
+
+ if (mShouldShowProgressBar)
+ {
+ Baker.DrawProgressBar();
+ Repaint();
+ }
+
+ // Display Stats
+ EditorGUILayout.PropertyField(mReverbDataAsset);
+ EditorGUILayout.Space();
+ if (mReverbDataAsset.objectReferenceValue != null)
+ {
+ Editor.CreateCachedEditor(mReverbDataAsset.objectReferenceValue, null, ref mReverbDataEditor);
+
+ // Pass the flag down for multi editing.
+ if (mReverbDataEditor is ReverbDataEditor reverbDataEditor)
+ reverbDataEditor.mOwnerIsMultiEditing = serializedObject.isEditingMultipleObjects;
+
+ mReverbDataEditor.OnInspectorGUI();
+ }
+
+ GUI.enabled = oldGUIEnabled;
+ serializedObject.ApplyModifiedProperties();
+ }
+
+#else
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("Steam Audio is not supported for the target platform or STEAMAUDIO_ENABLED define symbol is missing.", MessageType.Warning);
+ }
+#endif
+
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataPointInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataPointInspector.cs.meta
new file mode 100644
index 00000000..1bf90cb0
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbDataPointInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: db31fe9f01131d244895b5e6b9623f3f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbGUI.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbGUI.cs
new file mode 100644
index 00000000..06a358f2
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbGUI.cs
@@ -0,0 +1,74 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using UnityEditor;
+
+namespace SteamAudio
+{
+ public class SteamAudioReverbGUI : IAudioEffectPluginGUI
+ {
+ public override string Name
+ {
+ get
+ {
+ return "Steam Audio Reverb";
+ }
+ }
+
+ public override string Vendor
+ {
+ get
+ {
+ return "Valve Corporation";
+ }
+ }
+
+ public override string Description
+ {
+ get
+ {
+ return "Listener-centric reverb using Steam Audio.";
+ }
+ }
+
+ public override bool OnGUI(IAudioEffectPlugin plugin)
+ {
+ if (SteamAudioSettings.Singleton.audioEngine != AudioEngineType.Unity)
+ {
+ EditorGUILayout.HelpBox(
+ "This Audio Mixer effect requires the audio engine to be set to Unity. Click" +
+ "Steam Audio > Settings to change this.", MessageType.Warning);
+
+ return false;
+ }
+
+ var binauralValue = 0.0f;
+
+ plugin.GetFloatParameter("Binaural", out binauralValue);
+
+ var binaural = (binauralValue == 1.0f);
+
+ binaural = EditorGUILayout.Toggle("Apply HRTF", binaural);
+
+ binauralValue = (binaural) ? 1.0f : 0.0f;
+
+ plugin.SetFloatParameter("Binaural", binauralValue);
+
+ return false;
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbGUI.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbGUI.cs.meta
new file mode 100644
index 00000000..efff8375
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioReverbGUI.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6f194df3638411045b8624f4e62e44fd
+timeCreated: 1499886452
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSettingsInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSettingsInspector.cs
new file mode 100644
index 00000000..3f43e804
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSettingsInspector.cs
@@ -0,0 +1,236 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioSettings))]
+ [CanEditMultipleObjects]
+ public class SteamAudioSettingsInspector : Editor
+ {
+ SerializedProperty mAudioEngine;
+ SerializedProperty mHRTFDisabled;
+ SerializedProperty mPerspectiveCorrection;
+ SerializedProperty mPerspectiveCorrectionFactor;
+ SerializedProperty mHRTFVolumeNormalizationType;
+ SerializedProperty mHRTFVolumeGainDB;
+ SerializedProperty mSOFAFiles;
+ SerializedProperty mDefaultMaterial;
+ SerializedProperty mSceneType;
+ SerializedProperty mLayerMask;
+ SerializedProperty mMaxOcclusionSamples;
+ SerializedProperty mRealTimeRays;
+ SerializedProperty mRealTimeBounces;
+ SerializedProperty mRealTimeDuration;
+ SerializedProperty mRealTimeAmbisonicOrder;
+ SerializedProperty mRealTimeMaxSources;
+ SerializedProperty mRealTimeCPUCoresPercentage;
+ SerializedProperty mRealTimeIrradianceMinDistance;
+ SerializedProperty mBakeConvolution;
+ SerializedProperty mBakeParametric;
+ SerializedProperty mBakingRays;
+ SerializedProperty mBakingBounces;
+ SerializedProperty mBakingDuration;
+ SerializedProperty mBakingAmbisonicOrder;
+ SerializedProperty mBakingCPUCoresPercentage;
+ SerializedProperty mBakingIrradianceMinDistance;
+ SerializedProperty mBakingVisibilitySamples;
+ SerializedProperty mBakingVisibilityRadius;
+ SerializedProperty mBakingVisibilityThreshold;
+ SerializedProperty mBakingVisibilityRange;
+ SerializedProperty mBakingPathRange;
+ SerializedProperty mBakedPathingCPUCoresPercentage;
+ SerializedProperty mSimulationUpdateInterval;
+ SerializedProperty mReflectionEffectType;
+ SerializedProperty mHybridReverbTransitionTime;
+ SerializedProperty mHybridReverbOverlapPercent;
+ SerializedProperty mDeviceType;
+ SerializedProperty mMaxReservedCUs;
+ SerializedProperty mFractionCUsForIRUpdate;
+ SerializedProperty mBakingBatchSize;
+ SerializedProperty mTANDuration;
+ SerializedProperty mTANAmbisonicOrder;
+ SerializedProperty mTANMaxSources;
+ SerializedProperty mEnableValidation;
+
+#if !UNITY_2019_2_OR_NEWER
+ static string[] sSceneTypes = new string[] { "Phonon", "Embree", "Radeon Rays", "Unity" };
+#endif
+
+#if !UNITY_2019_2_OR_NEWER
+ static string[] sReflectionEffectTypes = new string[] { "Convolution", "Parametric", "Hybrid", "TrueAudio Next" };
+#endif
+
+ private void OnEnable()
+ {
+ mAudioEngine = serializedObject.FindProperty("audioEngine");
+ mHRTFDisabled = serializedObject.FindProperty("hrtfDisabled");
+ mPerspectiveCorrection = serializedObject.FindProperty("perspectiveCorrection");
+ mPerspectiveCorrectionFactor = serializedObject.FindProperty("perspectiveCorrectionFactor");
+ mHRTFVolumeGainDB = serializedObject.FindProperty("hrtfVolumeGainDB");
+ mHRTFVolumeNormalizationType = serializedObject.FindProperty("hrtfNormalizationType");
+ mSOFAFiles = serializedObject.FindProperty("SOFAFiles");
+ mDefaultMaterial = serializedObject.FindProperty("defaultMaterial");
+ mSceneType = serializedObject.FindProperty("sceneType");
+ mLayerMask = serializedObject.FindProperty("layerMask");
+ mMaxOcclusionSamples = serializedObject.FindProperty("maxOcclusionSamples");
+ mRealTimeRays = serializedObject.FindProperty("realTimeRays");
+ mRealTimeBounces = serializedObject.FindProperty("realTimeBounces");
+ mRealTimeDuration = serializedObject.FindProperty("realTimeDuration");
+ mRealTimeAmbisonicOrder = serializedObject.FindProperty("realTimeAmbisonicOrder");
+ mRealTimeMaxSources = serializedObject.FindProperty("realTimeMaxSources");
+ mRealTimeCPUCoresPercentage = serializedObject.FindProperty("realTimeCPUCoresPercentage");
+ mRealTimeIrradianceMinDistance = serializedObject.FindProperty("realTimeIrradianceMinDistance");
+ mBakeConvolution = serializedObject.FindProperty("bakeConvolution");
+ mBakeParametric = serializedObject.FindProperty("bakeParametric");
+ mBakingRays = serializedObject.FindProperty("bakingRays");
+ mBakingBounces = serializedObject.FindProperty("bakingBounces");
+ mBakingDuration = serializedObject.FindProperty("bakingDuration");
+ mBakingAmbisonicOrder = serializedObject.FindProperty("bakingAmbisonicOrder");
+ mBakingCPUCoresPercentage = serializedObject.FindProperty("bakingCPUCoresPercentage");
+ mBakingIrradianceMinDistance = serializedObject.FindProperty("bakingIrradianceMinDistance");
+ mBakingVisibilitySamples = serializedObject.FindProperty("bakingVisibilitySamples");
+ mBakingVisibilityRadius = serializedObject.FindProperty("bakingVisibilityRadius");
+ mBakingVisibilityThreshold = serializedObject.FindProperty("bakingVisibilityThreshold");
+ mBakingVisibilityRange = serializedObject.FindProperty("bakingVisibilityRange");
+ mBakingPathRange = serializedObject.FindProperty("bakingPathRange");
+ mBakedPathingCPUCoresPercentage = serializedObject.FindProperty("bakedPathingCPUCoresPercentage");
+ mSimulationUpdateInterval = serializedObject.FindProperty("simulationUpdateInterval");
+ mReflectionEffectType = serializedObject.FindProperty("reflectionEffectType");
+ mHybridReverbTransitionTime = serializedObject.FindProperty("hybridReverbTransitionTime");
+ mHybridReverbOverlapPercent = serializedObject.FindProperty("hybridReverbOverlapPercent");
+ mDeviceType = serializedObject.FindProperty("deviceType");
+ mMaxReservedCUs = serializedObject.FindProperty("maxReservedComputeUnits");
+ mFractionCUsForIRUpdate = serializedObject.FindProperty("fractionComputeUnitsForIRUpdate");
+ mBakingBatchSize = serializedObject.FindProperty("bakingBatchSize");
+ mTANDuration = serializedObject.FindProperty("TANDuration");
+ mTANAmbisonicOrder = serializedObject.FindProperty("TANAmbisonicOrder");
+ mTANMaxSources = serializedObject.FindProperty("TANMaxSources");
+ mEnableValidation = serializedObject.FindProperty("EnableValidation");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ EditorGUILayout.PropertyField(mAudioEngine);
+ EditorGUILayout.PropertyField(mHRTFDisabled, new UnityEngine.GUIContent("Disable HRTF Globally", "Disable HRTF rendering for all events/sources. Useful when the end user is using speakers instead of headphones."));
+ EditorGUILayout.PropertyField(mPerspectiveCorrection, new UnityEngine.GUIContent("Enable Perspective Correction"));
+
+ if (mPerspectiveCorrection.boolValue)
+ EditorGUILayout.PropertyField(mPerspectiveCorrectionFactor);
+
+ EditorGUILayout.PropertyField(mHRTFVolumeGainDB, new UnityEngine.GUIContent("HRTF Volume Gain (dB)"));
+ EditorGUILayout.PropertyField(mHRTFVolumeNormalizationType, new UnityEngine.GUIContent("HRTF Normalization Type"));
+
+ EditorGUILayout.PropertyField(mSOFAFiles, true);
+ EditorGUILayout.PropertyField(mDefaultMaterial);
+#if UNITY_2019_2_OR_NEWER
+ EditorGUILayout.PropertyField(mSceneType);
+#else
+ SceneTypeField();
+#endif
+
+ if (((SceneType) mSceneType.enumValueIndex) == SceneType.Custom)
+ {
+ EditorGUILayout.PropertyField(mLayerMask);
+ }
+
+ EditorGUILayout.PropertyField(mMaxOcclusionSamples);
+
+ EditorGUILayout.PropertyField(mRealTimeRays);
+ EditorGUILayout.PropertyField(mRealTimeBounces);
+ EditorGUILayout.PropertyField(mRealTimeDuration);
+ EditorGUILayout.PropertyField(mRealTimeAmbisonicOrder);
+ EditorGUILayout.PropertyField(mRealTimeMaxSources);
+ EditorGUILayout.PropertyField(mRealTimeCPUCoresPercentage);
+ EditorGUILayout.PropertyField(mRealTimeIrradianceMinDistance);
+
+ EditorGUILayout.PropertyField(mBakeConvolution);
+ EditorGUILayout.PropertyField(mBakeParametric);
+ EditorGUILayout.PropertyField(mBakingRays);
+ EditorGUILayout.PropertyField(mBakingBounces);
+ EditorGUILayout.PropertyField(mBakingDuration);
+ EditorGUILayout.PropertyField(mBakingAmbisonicOrder);
+ EditorGUILayout.PropertyField(mBakingCPUCoresPercentage);
+ EditorGUILayout.PropertyField(mBakingIrradianceMinDistance);
+
+ EditorGUILayout.PropertyField(mBakingVisibilitySamples);
+ EditorGUILayout.PropertyField(mBakingVisibilityRadius);
+ EditorGUILayout.PropertyField(mBakingVisibilityThreshold);
+ EditorGUILayout.PropertyField(mBakingVisibilityRange);
+ EditorGUILayout.PropertyField(mBakingPathRange);
+ EditorGUILayout.PropertyField(mBakedPathingCPUCoresPercentage);
+
+ EditorGUILayout.PropertyField(mSimulationUpdateInterval);
+
+#if UNITY_2019_2_OR_NEWER
+ EditorGUILayout.PropertyField(mReflectionEffectType);
+#else
+ ReflectionEffectTypeField();
+#endif
+
+ if (((ReflectionEffectType) mReflectionEffectType.enumValueIndex) == ReflectionEffectType.Hybrid)
+ {
+ EditorGUILayout.PropertyField(mHybridReverbTransitionTime);
+ EditorGUILayout.PropertyField(mHybridReverbOverlapPercent);
+ }
+
+ if (((SceneType) mSceneType.enumValueIndex) == SceneType.RadeonRays ||
+ ((ReflectionEffectType) mReflectionEffectType.enumValueIndex) == ReflectionEffectType.TrueAudioNext)
+ {
+ EditorGUILayout.PropertyField(mDeviceType);
+ EditorGUILayout.PropertyField(mMaxReservedCUs);
+ EditorGUILayout.PropertyField(mFractionCUsForIRUpdate);
+
+ if (((SceneType) mSceneType.enumValueIndex) == SceneType.RadeonRays)
+ {
+ EditorGUILayout.PropertyField(mBakingBatchSize);
+ }
+
+ if (((ReflectionEffectType) mReflectionEffectType.enumValueIndex) == ReflectionEffectType.TrueAudioNext)
+ {
+ EditorGUILayout.PropertyField(mTANDuration);
+ EditorGUILayout.PropertyField(mTANAmbisonicOrder);
+ EditorGUILayout.PropertyField(mTANMaxSources);
+ }
+ }
+
+ EditorGUILayout.PropertyField(mEnableValidation);
+
+ serializedObject.ApplyModifiedProperties();
+ }
+
+#if !UNITY_2019_2_OR_NEWER
+ void SceneTypeField()
+ {
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("Ray Tracer Settings", EditorStyles.boldLabel);
+ mSceneType.enumValueIndex = EditorGUILayout.Popup(mSceneType.displayName, mSceneType.enumValueIndex, sSceneTypes);
+ }
+#endif
+
+#if !UNITY_2019_2_OR_NEWER
+ void ReflectionEffectTypeField()
+ {
+ EditorGUILayout.Space();
+ EditorGUILayout.LabelField("Reflection Effect Settings", EditorStyles.boldLabel);
+ mReflectionEffectType.enumValueIndex = EditorGUILayout.Popup(mReflectionEffectType.displayName, mReflectionEffectType.enumValueIndex, sReflectionEffectTypes);
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSettingsInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSettingsInspector.cs.meta
new file mode 100644
index 00000000..6281bbb0
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSettingsInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4874c09ead1502c4b966e1bb4e7ad3da
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSourceInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSourceInspector.cs
new file mode 100644
index 00000000..436c701e
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSourceInspector.cs
@@ -0,0 +1,351 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioSource))]
+ public class SteamAudioSourceInspector : Editor
+ {
+ SerializedProperty mDirectBinaural;
+ SerializedProperty mInterpolation;
+ SerializedProperty mPerspectiveCorrection;
+ SerializedProperty mDistanceAttenuation;
+ SerializedProperty mDistanceAttenuationInput;
+ SerializedProperty mAirAbsorption;
+ SerializedProperty mAirAbsorptionInput;
+ SerializedProperty mAirAbsorptionLow;
+ SerializedProperty mAirAbsorptionMid;
+ SerializedProperty mAirAbsorptionHigh;
+ SerializedProperty mDirectivity;
+ SerializedProperty mDirectivityInput;
+ SerializedProperty mDipoleWeight;
+ SerializedProperty mDipolePower;
+ SerializedProperty mDirectivityValue;
+ SerializedProperty mOcclusion;
+ SerializedProperty mOcclusionInput;
+ SerializedProperty mOcclusionType;
+ SerializedProperty mOcclusionRadius;
+ SerializedProperty mOcclusionSamples;
+ SerializedProperty mOcclusionValue;
+ SerializedProperty mTransmission;
+ SerializedProperty mTransmissionType;
+ SerializedProperty mTransmissionInput;
+ SerializedProperty mTransmissionLow;
+ SerializedProperty mTransmissionMid;
+ SerializedProperty mTransmissionHigh;
+ SerializedProperty mTransmissionRays;
+ SerializedProperty mDirectMixLevel;
+ SerializedProperty mReflections;
+ SerializedProperty mReflectionsType;
+ SerializedProperty mUseDistanceCurveForReflections;
+ SerializedProperty mCurrentBakedSource;
+ SerializedProperty mApplyHRTFToReflections;
+ SerializedProperty mReflectionsMixLevel;
+ SerializedProperty mPathing;
+ SerializedProperty mPathingProbeBatch;
+ SerializedProperty mPathValidation;
+ SerializedProperty mFindAlternatePaths;
+ SerializedProperty mApplyHRTFToPathing;
+ SerializedProperty mPathingMixLevel;
+ SerializedProperty mNormalizePathingEQ;
+
+ Texture2D mDirectivityPreview = null;
+ float[] mDirectivitySamples = null;
+ Vector2[] mDirectivityPositions = null;
+
+ private void OnEnable()
+ {
+ mDirectBinaural = serializedObject.FindProperty("directBinaural");
+ mInterpolation = serializedObject.FindProperty("interpolation");
+ mPerspectiveCorrection = serializedObject.FindProperty("perspectiveCorrection");
+ mDistanceAttenuation = serializedObject.FindProperty("distanceAttenuation");
+ mDistanceAttenuationInput = serializedObject.FindProperty("distanceAttenuationInput");
+ mAirAbsorption = serializedObject.FindProperty("airAbsorption");
+ mAirAbsorptionInput = serializedObject.FindProperty("airAbsorptionInput");
+ mAirAbsorptionLow = serializedObject.FindProperty("airAbsorptionLow");
+ mAirAbsorptionMid = serializedObject.FindProperty("airAbsorptionMid");
+ mAirAbsorptionHigh = serializedObject.FindProperty("airAbsorptionHigh");
+ mDirectivity = serializedObject.FindProperty("directivity");
+ mDirectivityInput = serializedObject.FindProperty("directivityInput");
+ mDipoleWeight = serializedObject.FindProperty("dipoleWeight");
+ mDipolePower = serializedObject.FindProperty("dipolePower");
+ mDirectivityValue = serializedObject.FindProperty("directivityValue");
+ mOcclusion = serializedObject.FindProperty("occlusion");
+ mOcclusionInput = serializedObject.FindProperty("occlusionInput");
+ mOcclusionType = serializedObject.FindProperty("occlusionType");
+ mOcclusionRadius = serializedObject.FindProperty("occlusionRadius");
+ mOcclusionSamples = serializedObject.FindProperty("occlusionSamples");
+ mOcclusionValue = serializedObject.FindProperty("occlusionValue");
+ mTransmission = serializedObject.FindProperty("transmission");
+ mTransmissionType = serializedObject.FindProperty("transmissionType");
+ mTransmissionInput = serializedObject.FindProperty("transmissionInput");
+ mTransmissionLow = serializedObject.FindProperty("transmissionLow");
+ mTransmissionMid = serializedObject.FindProperty("transmissionMid");
+ mTransmissionHigh = serializedObject.FindProperty("transmissionHigh");
+ mTransmissionRays = serializedObject.FindProperty("maxTransmissionSurfaces");
+ mDirectMixLevel = serializedObject.FindProperty("directMixLevel");
+ mReflections = serializedObject.FindProperty("reflections");
+ mReflectionsType = serializedObject.FindProperty("reflectionsType");
+ mUseDistanceCurveForReflections = serializedObject.FindProperty("useDistanceCurveForReflections");
+ mCurrentBakedSource = serializedObject.FindProperty("currentBakedSource");
+ mApplyHRTFToReflections = serializedObject.FindProperty("applyHRTFToReflections");
+ mReflectionsMixLevel = serializedObject.FindProperty("reflectionsMixLevel");
+ mPathing = serializedObject.FindProperty("pathing");
+ mPathingProbeBatch = serializedObject.FindProperty("pathingProbeBatch");
+ mPathValidation = serializedObject.FindProperty("pathValidation");
+ mFindAlternatePaths = serializedObject.FindProperty("findAlternatePaths");
+ mApplyHRTFToPathing = serializedObject.FindProperty("applyHRTFToPathing");
+ mPathingMixLevel = serializedObject.FindProperty("pathingMixLevel");
+ mNormalizePathingEQ = serializedObject.FindProperty("normalizePathingEQ");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ var audioEngineIsUnity = (SteamAudioSettings.Singleton.audioEngine == AudioEngineType.Unity);
+
+ serializedObject.Update();
+
+ if (audioEngineIsUnity)
+ {
+ EditorGUILayout.PropertyField(mDirectBinaural);
+ EditorGUILayout.PropertyField(mInterpolation);
+ }
+
+ if (audioEngineIsUnity && SteamAudioSettings.Singleton.perspectiveCorrection)
+ {
+ EditorGUILayout.PropertyField(mPerspectiveCorrection);
+ }
+
+ if (audioEngineIsUnity)
+ {
+ EditorGUILayout.PropertyField(mDistanceAttenuation);
+ if (mDistanceAttenuation.boolValue)
+ {
+ EditorGUILayout.PropertyField(mDistanceAttenuationInput);
+ }
+ }
+
+ if (audioEngineIsUnity)
+ {
+ EditorGUILayout.PropertyField(mAirAbsorption);
+ if (mAirAbsorption.boolValue)
+ {
+ EditorGUILayout.PropertyField(mAirAbsorptionInput);
+ if ((AirAbsorptionInput)mAirAbsorptionInput.enumValueIndex == AirAbsorptionInput.UserDefined)
+ {
+ EditorGUILayout.PropertyField(mAirAbsorptionLow);
+ EditorGUILayout.PropertyField(mAirAbsorptionMid);
+ EditorGUILayout.PropertyField(mAirAbsorptionHigh);
+ }
+ }
+ }
+
+ if (audioEngineIsUnity)
+ {
+ EditorGUILayout.PropertyField(mDirectivity);
+ if (mDirectivity.boolValue)
+ {
+ EditorGUILayout.PropertyField(mDirectivityInput);
+
+ if ((DirectivityInput) mDirectivityInput.enumValueIndex == DirectivityInput.SimulationDefined)
+ {
+ EditorGUILayout.PropertyField(mDipoleWeight);
+ EditorGUILayout.PropertyField(mDipolePower);
+ DrawDirectivity(mDipoleWeight.floatValue, mDipolePower.floatValue);
+ }
+ else if ((DirectivityInput) mDirectivityInput.enumValueIndex == DirectivityInput.UserDefined)
+ {
+ EditorGUILayout.PropertyField(mDirectivityValue);
+ }
+ }
+ }
+
+ EditorGUILayout.PropertyField(mOcclusion);
+ if (mOcclusion.boolValue)
+ {
+ if (audioEngineIsUnity)
+ {
+ EditorGUILayout.PropertyField(mOcclusionInput);
+ }
+
+ if (!audioEngineIsUnity ||
+ (OcclusionInput) mOcclusionInput.enumValueIndex == OcclusionInput.SimulationDefined)
+ {
+ EditorGUILayout.PropertyField(mOcclusionType);
+ if ((OcclusionType) mOcclusionType.enumValueIndex == OcclusionType.Volumetric)
+ {
+ EditorGUILayout.PropertyField(mOcclusionRadius);
+ EditorGUILayout.PropertyField(mOcclusionSamples);
+ }
+ }
+ else if ((OcclusionInput) mOcclusionInput.enumValueIndex == OcclusionInput.UserDefined)
+ {
+ EditorGUILayout.PropertyField(mOcclusionValue);
+ }
+
+ EditorGUILayout.PropertyField(mTransmission);
+ if (audioEngineIsUnity)
+ {
+ if (mTransmission.boolValue)
+ {
+ EditorGUILayout.PropertyField(mTransmissionType);
+ EditorGUILayout.PropertyField(mTransmissionInput);
+ if ((TransmissionInput)mTransmissionInput.enumValueIndex == TransmissionInput.UserDefined)
+ {
+ if (mTransmissionType.enumValueIndex == (int)TransmissionType.FrequencyDependent)
+ {
+ EditorGUILayout.PropertyField(mTransmissionLow);
+ EditorGUILayout.PropertyField(mTransmissionMid);
+ EditorGUILayout.PropertyField(mTransmissionHigh);
+ }
+ else
+ {
+ EditorGUILayout.PropertyField(mTransmissionMid);
+ }
+ }
+ }
+ }
+
+ if (!audioEngineIsUnity ||
+ (TransmissionInput) mTransmissionInput.enumValueIndex == TransmissionInput.SimulationDefined)
+ {
+ EditorGUILayout.PropertyField(mTransmissionRays);
+ }
+ }
+
+ if (audioEngineIsUnity)
+ {
+ EditorGUILayout.PropertyField(mDirectMixLevel);
+ }
+
+ EditorGUILayout.PropertyField(mReflections);
+ if (mReflections.boolValue)
+ {
+ EditorGUILayout.PropertyField(mReflectionsType);
+
+ if (audioEngineIsUnity &&
+ mDistanceAttenuation.boolValue &&
+ (DistanceAttenuationInput) mDistanceAttenuationInput.enumValueIndex == DistanceAttenuationInput.CurveDriven)
+ {
+ EditorGUILayout.PropertyField(mUseDistanceCurveForReflections);
+ }
+
+ if ((ReflectionsType) mReflectionsType.enumValueIndex == ReflectionsType.BakedStaticSource)
+ {
+ EditorGUILayout.PropertyField(mCurrentBakedSource);
+ }
+
+ if (audioEngineIsUnity)
+ {
+ EditorGUILayout.PropertyField(mApplyHRTFToReflections);
+ EditorGUILayout.PropertyField(mReflectionsMixLevel);
+ }
+ }
+
+ EditorGUILayout.PropertyField(mPathing);
+ if (mPathing.boolValue)
+ {
+ EditorGUILayout.PropertyField(mPathingProbeBatch);
+ EditorGUILayout.PropertyField(mPathValidation);
+ EditorGUILayout.PropertyField(mFindAlternatePaths);
+
+ if (audioEngineIsUnity)
+ {
+ EditorGUILayout.PropertyField(mApplyHRTFToPathing);
+ EditorGUILayout.PropertyField(mPathingMixLevel);
+ EditorGUILayout.PropertyField(mNormalizePathingEQ);
+ }
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ }
+
+ void DrawDirectivity(float dipoleWeight, float dipolePower)
+ {
+ if (mDirectivityPreview == null)
+ {
+ mDirectivityPreview = new Texture2D(65, 65);
+ }
+
+ if (mDirectivitySamples == null)
+ {
+ mDirectivitySamples = new float[360];
+ mDirectivityPositions = new Vector2[360];
+ }
+
+ for (var i = 0; i < mDirectivitySamples.Length; ++i)
+ {
+ var theta = (i / 360.0f) * (2.0f * Mathf.PI);
+ mDirectivitySamples[i] = Mathf.Pow(Mathf.Abs((1.0f - dipoleWeight) + dipoleWeight * Mathf.Cos(theta)), dipolePower);
+
+ var r = 31 * Mathf.Abs(mDirectivitySamples[i]);
+ var x = r * Mathf.Cos(theta) + 32;
+ var y = r * Mathf.Sin(theta) + 32;
+ mDirectivityPositions[i] = new Vector2(-y, x);
+ }
+
+ for (var v = 0; v < mDirectivityPreview.height; ++v)
+ {
+ for (var u = 0; u < mDirectivityPreview.width; ++u)
+ {
+ mDirectivityPreview.SetPixel(u, v, Color.gray);
+ }
+ }
+
+ for (var u = 0; u < mDirectivityPreview.width; ++u)
+ {
+ mDirectivityPreview.SetPixel(u, 32, Color.black);
+ }
+
+ for (var v = 0; v < mDirectivityPreview.height; ++v)
+ {
+ mDirectivityPreview.SetPixel(32, v, Color.black);
+ }
+
+ for (var i = 0; i < mDirectivitySamples.Length; ++i)
+ {
+ var color = (mDirectivitySamples[i] > 0.0f) ? Color.red : Color.blue;
+ mDirectivityPreview.SetPixel((int) mDirectivityPositions[i].x, (int) mDirectivityPositions[i].y, color);
+ }
+
+ mDirectivityPreview.Apply();
+
+ EditorGUILayout.PrefixLabel("Preview");
+ EditorGUILayout.Space();
+ var rect = EditorGUI.IndentedRect(EditorGUILayout.GetControlRect());
+ var center = rect.center;
+ center.x += 4;
+ rect.center = center;
+ rect.width = 65;
+ rect.height = 65;
+
+ EditorGUILayout.Space();
+ EditorGUILayout.Space();
+ EditorGUILayout.Space();
+ EditorGUILayout.Space();
+ EditorGUILayout.Space();
+ EditorGUILayout.Space();
+ EditorGUILayout.Space();
+ EditorGUILayout.Space();
+ EditorGUILayout.Space();
+
+ EditorGUI.DrawPreviewTexture(rect, mDirectivityPreview);
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSourceInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSourceInspector.cs.meta
new file mode 100644
index 00000000..69c6772d
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioSourceInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0a0b6df87f513414b805186eba677e7e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioStaticMeshInspector.cs b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioStaticMeshInspector.cs
new file mode 100644
index 00000000..e3370037
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioStaticMeshInspector.cs
@@ -0,0 +1,75 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using UnityEditor;
+
+namespace SteamAudio
+{
+ [CustomEditor(typeof(SteamAudioStaticMesh))]
+ public class SteamAudioStaticMeshInspector : Editor
+ {
+#if STEAMAUDIO_ENABLED
+ SerializedProperty mAsset;
+ SerializedProperty mSceneNameWhenExported;
+
+ void OnEnable()
+ {
+ mAsset = serializedObject.FindProperty("asset");
+ mSceneNameWhenExported = serializedObject.FindProperty("sceneNameWhenExported");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ serializedObject.Update();
+
+ EditorGUILayout.PropertyField(mAsset);
+
+ var scene = (target as SteamAudioStaticMesh).gameObject.scene;
+
+ if (mAsset.objectReferenceValue == null)
+ {
+ EditorGUILayout.HelpBox(
+ "This scene has not been exported. Click Steam Audio > Export Active Scene to export.",
+ MessageType.Warning);
+ }
+ else if (mSceneNameWhenExported.stringValue != scene.name)
+ {
+ EditorGUILayout.HelpBox(
+ string.Format("This geometry was last exported for the scene {0}. If this is not what you " +
+ "intended, click Export As New Asset below.", mSceneNameWhenExported.stringValue),
+ MessageType.Warning);
+
+ if (GUILayout.Button("Export As New Asset"))
+ {
+ mAsset.objectReferenceValue = SerializedData.PromptForNewAsset(scene.name);
+ mSceneNameWhenExported.stringValue = scene.name;
+ serializedObject.ApplyModifiedProperties();
+
+ SteamAudioManager.ExportScene(scene, false);
+ }
+ }
+
+ serializedObject.ApplyModifiedProperties();
+ }
+#else
+ public override void OnInspectorGUI()
+ {
+ EditorGUILayout.HelpBox("Steam Audio is not supported for the target platform or STEAMAUDIO_ENABLED define symbol is missing.", MessageType.Warning);
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioStaticMeshInspector.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioStaticMeshInspector.cs.meta
new file mode 100644
index 00000000..97fe23ad
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioStaticMeshInspector.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d6929999ad3f3e54196cfa59c3181b95
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioUnityEditor.asmdef b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioUnityEditor.asmdef
new file mode 100644
index 00000000..511d057c
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioUnityEditor.asmdef
@@ -0,0 +1,17 @@
+{
+ "name": "SteamAudioUnityEditor",
+ "references": [
+ "SteamAudioUnity"
+ ],
+ "includePlatforms": [
+ "Editor"
+ ],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": true,
+ "defineConstraints": [],
+ "versionDefines": [],
+ "noEngineReferences": false
+}
\ No newline at end of file
diff --git a/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioUnityEditor.asmdef.meta b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioUnityEditor.asmdef.meta
new file mode 100644
index 00000000..56546521
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Editor/SteamAudioUnityEditor.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 32059f5c68d213f49892e59f10b1a065
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/FMODStudio.meta b/Assets/Plugins/SteamAudio/Scripts/FMODStudio.meta
new file mode 100644
index 00000000..085a7ec2
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/FMODStudio.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 20586a1d2ca3420408a9c3c4fc338e09
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineSource.cs b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineSource.cs
new file mode 100644
index 00000000..58922565
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineSource.cs
@@ -0,0 +1,128 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using System.Reflection;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public sealed class FMODStudioAudioEngineSource : AudioEngineSource
+ {
+ bool mFoundDSP = false;
+ FMODUnity.StudioEventEmitter mEventEmitter = null;
+ FMOD.Studio.EventInstance mEventInstance;
+ FMOD.DSP mDSP;
+ SteamAudioSource mSteamAudioSource = null;
+ int mHandle = -1;
+
+ const int kSimulationOutputsParamIndex = 33;
+
+ public override void Initialize(GameObject gameObject)
+ {
+ FindDSP(gameObject);
+
+ mSteamAudioSource = gameObject.GetComponent();
+ if (mSteamAudioSource)
+ {
+ mHandle = FMODStudioAPI.iplFMODAddSource(mSteamAudioSource.GetSource().Get());
+ }
+ }
+
+ public override void Destroy()
+ {
+ mFoundDSP = false;
+
+ if (mSteamAudioSource)
+ {
+ FMODStudioAPI.iplFMODRemoveSource(mHandle);
+ }
+ }
+
+ public override void UpdateParameters(SteamAudioSource source)
+ {
+ CheckForChangedEventInstance();
+
+ FindDSP(source.gameObject);
+ if (!mFoundDSP)
+ return;
+
+ mDSP.setParameterInt(kSimulationOutputsParamIndex, mHandle);
+ }
+
+ void CheckForChangedEventInstance()
+ {
+ if (mEventEmitter != null)
+ {
+ var eventInstance = mEventEmitter.EventInstance;
+ if (!eventInstance.Equals(mEventInstance))
+ {
+ // The event instance is different from the one we last used, which most likely means the
+ // event-related objects were destroyed and re-created. Make sure we look for the DSP instance
+ // when FindDSP is called next.
+ mFoundDSP = false;
+ }
+ }
+ else
+ {
+ // We haven't yet seen a valid event emitter component, so make sure we look for one when
+ // FindDSP is called.
+ mFoundDSP = false;
+ }
+ }
+
+ void FindDSP(GameObject gameObject)
+ {
+ if (mFoundDSP)
+ return;
+
+ mEventEmitter = gameObject.GetComponent();
+ if (mEventEmitter == null)
+ return;
+
+ mEventInstance = mEventEmitter.EventInstance;
+ if (!mEventInstance.isValid())
+ return;
+
+ FMOD.ChannelGroup channelGroup;
+ mEventInstance.getChannelGroup(out channelGroup);
+
+ int numDSPs;
+ channelGroup.getNumDSPs(out numDSPs);
+
+ for (var i = 0; i < numDSPs; ++i)
+ {
+ channelGroup.getDSP(i, out mDSP);
+
+ var dspName = "";
+ var dspVersion = 0u;
+ var dspNumChannels = 0;
+ var dspConfigWidth = 0;
+ var dspConfigHeight = 0;
+ mDSP.getInfo(out dspName, out dspVersion, out dspNumChannels, out dspConfigWidth, out dspConfigHeight);
+
+ if (dspName == "Steam Audio Spatializer")
+ {
+ mFoundDSP = true;
+ return;
+ }
+ }
+ }
+ }
+}
+
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineSource.cs.meta b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineSource.cs.meta
new file mode 100644
index 00000000..10152c1c
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineSource.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c36706fa5b924b94c8895e3051bdee14
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineState.cs b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineState.cs
new file mode 100644
index 00000000..aa5c09f2
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineState.cs
@@ -0,0 +1,85 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using System.Reflection;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public sealed class FMODStudioAudioEngineState : AudioEngineState
+ {
+ public override void Initialize(IntPtr context, IntPtr defaultHRTF, SimulationSettings simulationSettings, PerspectiveCorrection correction)
+ {
+ FMODStudioAPI.iplFMODInitialize(context);
+ FMODStudioAPI.iplFMODSetHRTF(defaultHRTF);
+ FMODStudioAPI.iplFMODSetSimulationSettings(simulationSettings);
+ }
+
+ public override void Destroy()
+ {
+ FMODStudioAPI.iplFMODTerminate();
+ }
+
+ public override void SetHRTF(IntPtr hrtf)
+ {
+ FMODStudioAPI.iplFMODSetHRTF(hrtf);
+ }
+
+ public override void SetReverbSource(Source reverbSource)
+ {
+ FMODStudioAPI.iplFMODSetReverbSource(reverbSource.Get());
+ }
+
+ public override void SetHRTFDisabled(bool disabled)
+ {
+ base.SetHRTFDisabled(disabled);
+
+ FMODStudioAPI.iplFMODSetHRTFDisabled(disabled);
+ }
+ }
+
+ public sealed class FMODStudioAudioEngineStateHelpers : AudioEngineStateHelpers
+ {
+ public override Transform GetListenerTransform()
+ {
+ var fmodStudioListener = (MonoBehaviour) GameObject.FindObjectOfType();
+ return (fmodStudioListener != null) ? fmodStudioListener.transform : null;
+ }
+
+ public override AudioSettings GetAudioSettings()
+ {
+ var audioSettings = new AudioSettings { };
+
+ int samplingRate = 0;
+ FMOD.SPEAKERMODE speakerMode = FMOD.SPEAKERMODE.DEFAULT;
+ int numRawSpeakers = 0;
+ FMODUnity.RuntimeManager.CoreSystem.getSoftwareFormat(out samplingRate, out speakerMode, out numRawSpeakers);
+
+ uint frameSize = 0u;
+ int numBuffers = 0;
+ FMODUnity.RuntimeManager.CoreSystem.getDSPBufferSize(out frameSize, out numBuffers);
+
+ audioSettings.samplingRate = samplingRate;
+ audioSettings.frameSize = (int) frameSize;
+
+ return audioSettings;
+ }
+ }
+}
+
+#endif
\ No newline at end of file
diff --git a/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineState.cs.meta b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineState.cs.meta
new file mode 100644
index 00000000..86b5ba6f
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/FMODStudioAudioEngineState.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f8e2075eab110ad4b88d26e434723035
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.asmdef b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.asmdef
new file mode 100644
index 00000000..090679fa
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.asmdef
@@ -0,0 +1,17 @@
+{
+ "name": "SteamAudioFMODStudio",
+ "rootNamespace": "",
+ "references": [
+ "GUID:558d81aa619cc114fbdab8165212bc9d",
+ "GUID:0c752da273b17c547ae705acf0f2adf2"
+ ],
+ "includePlatforms": [],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": true,
+ "defineConstraints": [],
+ "versionDefines": [],
+ "noEngineReferences": false
+}
\ No newline at end of file
diff --git a/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.asmdef.meta b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.asmdef.meta
new file mode 100644
index 00000000..1caf674a
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: f94a722c562013b4bb87a97a6a58fca0
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.cs b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.cs
new file mode 100644
index 00000000..19ac4ca5
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.cs
@@ -0,0 +1,83 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using System.Runtime.InteropServices;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public static class FMODStudioAPI
+ {
+ // FMOD STUDIO PLUGIN
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon_fmod")]
+#endif
+ public static extern void iplFMODInitialize(IntPtr context);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon_fmod")]
+#endif
+ public static extern void iplFMODSetHRTF(IntPtr hrtf);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon_fmod")]
+#endif
+ public static extern void iplFMODSetSimulationSettings(SimulationSettings simulationSettings);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon_fmod")]
+#endif
+ public static extern void iplFMODSetReverbSource(IntPtr reverbSource);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon_fmod")]
+#endif
+ public static extern void iplFMODTerminate();
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon_fmod")]
+#endif
+ public static extern int iplFMODAddSource(IntPtr source);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon_fmod")]
+#endif
+ public static extern void iplFMODRemoveSource(int handle);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon_fmod")]
+#endif
+ public static extern void iplFMODSetHRTFDisabled(bool disabled);
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.cs.meta b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.cs.meta
new file mode 100644
index 00000000..c7c259bb
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/FMODStudio/SteamAudioFMODStudio.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 910b4010d4f5f4c388938e56f9715f37
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime.meta
new file mode 100644
index 00000000..dd9fd689
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 07db90b46cddd3245b0baf1c24d8548e
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineAmbisonicSource.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineAmbisonicSource.cs
new file mode 100644
index 00000000..6f69edf9
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineAmbisonicSource.cs
@@ -0,0 +1,46 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public abstract class AudioEngineAmbisonicSource
+ {
+ public virtual void Initialize(GameObject gameObject)
+ { }
+
+ public virtual void Destroy()
+ { }
+
+ public virtual void UpdateParameters(SteamAudioAmbisonicSource ambisonicSource)
+ { }
+
+ public virtual void GetParameters(SteamAudioAmbisonicSource ambisonicSource)
+ { }
+
+ public static AudioEngineAmbisonicSource Create(AudioEngineType type)
+ {
+ switch (type)
+ {
+ case AudioEngineType.Unity:
+ return new UnityAudioEngineAmbisonicSource();
+ default:
+ return null;
+ }
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineAmbisonicSource.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineAmbisonicSource.cs.meta
new file mode 100644
index 00000000..c5765a28
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineAmbisonicSource.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bf3a8878920e660448a9f5dd6ff8589f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineSource.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineSource.cs
new file mode 100644
index 00000000..24e7c323
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineSource.cs
@@ -0,0 +1,69 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public abstract class AudioEngineSource
+ {
+ public virtual void Initialize(GameObject gameObject)
+ { }
+
+ public virtual void Destroy()
+ { }
+
+ public virtual void UpdateParameters(SteamAudioSource source)
+ { }
+
+ public virtual void GetParameters(SteamAudioSource source)
+ { }
+
+ public static AudioEngineSource Create(AudioEngineType type)
+ {
+ switch (type)
+ {
+ case AudioEngineType.Unity:
+ return new UnityAudioEngineSource();
+ case AudioEngineType.FMODStudio:
+ return CreateFMODStudioAudioEngineSource();
+ case AudioEngineType.Wwise:
+ return CreateWwiseAudioEngineSource();
+ default:
+ return null;
+ }
+ }
+
+ private static AudioEngineSource CreateFMODStudioAudioEngineSource()
+ {
+ var type = Type.GetType("SteamAudio.FMODStudioAudioEngineSource,SteamAudioFMODStudio");
+ return (type != null) ? (AudioEngineSource) Activator.CreateInstance(type) : null;
+ }
+
+ private static AudioEngineSource CreateWwiseAudioEngineSource()
+ {
+ var type = Type.GetType("SteamAudio.WwiseAudioEngineSource,SteamAudioWwiseUnity");
+ if (type == null)
+ return null;
+
+ return (AudioEngineSource) Activator.CreateInstance(type);
+ }
+ }
+}
+
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineSource.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineSource.cs.meta
new file mode 100644
index 00000000..2f472354
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineSource.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bf1484b65484cc846b06a489d54195a2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineState.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineState.cs
new file mode 100644
index 00000000..2229492b
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineState.cs
@@ -0,0 +1,112 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public abstract class AudioEngineState
+ {
+ public virtual void Initialize(IntPtr context, IntPtr defaultHRTF, SimulationSettings simulationSettings, PerspectiveCorrection correction)
+ { }
+
+ public virtual void Destroy()
+ { }
+
+ public virtual void SetHRTF(IntPtr hrtf)
+ { }
+
+ public virtual void SetPerspectiveCorrection(PerspectiveCorrection correction)
+ { }
+
+ public virtual void SetReverbSource(Source reverbSource)
+ { }
+
+ public static AudioEngineState Create(AudioEngineType type)
+ {
+ switch (type)
+ {
+ case AudioEngineType.Unity:
+ return new UnityAudioEngineState();
+ case AudioEngineType.FMODStudio:
+ return CreateFMODStudioAudioEngineState();
+ case AudioEngineType.Wwise:
+ return CreateWwiseAudioEngineState();
+ default:
+ return null;
+ }
+ }
+
+ private static AudioEngineState CreateFMODStudioAudioEngineState()
+ {
+ var type = Type.GetType("SteamAudio.FMODStudioAudioEngineState,SteamAudioFMODStudio");
+ return (type != null) ? (AudioEngineState) Activator.CreateInstance(type) : null;
+ }
+
+ private static AudioEngineState CreateWwiseAudioEngineState()
+ {
+ var type = Type.GetType("SteamAudio.WwiseAudioEngineState,SteamAudioWwiseUnity");
+ if (type == null)
+ return null;
+
+ return (AudioEngineState) Activator.CreateInstance(type);
+ }
+
+ public virtual void SetHRTFDisabled(bool disabled)
+ { }
+ }
+
+ public abstract class AudioEngineStateHelpers
+ {
+ public abstract Transform GetListenerTransform();
+
+ public abstract SteamAudio.AudioSettings GetAudioSettings();
+
+ public static AudioEngineStateHelpers Create(AudioEngineType type)
+ {
+ switch (type)
+ {
+ case AudioEngineType.Unity:
+ return new UnityAudioEngineStateHelpers();
+ case AudioEngineType.FMODStudio:
+ return CreateFMODStudioAudioEngineStateHelpers();
+ case AudioEngineType.Wwise:
+ return CreateWwiseAudioEngineStateHelpers();
+ default:
+ return null;
+ }
+ }
+
+ private static AudioEngineStateHelpers CreateFMODStudioAudioEngineStateHelpers()
+ {
+ var type = Type.GetType("SteamAudio.FMODStudioAudioEngineStateHelpers,SteamAudioFMODStudio");
+ return (type != null) ? (AudioEngineStateHelpers) Activator.CreateInstance(type) : null;
+ }
+
+ private static AudioEngineStateHelpers CreateWwiseAudioEngineStateHelpers()
+ {
+ var type = Type.GetType("SteamAudio.WwiseAudioEngineStateHelpers,SteamAudioWwiseUnity");
+ if (type == null)
+ return null;
+
+ return (AudioEngineStateHelpers) Activator.CreateInstance(type);
+ }
+ }
+}
+
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineState.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineState.cs.meta
new file mode 100644
index 00000000..328103f4
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/AudioEngineState.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 82bc9a6ff2f97254787d9f40d71ae2e0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/Baker.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/Baker.cs
new file mode 100644
index 00000000..5971146a
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/Baker.cs
@@ -0,0 +1,528 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using AOT;
+using System;
+using System.Runtime.InteropServices;
+using System.Threading;
+using UnityEngine;
+using UnityEngine.SceneManagement;
+#if UNITY_EDITOR
+using UnityEditor;
+using UnityEditor.SceneManagement;
+#endif
+
+namespace SteamAudio
+{
+ public enum BakeStatus
+ {
+ Ready,
+ InProgress,
+ Complete
+ }
+
+ public struct BakedDataTask
+ {
+ public GameObject gameObject;
+ public MonoBehaviour component;
+ public string name;
+ public BakedDataIdentifier identifier;
+ public SteamAudioProbeBatch[] probeBatches;
+ public string[] probeBatchNames;
+ public SerializedData[] probeBatchAssets;
+ public SteamAudioReverbDataPoint probe;
+ public UnityEngine.Vector3 probePosition;
+ }
+
+ public static class Baker
+ {
+ static BakeStatus sStatus = BakeStatus.Ready;
+#if UNITY_EDITOR
+ static float sProgress = 0.0f;
+ static int sProgressId = -1;
+ static bool sShowModalProgressBar = false;
+#endif
+ static ProgressCallback sProgressCallback = null;
+ static IntPtr sProgressCallbackPointer = IntPtr.Zero;
+ static GCHandle sProgressCallbackHandle;
+ static Thread sThread;
+
+ static int sNumSubTasks = 0;
+ static int sNumSubTasksCompleted = 0;
+
+ static bool sCancel = false;
+ static BakedDataTask[] sTasks = null;
+
+ public static void BeginBake(BakedDataTask[] tasks, bool showModalProgressBar = false)
+ {
+ SteamAudioManager.Initialize(ManagerInitReason.Baking);
+
+ if (SteamAudioManager.GetSceneType() == SceneType.Custom)
+ {
+ Debug.LogError("Baking is not supported when using Unity's built-in ray tracer. Click Steam Audio > Settings and switch to a different ray tracer.");
+ return;
+ }
+
+ SteamAudioManager.LoadScene(SceneManager.GetActiveScene(), SteamAudioManager.Context, false);
+
+ SteamAudioStaticMesh staticMeshComponent = null;
+ var rootObjects = SceneManager.GetActiveScene().GetRootGameObjects();
+ foreach (var rootObject in rootObjects)
+ {
+ staticMeshComponent = rootObject.GetComponentInChildren();
+ if (staticMeshComponent)
+ break;
+ }
+
+ if (staticMeshComponent == null || staticMeshComponent.asset == null)
+ {
+ Debug.LogError(string.Format("Scene {0} has not been exported. Click Steam Audio > Export Active Scene to do so.", SceneManager.GetActiveScene().name));
+ return;
+ }
+
+ var staticMesh = new StaticMesh(SteamAudioManager.Context, SteamAudioManager.CurrentScene, staticMeshComponent.asset);
+ staticMesh.AddToScene(SteamAudioManager.CurrentScene);
+
+ SteamAudioManager.CurrentScene.Commit();
+
+ staticMesh.Release();
+
+ sTasks = tasks;
+ sStatus = BakeStatus.InProgress;
+
+ sProgressCallback = new ProgressCallback(AdvanceProgress);
+
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ sProgressCallbackPointer = Marshal.GetFunctionPointerForDelegate(sProgressCallback);
+ sProgressCallbackHandle = GCHandle.Alloc(sProgressCallbackPointer);
+ GC.Collect();
+#endif
+
+#if UNITY_EDITOR
+ EditorApplication.update += InEditorUpdate;
+#endif
+
+#if UNITY_EDITOR
+ sShowModalProgressBar = showModalProgressBar;
+ sProgressId = Progress.Start("Baking");
+#endif
+
+ sThread = new Thread(BakeThread);
+ sThread.Start();
+ }
+
+ public static void EndBake()
+ {
+ if (sThread != null)
+ {
+ sThread.Join();
+ }
+
+ SerializedObject.FlushAllWrites();
+ SteamAudioReverbDataPoint.FlushAllWrites();
+#if UNITY_EDITOR
+ UnityEditor.AssetDatabase.SaveAssets();
+ UnityEditor.AssetDatabase.Refresh();
+#endif
+
+#if (UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
+ if (sProgressCallbackHandle.IsAllocated)
+ {
+ sProgressCallbackHandle.Free();
+ }
+#endif
+
+ SteamAudioManager.ShutDown();
+ UnityEngine.Object.DestroyImmediate(SteamAudioManager.Singleton.gameObject);
+
+#if UNITY_EDITOR
+ sProgress = 0.0f;
+#endif
+ sNumSubTasks = 0;
+ sNumSubTasksCompleted = 0;
+
+ sStatus = BakeStatus.Ready;
+
+#if UNITY_EDITOR
+ EditorApplication.update -= InEditorUpdate;
+#endif
+
+#if UNITY_EDITOR
+ Progress.Remove(sProgressId);
+ sShowModalProgressBar = false;
+#endif
+ }
+
+ public static bool IsBakeActive()
+ {
+ return (sStatus != BakeStatus.Ready);
+ }
+
+ public static bool DrawProgressBar()
+ {
+#if UNITY_EDITOR
+ if (sStatus != BakeStatus.InProgress)
+ return false;
+
+ var progress = Progress.GetProgress(sProgressId);
+ var description = Progress.GetDescription(sProgressId);
+ EditorGUI.ProgressBar(EditorGUILayout.GetControlRect(), progress, description);
+ if (GUILayout.Button("Cancel"))
+ {
+ CancelBake();
+ return false;
+ }
+#endif
+ return true;
+ }
+
+ static void UpdateBakeProgress(int taskIndex, int numTasks, string taskName, int subTaskIndex = 0, int numSubTasks = 1, string subTaskName = null)
+ {
+#if UNITY_EDITOR
+ var progress = ((sNumSubTasksCompleted + sProgress) / Mathf.Max(sNumSubTasks, 1)) + .01f; // Adding an offset because progress bar when it is exact 0 has some non-zero progress.
+
+ var progressString = string.Format("Task {0} / {1} [{2}]", taskIndex + 1, numTasks, taskName);
+ if (subTaskName != null)
+ {
+ progressString += string.Format(", Probe Batch {0} / {1} [{2}]", subTaskIndex + 1, numSubTasks, subTaskName);
+ }
+
+ var progressPercent = Mathf.FloorToInt(Mathf.Min(progress * 100.0f, 100.0f));
+ progressString += string.Format(" ({0}% complete)", progressPercent);
+
+ Progress.Report(sProgressId, progress, progressString);
+#endif
+ }
+
+ public static void CancelBake()
+ {
+ // Ensures partial baked data is not serialized and that bake is properly canceled for multiple
+ // probe boxes.
+ sCancel = true;
+ API.iplReflectionsBakerCancelBake(SteamAudioManager.Context.Get());
+#if UNITY_EDITOR
+ EditorUtility.ClearProgressBar();
+#endif
+ EndBake();
+ sCancel = false;
+ }
+
+ [MonoPInvokeCallback(typeof(ProgressCallback))]
+ static void AdvanceProgress(float progress, IntPtr userData)
+ {
+#if UNITY_EDITOR
+ sProgress = progress;
+#endif
+ }
+
+ static void InEditorUpdate()
+ {
+#if UNITY_EDITOR
+ if (sShowModalProgressBar && sProgressId >= 0)
+ {
+ var progress = Progress.GetProgress(sProgressId);
+ var description = Progress.GetDescription(sProgressId);
+ if (EditorUtility.DisplayCancelableProgressBar("Baking", description, progress))
+ {
+ CancelBake();
+ return;
+ }
+ }
+
+ if (sStatus == BakeStatus.Complete)
+ {
+ EditorUtility.ClearProgressBar();
+ EndBake();
+ EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
+ }
+#endif
+ }
+
+ static void BakeThread()
+ {
+ sNumSubTasks = 0;
+ sNumSubTasksCompleted = 0;
+ for (var i = 0; i < sTasks.Length; i++)
+ {
+ if (sTasks[i].probeBatches != null)
+ {
+ sNumSubTasks += sTasks[i].probeBatches.Length;
+ }
+ else
+ {
+ sNumSubTasks++;
+ }
+ }
+
+ for (var i = 0; i < sTasks.Length; ++i)
+ {
+ var taskName = "";
+ if (sTasks[i].identifier.type == BakedDataType.Pathing)
+ {
+ taskName = string.Format("{0} (Pathing)", sTasks[i].name);
+ }
+ else if (sTasks[i].identifier.variation == BakedDataVariation.Reverb)
+ {
+ taskName = string.Format("{0} (Reverb)", sTasks[i].name);
+ }
+ else
+ {
+ taskName = string.Format("{0} (Reflections)", sTasks[i].name);
+ }
+
+ Debug.Log(string.Format("START: Baking effect for {0}.", taskName));
+
+ if (sTasks[i].probeBatches != null)
+ {
+ var probeBatches = sTasks[i].probeBatches;
+
+ for (var j = 0; j < probeBatches.Length; ++j)
+ {
+ if (sCancel)
+ return;
+
+ if (probeBatches[j] == null)
+ {
+ Debug.LogWarning(string.Format("{0}: Probe Batch at index {1} is null, skipping.", taskName, j));
+ continue;
+ }
+
+ if (probeBatches[j].GetNumProbes() == 0)
+ {
+ Debug.LogWarning(string.Format("{0}: Probe Batch {1} has no probes, skipping.", taskName, sTasks[i].probeBatchNames[j]));
+ continue;
+ }
+
+ var probeBatch = new ProbeBatch(SteamAudioManager.Context, sTasks[i].probeBatchAssets[j]);
+
+ var simulationSettings = SteamAudioManager.GetSimulationSettings(true);
+
+ if (sTasks[i].identifier.type == BakedDataType.Reflections)
+ {
+ var bakeParams = new ReflectionsBakeParams { };
+ bakeParams.scene = SteamAudioManager.CurrentScene.Get();
+ bakeParams.probeBatch = probeBatch.Get();
+ bakeParams.sceneType = simulationSettings.sceneType;
+ bakeParams.identifier = sTasks[i].identifier;
+ bakeParams.flags = 0;
+ bakeParams.numRays = simulationSettings.maxNumRays;
+ bakeParams.numDiffuseSamples = simulationSettings.numDiffuseSamples;
+ bakeParams.numBounces = SteamAudioSettings.Singleton.bakingBounces;
+ bakeParams.simulatedDuration = simulationSettings.maxDuration;
+ bakeParams.savedDuration = simulationSettings.maxDuration;
+ bakeParams.order = simulationSettings.maxOrder;
+ bakeParams.numThreads = simulationSettings.numThreads;
+ bakeParams.rayBatchSize = simulationSettings.rayBatchSize;
+ bakeParams.irradianceMinDistance = SteamAudioSettings.Singleton.bakingIrradianceMinDistance;
+ bakeParams.bakeBatchSize = 1;
+
+ if (SteamAudioSettings.Singleton.bakeConvolution)
+ bakeParams.flags = bakeParams.flags | ReflectionsBakeFlags.BakeConvolution;
+
+ if (SteamAudioSettings.Singleton.bakeParametric)
+ bakeParams.flags = bakeParams.flags | ReflectionsBakeFlags.BakeParametric;
+
+ if (simulationSettings.sceneType == SceneType.RadeonRays)
+ {
+ bakeParams.openCLDevice = SteamAudioManager.OpenCLDevice;
+ bakeParams.radeonRaysDevice = SteamAudioManager.RadeonRaysDevice;
+ bakeParams.bakeBatchSize = SteamAudioSettings.Singleton.bakingBatchSize;
+ }
+
+ API.iplReflectionsBakerBake(SteamAudioManager.Context.Get(), ref bakeParams, sProgressCallback, IntPtr.Zero);
+ }
+ else
+ {
+ var bakeParams = new PathBakeParams { };
+ bakeParams.scene = SteamAudioManager.CurrentScene.Get();
+ bakeParams.probeBatch = probeBatch.Get();
+ bakeParams.identifier = sTasks[i].identifier;
+ bakeParams.numSamples = SteamAudioSettings.Singleton.bakingVisibilitySamples;
+ bakeParams.radius = SteamAudioSettings.Singleton.bakingVisibilityRadius;
+ bakeParams.threshold = SteamAudioSettings.Singleton.bakingVisibilityThreshold;
+ bakeParams.visRange = SteamAudioSettings.Singleton.bakingVisibilityRange;
+ bakeParams.pathRange = SteamAudioSettings.Singleton.bakingPathRange;
+ bakeParams.numThreads = SteamAudioManager.Singleton.NumThreadsForCPUCorePercentage(SteamAudioSettings.Singleton.bakedPathingCPUCoresPercentage);
+
+ API.iplPathBakerBake(SteamAudioManager.Context.Get(), ref bakeParams, sProgressCallback, IntPtr.Zero);
+ }
+
+ if (sCancel)
+ {
+ Debug.Log("CANCELLED: Baking.");
+ return;
+ }
+
+ // Don't flush the writes to disk just yet, because we can only do it from the main thread.
+ probeBatches[j].probeDataSize = probeBatch.Save(sTasks[i].probeBatchAssets[j], false);
+
+ var dataSize = (int)probeBatch.GetDataSize(sTasks[i].identifier);
+ probeBatches[j].AddOrUpdateLayer(sTasks[i].gameObject, sTasks[i].identifier, dataSize);
+
+ if (sTasks[i].identifier.type == BakedDataType.Reflections)
+ {
+ switch (sTasks[i].identifier.variation)
+ {
+ case BakedDataVariation.Reverb:
+ (sTasks[i].component as SteamAudioListener).UpdateBakedDataStatistics();
+ break;
+
+ case BakedDataVariation.StaticSource:
+ (sTasks[i].component as SteamAudioBakedSource).UpdateBakedDataStatistics();
+ break;
+
+ case BakedDataVariation.StaticListener:
+ (sTasks[i].component as SteamAudioBakedListener).UpdateBakedDataStatistics();
+ break;
+ }
+ }
+
+ sNumSubTasksCompleted++;
+ UpdateBakeProgress(i, sTasks.Length, taskName, j, sTasks[i].probeBatches.Length, sTasks[i].probeBatchNames[j]);
+ }
+ }
+
+ if (sTasks[i].probe != null)
+ {
+ var probe = sTasks[i].probe;
+ var probePosition = sTasks[i].probePosition;
+
+ if (sCancel)
+ return;
+
+ var probeBatch = new ProbeBatch(SteamAudioManager.Context);
+ SteamAudio.Sphere sphere = new SteamAudio.Sphere { center = Common.ConvertVector(probePosition), radius = 10.0f };
+ probeBatch.AddProbe(sphere);
+ probeBatch.Commit();
+
+ var simulationSettings = SteamAudioManager.GetSimulationSettings(true);
+ simulationSettings.maxDuration = probe.reverbDuration;
+ simulationSettings.maxOrder = probe.ambisonicOrder;
+
+ if (sTasks[i].identifier.type == BakedDataType.Reflections)
+ {
+ var bakeParams = new ReflectionsBakeParams { };
+ bakeParams.scene = SteamAudioManager.CurrentScene.Get();
+ bakeParams.probeBatch = probeBatch.Get();
+ bakeParams.sceneType = simulationSettings.sceneType;
+ bakeParams.identifier = sTasks[i].identifier;
+ bakeParams.flags = 0;
+ bakeParams.numRays = simulationSettings.maxNumRays;
+ bakeParams.numDiffuseSamples = simulationSettings.numDiffuseSamples;
+ bakeParams.numBounces = SteamAudioSettings.Singleton.bakingBounces;
+ bakeParams.simulatedDuration = simulationSettings.maxDuration;
+ bakeParams.savedDuration = simulationSettings.maxDuration;
+ bakeParams.order = simulationSettings.maxOrder;
+ bakeParams.numThreads = simulationSettings.numThreads;
+ bakeParams.rayBatchSize = simulationSettings.rayBatchSize;
+ bakeParams.irradianceMinDistance = SteamAudioSettings.Singleton.bakingIrradianceMinDistance;
+ bakeParams.bakeBatchSize = 1;
+
+ bakeParams.flags = bakeParams.flags | ReflectionsBakeFlags.BakeConvolution;
+ bakeParams.flags = bakeParams.flags | ReflectionsBakeFlags.BakeParametric;
+
+ if (simulationSettings.sceneType == SceneType.RadeonRays)
+ {
+ bakeParams.openCLDevice = SteamAudioManager.OpenCLDevice;
+ bakeParams.radeonRaysDevice = SteamAudioManager.RadeonRaysDevice;
+ bakeParams.bakeBatchSize = SteamAudioSettings.Singleton.bakingBatchSize;
+ }
+
+ API.iplReflectionsBakerBake(SteamAudioManager.Context.Get(), ref bakeParams, sProgressCallback, IntPtr.Zero);
+
+ if (probe.reverbData.reverbTimes.Length != 3)
+ {
+ probe.reverbData.reverbTimes = new float[3];
+ probe.reverbData.reverbTimes[0] = .0f;
+ probe.reverbData.reverbTimes[1] = .0f;
+ probe.reverbData.reverbTimes[2] = .0f;
+ }
+
+ // Get Energy Field and Impulse Response
+ {
+ // Energy Field
+ EnergyFieldSettings energyFieldSettings;
+ energyFieldSettings.duration = bakeParams.savedDuration;
+ energyFieldSettings.order = bakeParams.order;
+
+ IntPtr energyField;
+ API.iplEnergyFieldCreate(SteamAudioManager.Context.Get(), ref energyFieldSettings, out energyField);
+
+ API.iplProbeBatchGetEnergyField(probeBatch.Get(), ref sTasks[i].identifier, 0, energyField);
+ API.iplProbeBatchGetReverb(probeBatch.Get(), ref sTasks[i].identifier, 0, probe.reverbData.reverbTimes);
+ probe.UpdateEnergyField(energyField);
+
+ // Create Reconstructor
+ ReconstructorSettings reconstructorSettings;
+ reconstructorSettings.maxDuration = bakeParams.savedDuration;
+ reconstructorSettings.maxOrder = bakeParams.order;
+ reconstructorSettings.samplingRate = probe.sampleRate;
+
+ IntPtr irConstructor;
+ API.iplReconstructorCreate(SteamAudioManager.Context.Get(), ref reconstructorSettings, out irConstructor);
+
+ // Create Impulse Response
+ ImpulseResponseSettings irSettings;
+ irSettings.duration = bakeParams.savedDuration;
+ irSettings.order = bakeParams.order;
+ irSettings.samplingRate = probe.sampleRate;
+
+ IntPtr ir;
+ API.iplImpulseResponseCreate(SteamAudioManager.Context.Get(), ref irSettings, out ir);
+
+ // Reconstruct Impulse Response
+ ReconstructorInputs reconstructorInputs;
+ reconstructorInputs.energyField = energyField;
+
+ ReconstructorSharedInputs reconstructorSharedInputs;
+ reconstructorSharedInputs.duration = bakeParams.savedDuration;
+ reconstructorSharedInputs.order = bakeParams.order;
+
+ ReconstructorOutputs reconstructorOutputs;
+ reconstructorOutputs.impulseResponse = ir;
+
+ API.iplReconstructorReconstruct(irConstructor, 1, ref reconstructorInputs, ref reconstructorSharedInputs, ref reconstructorOutputs);
+ probe.UpdateImpulseResponse(ir);
+
+ API.iplImpulseResponseRelease(ref ir);
+ API.iplReconstructorRelease(ref irConstructor);
+ API.iplEnergyFieldRelease(ref energyField);
+ probe.WriteReverbDataToFile(flush: false);
+ }
+
+ probeBatch.Release();
+ }
+
+ if (sCancel)
+ {
+ Debug.Log("CANCELLED: Baking.");
+ return;
+ }
+
+ sNumSubTasksCompleted++;
+ UpdateBakeProgress(i, sTasks.Length, taskName);
+ }
+
+ Debug.Log(string.Format("COMPLETED: Baking effect for {0}.", taskName));
+ }
+
+ sStatus = BakeStatus.Complete;
+ }
+ }
+}
+
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/Baker.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/Baker.cs.meta
new file mode 100644
index 00000000..e3adeb56
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/Baker.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 73a54b25ac58b5f499dae7062adb0e1f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/Common.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/Common.cs
new file mode 100644
index 00000000..8eff72d0
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/Common.cs
@@ -0,0 +1,188 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using System.IO;
+using System.Text;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public static class Common
+ {
+ public static Vector3 ConvertVector(UnityEngine.Vector3 point)
+ {
+ Vector3 convertedPoint;
+ convertedPoint.x = point.x;
+ convertedPoint.y = point.y;
+ convertedPoint.z = -point.z;
+
+ return convertedPoint;
+ }
+
+ public static UnityEngine.Vector3 ConvertVector(Vector3 point)
+ {
+ UnityEngine.Vector3 convertedPoint;
+ convertedPoint.x = point.x;
+ convertedPoint.y = point.y;
+ convertedPoint.z = -point.z;
+
+ return convertedPoint;
+ }
+
+ public static Matrix4x4 ConvertTransform(Transform transform)
+ {
+ UnityEngine.Matrix4x4 flipZ = UnityEngine.Matrix4x4.Scale(new UnityEngine.Vector3(1, 1, -1));
+ UnityEngine.Matrix4x4 flippedMatrix = flipZ * transform.localToWorldMatrix * flipZ;
+
+ var matrix = new Matrix4x4();
+ matrix.m00 = flippedMatrix.m00;
+ matrix.m01 = flippedMatrix.m01;
+ matrix.m02 = flippedMatrix.m02;
+ matrix.m03 = flippedMatrix.m03;
+ matrix.m10 = flippedMatrix.m10;
+ matrix.m11 = flippedMatrix.m11;
+ matrix.m12 = flippedMatrix.m12;
+ matrix.m13 = flippedMatrix.m13;
+ matrix.m20 = flippedMatrix.m20;
+ matrix.m21 = flippedMatrix.m21;
+ matrix.m22 = flippedMatrix.m22;
+ matrix.m23 = flippedMatrix.m23;
+ matrix.m30 = flippedMatrix.m30;
+ matrix.m31 = flippedMatrix.m31;
+ matrix.m32 = flippedMatrix.m32;
+ matrix.m33 = flippedMatrix.m33;
+
+ return matrix;
+ }
+
+ public static Matrix4x4 TransposeMatrix(Matrix4x4 inMatrix)
+ {
+ var outMatrix = new Matrix4x4();
+
+ outMatrix.m00 = inMatrix.m00;
+ outMatrix.m01 = inMatrix.m10;
+ outMatrix.m02 = inMatrix.m20;
+ outMatrix.m03 = inMatrix.m30;
+ outMatrix.m10 = inMatrix.m01;
+ outMatrix.m11 = inMatrix.m11;
+ outMatrix.m12 = inMatrix.m21;
+ outMatrix.m13 = inMatrix.m31;
+ outMatrix.m20 = inMatrix.m02;
+ outMatrix.m21 = inMatrix.m12;
+ outMatrix.m22 = inMatrix.m22;
+ outMatrix.m23 = inMatrix.m32;
+ outMatrix.m30 = inMatrix.m03;
+ outMatrix.m31 = inMatrix.m13;
+ outMatrix.m32 = inMatrix.m23;
+ outMatrix.m33 = inMatrix.m33;
+
+ return outMatrix;
+ }
+
+ public static Matrix4x4 TransformMatrix(UnityEngine.Matrix4x4 inMatrix)
+ {
+ var outMatrix = new Matrix4x4();
+
+ outMatrix.m00 = inMatrix.m00;
+ outMatrix.m01 = inMatrix.m01;
+ outMatrix.m02 = inMatrix.m02;
+ outMatrix.m03 = inMatrix.m03;
+ outMatrix.m10 = inMatrix.m10;
+ outMatrix.m11 = inMatrix.m11;
+ outMatrix.m12 = inMatrix.m12;
+ outMatrix.m13 = inMatrix.m13;
+ outMatrix.m20 = inMatrix.m20;
+ outMatrix.m21 = inMatrix.m21;
+ outMatrix.m22 = inMatrix.m22;
+ outMatrix.m23 = inMatrix.m23;
+ outMatrix.m30 = inMatrix.m30;
+ outMatrix.m31 = inMatrix.m31;
+ outMatrix.m32 = inMatrix.m32;
+ outMatrix.m33 = inMatrix.m33;
+
+ return outMatrix;
+ }
+
+ public static byte[] ConvertString(string s)
+ {
+ return Encoding.UTF8.GetBytes(s + Char.MinValue);
+ }
+
+ public static string GetStreamingAssetsFileName(string fileName)
+ {
+ var streamingAssetsFileName = Path.Combine(Application.streamingAssetsPath, fileName);
+
+#if UNITY_ANDROID && !UNITY_EDITOR
+ var tempFileName = Path.Combine(Application.temporaryCachePath, fileName);
+
+ if (File.Exists(tempFileName))
+ {
+ File.Delete(tempFileName);
+ }
+
+ try
+ {
+ var streamingAssetLoader = new WWW(streamingAssetsFileName);
+ while (!streamingAssetLoader.isDone)
+ {
+ }
+
+ if (string.IsNullOrEmpty(streamingAssetLoader.error))
+ {
+ using (var dataWriter = new BinaryWriter(new FileStream(tempFileName, FileMode.Create)))
+ {
+ dataWriter.Write(streamingAssetLoader.bytes);
+ dataWriter.Close();
+ }
+ }
+ else
+ {
+ Debug.LogError(streamingAssetLoader.error);
+ }
+ }
+ catch (Exception exception)
+ {
+ Debug.LogError(exception.ToString());
+ }
+
+ return tempFileName;
+#else
+ return streamingAssetsFileName;
+#endif
+ }
+
+ public static string HumanReadableDataSize(int dataSize)
+ {
+ if (dataSize < 1e3)
+ {
+ return dataSize.ToString() + " bytes";
+ }
+ else if (dataSize < 1e6)
+ {
+ return (dataSize / 1e3f).ToString("0.0") + " kB";
+ }
+ else if (dataSize < 1e9)
+ {
+ return (dataSize / 1e6f).ToString("0.0") + " MB";
+ }
+ else
+ {
+ return (dataSize / 1e9f).ToString("0.0") + " GB";
+ }
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/Common.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/Common.cs.meta
new file mode 100644
index 00000000..29895214
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/Common.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7797e245e8512a547ab441d68268cc01
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/Context.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/Context.cs
new file mode 100644
index 00000000..0fa072ff
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/Context.cs
@@ -0,0 +1,84 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using AOT;
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public class Context
+ {
+ IntPtr mContext = IntPtr.Zero;
+
+ public Context()
+ {
+ var contextSettings = new ContextSettings { };
+ contextSettings.version = Constants.kVersion;
+ contextSettings.logCallback = LogMessage;
+ contextSettings.simdLevel = SIMDLevel.AVX2;
+
+ if (SteamAudioSettings.Singleton.EnableValidation)
+ {
+ contextSettings.flags = contextSettings.flags | ContextFlags.Validation;
+ }
+
+ var status = API.iplContextCreate(ref contextSettings, out mContext);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to create context. [{0}]", status));
+ }
+
+ public Context(Context context)
+ {
+ mContext = API.iplContextRetain(context.Get());
+ }
+
+ ~Context()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplContextRelease(ref mContext);
+ }
+
+ public IntPtr Get()
+ {
+ return mContext;
+ }
+
+ [MonoPInvokeCallback(typeof(LogCallback))]
+ public static void LogMessage(LogLevel level, string message)
+ {
+ switch (level)
+ {
+ case LogLevel.Info:
+ case LogLevel.Debug:
+ Debug.Log(message);
+ break;
+ case LogLevel.Warning:
+ Debug.LogWarning(message);
+ break;
+ case LogLevel.Error:
+ Debug.LogError(message);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/Context.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/Context.cs.meta
new file mode 100644
index 00000000..5f95bcaa
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/Context.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 19c99b97347775a4d901f873fee55e3d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/EmbreeDevice.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/EmbreeDevice.cs
new file mode 100644
index 00000000..6beb0d45
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/EmbreeDevice.cs
@@ -0,0 +1,54 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+
+namespace SteamAudio
+{
+ public class EmbreeDevice
+ {
+ IntPtr mEmbreeDevice = IntPtr.Zero;
+
+ public EmbreeDevice(Context context)
+ {
+ var embreeDeviceSettings = new EmbreeDeviceSettings { };
+
+ var status = API.iplEmbreeDeviceCreate(context.Get(), ref embreeDeviceSettings, out mEmbreeDevice);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to create Embree device. [{0}]", status));
+ }
+
+ public EmbreeDevice(EmbreeDevice embreeDevice)
+ {
+ mEmbreeDevice = API.iplEmbreeDeviceRetain(embreeDevice.mEmbreeDevice);
+ }
+
+ ~EmbreeDevice()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplEmbreeDeviceRelease(ref mEmbreeDevice);
+ }
+
+ public IntPtr Get()
+ {
+ return mEmbreeDevice;
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/EmbreeDevice.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/EmbreeDevice.cs.meta
new file mode 100644
index 00000000..eb4b2e1b
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/EmbreeDevice.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b63c80d20765d8f49be4ad645532115f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/HRTF.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/HRTF.cs
new file mode 100644
index 00000000..f0366b42
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/HRTF.cs
@@ -0,0 +1,102 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using System.Runtime.InteropServices;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public class HRTF
+ {
+ IntPtr mHRTF = IntPtr.Zero;
+
+ public HRTF(Context context, AudioSettings audioSettings, string sofaFileName, byte[] sofaFileData, float gaindB, HRTFNormType normType)
+ {
+ IntPtr sofaData = IntPtr.Zero;
+
+ var hrtfSettings = new HRTFSettings { };
+ if (sofaFileData != null && sofaFileData.Length > 0)
+ {
+ hrtfSettings.type = HRTFType.SOFA;
+
+ sofaData = Marshal.AllocHGlobal(sofaFileData.Length);
+ Marshal.Copy(sofaFileData, 0, sofaData, sofaFileData.Length);
+
+ hrtfSettings.sofaFileData = sofaData;
+ hrtfSettings.sofaFileDataSize = sofaFileData.Length;
+ }
+ else if (sofaFileName != null)
+ {
+ hrtfSettings.type = HRTFType.SOFA;
+ hrtfSettings.sofaFileName = sofaFileName;
+ }
+ else
+ {
+ hrtfSettings.type = HRTFType.Default;
+ }
+
+ hrtfSettings.volume = dBToGain(gaindB);
+ hrtfSettings.normType = normType;
+
+ var status = API.iplHRTFCreate(context.Get(), ref audioSettings, ref hrtfSettings, out mHRTF);
+ if (status != Error.Success)
+ {
+ Debug.LogError(string.Format("Unable to load HRTF: {0}. [{1}]", (sofaFileName != null) ? sofaFileName : "default", status));
+ mHRTF = IntPtr.Zero;
+ }
+ else
+ {
+ Debug.Log(string.Format("Loaded HRTF: {0}.", (sofaFileName != null) ? sofaFileName : "default"));
+ }
+
+ if (sofaData != IntPtr.Zero)
+ {
+ Marshal.FreeHGlobal(sofaData);
+ }
+ }
+
+ public HRTF(HRTF hrtf)
+ {
+ mHRTF = API.iplHRTFRetain(hrtf.Get());
+ }
+
+ ~HRTF()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplHRTFRelease(ref mHRTF);
+ }
+
+ public IntPtr Get()
+ {
+ return mHRTF;
+ }
+
+ private float dBToGain(float gaindB)
+ {
+ const float kMinDBLevel = -90.0f;
+
+ if (gaindB <= kMinDBLevel)
+ return 0.0f;
+
+ return (float) Math.Pow(10.0, (double) gaindB * (1.0 / 20.0));
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/HRTF.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/HRTF.cs.meta
new file mode 100644
index 00000000..f408e70d
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/HRTF.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2676d545429ad5547a1ea3389903271e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/InstancedMesh.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/InstancedMesh.cs
new file mode 100644
index 00000000..4dd66b8a
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/InstancedMesh.cs
@@ -0,0 +1,77 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public class InstancedMesh
+ {
+ IntPtr mInstancedMesh = IntPtr.Zero;
+
+ public InstancedMesh(Scene scene, Scene subScene, Transform transform)
+ {
+ var instancedMeshSettings = new InstancedMeshSettings { };
+ instancedMeshSettings.subScene = subScene.Get();
+ instancedMeshSettings.transform = Common.ConvertTransform(transform);
+
+ var status = API.iplInstancedMeshCreate(scene.Get(), ref instancedMeshSettings, out mInstancedMesh);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to create instanced mesh ({0}). [{1}]", transform.gameObject.name, status));
+ }
+
+ public InstancedMesh(InstancedMesh instancedMesh)
+ {
+ mInstancedMesh = API.iplInstancedMeshRetain(instancedMesh.mInstancedMesh);
+ }
+
+ ~InstancedMesh()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplInstancedMeshRelease(ref mInstancedMesh);
+ }
+
+ public IntPtr Get()
+ {
+ return mInstancedMesh;
+ }
+
+ public void AddToScene(Scene scene)
+ {
+ API.iplInstancedMeshAdd(mInstancedMesh, scene.Get());
+ scene.NotifyAddObject();
+ }
+
+ public void RemoveFromScene(Scene scene)
+ {
+ API.iplInstancedMeshRemove(mInstancedMesh, scene.Get());
+ scene.NotifyRemoveObject();
+ }
+
+ public void UpdateTransform(Scene scene, Transform transform)
+ {
+ API.iplInstancedMeshUpdateTransform(mInstancedMesh, scene.Get(), Common.ConvertTransform(transform));
+ }
+ }
+}
+
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/InstancedMesh.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/InstancedMesh.cs.meta
new file mode 100644
index 00000000..8aa0ef82
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/InstancedMesh.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e9b254356f848f34d976c386541ec68b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/OpenCLDevice.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/OpenCLDevice.cs
new file mode 100644
index 00000000..b0f8d562
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/OpenCLDevice.cs
@@ -0,0 +1,94 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public class OpenCLDevice
+ {
+ IntPtr mOpenCLDevice = IntPtr.Zero;
+
+ public OpenCLDevice(Context context, OpenCLDeviceType deviceType, int numCUsToReserve, float fractionCUsForIRUpdate,
+ bool requiresTAN)
+ {
+ var deviceSettings = new OpenCLDeviceSettings { };
+ deviceSettings.type = deviceType;
+ deviceSettings.numCUsToReserve = numCUsToReserve;
+ deviceSettings.fractionCUsForIRUpdate = fractionCUsForIRUpdate;
+ deviceSettings.requiresTAN = requiresTAN ? Bool.True : Bool.False;
+
+ var deviceList = IntPtr.Zero;
+ var status = API.iplOpenCLDeviceListCreate(context.Get(), ref deviceSettings, out deviceList);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to enumerate OpenCL devices. [{0}]", status));
+
+ var numDevices = API.iplOpenCLDeviceListGetNumDevices(deviceList);
+ if (numDevices <= 0)
+ {
+ API.iplOpenCLDeviceListRelease(ref deviceList);
+
+ // If we explicitly requested a device that supports TAN, or if we didn't ask for CU
+ // reservation, but still didn't find any devices, stop.
+ if (requiresTAN || numCUsToReserve == 0)
+ throw new Exception(string.Format("No OpenCL devices found."));
+
+ Debug.LogWarning("No OpenCL devices found that match the provided parameters, attempting to " +
+ "initialize without CU reservation.");
+
+ deviceSettings.numCUsToReserve = 0;
+ deviceSettings.fractionCUsForIRUpdate = 0.0f;
+ status = API.iplOpenCLDeviceListCreate(context.Get(), ref deviceSettings, out deviceList);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to enumerate OpenCL devices. [{0}]", status));
+
+ numDevices = API.iplOpenCLDeviceListGetNumDevices(deviceList);
+ if (numDevices <= 0)
+ throw new Exception(string.Format("No OpenCL devices found."));
+ }
+
+ status = API.iplOpenCLDeviceCreate(context.Get(), deviceList, 0, out mOpenCLDevice);
+ if (status != Error.Success)
+ {
+ API.iplOpenCLDeviceListRelease(ref deviceList);
+ throw new Exception(string.Format("Unable to create OpenCL device. [{0}]", status));
+ }
+
+ API.iplOpenCLDeviceListRelease(ref deviceList);
+ }
+
+ public OpenCLDevice(OpenCLDevice device)
+ {
+ mOpenCLDevice = API.iplOpenCLDeviceRetain(device.mOpenCLDevice);
+ }
+
+ ~OpenCLDevice()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplOpenCLDeviceRelease(ref mOpenCLDevice);
+ }
+
+ public IntPtr Get()
+ {
+ return mOpenCLDevice;
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/OpenCLDevice.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/OpenCLDevice.cs.meta
new file mode 100644
index 00000000..9e7053cc
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/OpenCLDevice.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 980da0934e6939d439f50baac22a5286
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/ProbeBatch.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/ProbeBatch.cs
new file mode 100644
index 00000000..180b7d86
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/ProbeBatch.cs
@@ -0,0 +1,156 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public class ProbeArray
+ {
+ IntPtr mProbeArray = IntPtr.Zero;
+
+ public ProbeArray(Context context)
+ {
+ API.iplProbeArrayCreate(context.Get(), out mProbeArray);
+ }
+
+ public ProbeArray(ProbeArray probeArray)
+ {
+ mProbeArray = API.iplProbeArrayRetain(probeArray.mProbeArray);
+ }
+
+ ~ProbeArray()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplProbeArrayRelease(ref mProbeArray);
+ }
+
+ public IntPtr Get()
+ {
+ return mProbeArray;
+ }
+
+ public void GenerateProbes(Scene scene, ProbeGenerationParams probeGenerationParams)
+ {
+ API.iplProbeArrayGenerateProbes(mProbeArray, scene.Get(), ref probeGenerationParams);
+ }
+
+ public int GetNumProbes()
+ {
+ return API.iplProbeArrayGetNumProbes(mProbeArray);
+ }
+
+ public Sphere GetProbe(int index)
+ {
+ return API.iplProbeArrayGetProbe(mProbeArray, index);
+ }
+ }
+
+ public class ProbeBatch
+ {
+ Context mContext = null;
+ IntPtr mProbeBatch = IntPtr.Zero;
+
+ public ProbeBatch(Context context)
+ {
+ mContext = context;
+
+ API.iplProbeBatchCreate(context.Get(), out mProbeBatch);
+ }
+
+ public ProbeBatch(Context context, SerializedData dataAsset)
+ {
+ mContext = context;
+
+ var serializedObject = new SerializedObject(context, dataAsset);
+
+ var status = API.iplProbeBatchLoad(context.Get(), serializedObject.Get(), out mProbeBatch);
+ if (status != Error.Success)
+ {
+ Debug.LogError(string.Format("Unable to load Probe Batch from {0}.", dataAsset.name));
+ mProbeBatch = IntPtr.Zero;
+ }
+
+ serializedObject.Release();
+ }
+
+ public ProbeBatch(ProbeBatch probeBatch)
+ {
+ mContext = probeBatch.mContext;
+
+ mProbeBatch = API.iplProbeBatchRetain(probeBatch.mProbeBatch);
+ }
+
+ ~ProbeBatch()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplProbeBatchRelease(ref mProbeBatch);
+
+ mContext = null;
+ }
+
+ public IntPtr Get()
+ {
+ return mProbeBatch;
+ }
+
+ public int Save(SerializedData dataAsset, bool flush = true)
+ {
+ var serializedObject = new SerializedObject(mContext);
+ API.iplProbeBatchSave(mProbeBatch, serializedObject.Get());
+ var size = (int) serializedObject.GetSize();
+ serializedObject.WriteToFile(dataAsset, flush);
+ serializedObject.Release();
+ return size;
+ }
+
+ public void AddProbeArray(ProbeArray probeArray)
+ {
+ API.iplProbeBatchAddProbeArray(mProbeBatch, probeArray.Get());
+ }
+
+ public void AddProbe(Sphere probe)
+ {
+ API.iplProbeBatchAddProbe(mProbeBatch, probe);
+ }
+
+ public void Commit()
+ {
+ API.iplProbeBatchCommit(mProbeBatch);
+ }
+
+ public void RemoveData(BakedDataIdentifier identifier)
+ {
+ API.iplProbeBatchRemoveData(mProbeBatch, ref identifier);
+ }
+
+ public UIntPtr GetDataSize(BakedDataIdentifier identifier)
+ {
+ return API.iplProbeBatchGetDataSize(mProbeBatch, ref identifier);
+ }
+ }
+}
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/ProbeBatch.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/ProbeBatch.cs.meta
new file mode 100644
index 00000000..86170ac2
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/ProbeBatch.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 63ee2a9f8d2a86043bb79036d010ee2a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/RadeonRaysDevice.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/RadeonRaysDevice.cs
new file mode 100644
index 00000000..5aa770fc
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/RadeonRaysDevice.cs
@@ -0,0 +1,54 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+
+namespace SteamAudio
+{
+ public class RadeonRaysDevice
+ {
+ IntPtr mRadeonRaysDevice = IntPtr.Zero;
+
+ public RadeonRaysDevice(OpenCLDevice openCLDevice)
+ {
+ var deviceSettings = new RadeonRaysDeviceSettings { };
+
+ var status = API.iplRadeonRaysDeviceCreate(openCLDevice.Get(), ref deviceSettings, out mRadeonRaysDevice);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to create Radeon Rays device. [{0}]", status));
+ }
+
+ public RadeonRaysDevice(RadeonRaysDevice device)
+ {
+ mRadeonRaysDevice = API.iplRadeonRaysDeviceRetain(device.mRadeonRaysDevice);
+ }
+
+ ~RadeonRaysDevice()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplRadeonRaysDeviceRelease(ref mRadeonRaysDevice);
+ }
+
+ public IntPtr Get()
+ {
+ return mRadeonRaysDevice;
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/RadeonRaysDevice.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/RadeonRaysDevice.cs.meta
new file mode 100644
index 00000000..1226c2c1
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/RadeonRaysDevice.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ab45c0e4ff6a2c445843d2133d90ce2e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SOFAFile.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SOFAFile.cs
new file mode 100644
index 00000000..d768889c
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SOFAFile.cs
@@ -0,0 +1,38 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+
+namespace SteamAudio
+{
+ /*
+ * Represents a serializable object that is created when importing a .sofa file as an asset.
+ */
+ public class SOFAFile : ScriptableObject
+ {
+ // The name of the sofa file that was imported.
+ public string sofaName = "";
+
+ // The imported data.
+ public byte[] data = null;
+
+ // The volume correction factor in dB.
+ public float volume = 0.0f;
+
+ // Volume normalization type.
+ public HRTFNormType normType = HRTFNormType.None;
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SOFAFile.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SOFAFile.cs.meta
new file mode 100644
index 00000000..055c5b54
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SOFAFile.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c07f8c30ab6b2bb4380f1a4429dd557a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/Scene.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/Scene.cs
new file mode 100644
index 00000000..ecf46974
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/Scene.cs
@@ -0,0 +1,114 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+
+namespace SteamAudio
+{
+ public class Scene
+ {
+ Context mContext = null;
+ IntPtr mScene = IntPtr.Zero;
+ int mNumObjects = 0;
+
+ public Scene(Context context, SceneType type, EmbreeDevice embreeDevice, RadeonRaysDevice radeonRaysDevice, ClosestHitCallback closestHitCallback, AnyHitCallback anyHitCallback)
+ {
+ mContext = context;
+
+ var sceneSettings = new SceneSettings { };
+ sceneSettings.type = type;
+ sceneSettings.embreeDevice = (embreeDevice != null) ? embreeDevice.Get() : IntPtr.Zero;
+ sceneSettings.radeonRaysDevice = (radeonRaysDevice != null) ? radeonRaysDevice.Get() : IntPtr.Zero;
+ sceneSettings.closestHitCallback = closestHitCallback;
+ sceneSettings.anyHitCallback = anyHitCallback;
+
+ var status = API.iplSceneCreate(context.Get(), ref sceneSettings, out mScene);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to create scene [{0}]", status.ToString()));
+ }
+
+ public Scene(Context context, SceneSettings sceneSettings, SerializedData dataAsset)
+ {
+ mContext = context;
+
+ var serializedObject = new SerializedObject(context, dataAsset);
+ var status = API.iplSceneLoad(context.Get(), ref sceneSettings, serializedObject.Get(), null, IntPtr.Zero, out mScene);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to load scene [{0}]", status.ToString()));
+
+ serializedObject.Release();
+ }
+
+ public Scene(Scene scene)
+ {
+ mContext = scene.mContext;
+
+ mScene = API.iplSceneRetain(scene.mScene);
+ }
+
+ ~Scene()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplSceneRelease(ref mScene);
+
+ mContext = null;
+ }
+
+ public IntPtr Get()
+ {
+ return mScene;
+ }
+
+ public void Save(SerializedData dataAsset)
+ {
+ var serializedObject = new SerializedObject(mContext);
+ API.iplSceneSave(mScene, serializedObject.Get());
+ serializedObject.WriteToFile(dataAsset);
+ serializedObject.Release();
+ }
+
+ public void SaveOBJ(string fileBaseName)
+ {
+ API.iplSceneSaveOBJ(mScene, fileBaseName);
+ }
+
+ public void NotifyAddObject()
+ {
+ ++mNumObjects;
+ }
+
+ public void NotifyRemoveObject()
+ {
+ --mNumObjects;
+ }
+
+ public int GetNumObjects()
+ {
+ return mNumObjects;
+ }
+
+ public void Commit()
+ {
+ API.iplSceneCommit(mScene);
+ }
+ }
+}
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/Scene.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/Scene.cs.meta
new file mode 100644
index 00000000..a2c84f00
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/Scene.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f36118f1552c924438a563f1eba9832d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedData.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedData.cs
new file mode 100644
index 00000000..87e737fa
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedData.cs
@@ -0,0 +1,45 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+#if UNITY_EDITOR
+using UnityEditor;
+#endif
+
+namespace SteamAudio
+{
+ public class SerializedData : ScriptableObject
+ {
+ [SerializeField]
+ public byte[] data;
+
+ public static SerializedData PromptForNewAsset(string defaultFileName)
+ {
+#if UNITY_EDITOR
+ var fileName = EditorUtility.SaveFilePanelInProject("Export", defaultFileName, "asset",
+ "Select a file to export data to.");
+
+ if (fileName != null && fileName.Length > 0)
+ {
+ var dataAsset = ScriptableObject.CreateInstance();
+ AssetDatabase.CreateAsset(dataAsset, fileName);
+ return dataAsset;
+ }
+#endif
+ return null;
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedData.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedData.cs.meta
new file mode 100644
index 00000000..b3ef03ca
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3a82078fb50fbcb46a7e4402721b1a31
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedObject.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedObject.cs
new file mode 100644
index 00000000..ca58a7a9
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedObject.cs
@@ -0,0 +1,141 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+#if UNITY_EDITOR
+using UnityEditor;
+#endif
+
+namespace SteamAudio
+{
+ public class SerializedObject
+ {
+ IntPtr mSerializedObject = IntPtr.Zero;
+ IntPtr mDataBuffer = IntPtr.Zero;
+
+ static List sAssetsToFlush = null;
+
+ public SerializedObject(Context context)
+ {
+ var serializedObjectSettings = new SerializedObjectSettings { };
+
+ API.iplSerializedObjectCreate(context.Get(), ref serializedObjectSettings, out mSerializedObject);
+ }
+
+ public SerializedObject(Context context, SerializedData dataAsset)
+ {
+ var data = dataAsset.data;
+ mDataBuffer = Marshal.AllocHGlobal(data.Length);
+
+ Marshal.Copy(data, 0, mDataBuffer, data.Length);
+
+ var serializedObjectSettings = new SerializedObjectSettings { };
+ serializedObjectSettings.data = mDataBuffer;
+ serializedObjectSettings.size = (UIntPtr) data.Length;
+
+ API.iplSerializedObjectCreate(context.Get(), ref serializedObjectSettings, out mSerializedObject);
+ }
+
+ public SerializedObject(SerializedObject serializedObject)
+ {
+ mSerializedObject = API.iplSerializedObjectRetain(serializedObject.Get());
+ }
+
+ ~SerializedObject()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ if (mDataBuffer != IntPtr.Zero)
+ {
+ Marshal.FreeHGlobal(mDataBuffer);
+ mDataBuffer = IntPtr.Zero;
+ }
+
+ API.iplSerializedObjectRelease(ref mSerializedObject);
+ }
+
+ public IntPtr Get()
+ {
+ return mSerializedObject;
+ }
+
+ public UIntPtr GetSize()
+ {
+ return API.iplSerializedObjectGetSize(mSerializedObject);
+ }
+
+ public IntPtr GetData()
+ {
+ return API.iplSerializedObjectGetData(mSerializedObject);
+ }
+
+ public void WriteToFile(SerializedData dataAsset, bool flush = true)
+ {
+ var dataSize = GetSize();
+ var dataBuffer = GetData();
+
+ dataAsset.data = new byte[(int) dataSize];
+ Marshal.Copy(dataBuffer, dataAsset.data, 0, (int) dataSize);
+
+ if (flush)
+ {
+ FlushWrite(dataAsset);
+ }
+ else
+ {
+ if (sAssetsToFlush == null)
+ {
+ sAssetsToFlush = new List();
+ }
+
+ sAssetsToFlush.Add(dataAsset);
+ }
+ }
+
+ public static void FlushWrite(SerializedData dataAsset)
+ {
+#if UNITY_EDITOR
+ var assetPaths = new string[1];
+ assetPaths[0] = AssetDatabase.GetAssetPath(dataAsset);
+
+ // TODO: Deprecate older versions of Unity.
+#if UNITY_2017_3_OR_NEWER
+ AssetDatabase.ForceReserializeAssets(assetPaths);
+#endif
+#endif
+ }
+
+ public static void FlushAllWrites()
+ {
+ if (sAssetsToFlush == null)
+ return;
+
+ foreach (var dataAsset in sAssetsToFlush)
+ {
+ FlushWrite(dataAsset);
+ }
+
+ sAssetsToFlush.Clear();
+ }
+ }
+}
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedObject.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedObject.cs.meta
new file mode 100644
index 00000000..8aa7ab09
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SerializedObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7e71666981c49a64e98ee2cbd2726952
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/Simulator.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/Simulator.cs
new file mode 100644
index 00000000..ec5e6414
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/Simulator.cs
@@ -0,0 +1,152 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public class Simulator
+ {
+ IntPtr mSimulator = IntPtr.Zero;
+
+ public Simulator(Context context, SimulationSettings simulationSettings)
+ {
+ var status = API.iplSimulatorCreate(context.Get(), ref simulationSettings, out mSimulator);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to create simulator. [{0}]", status));
+ }
+
+ public Simulator(Simulator simulator)
+ {
+ mSimulator = API.iplSimulatorRetain(simulator.mSimulator);
+ }
+
+ ~Simulator()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplSimulatorRelease(ref mSimulator);
+ }
+
+ public IntPtr Get()
+ {
+ return mSimulator;
+ }
+
+ public void SetScene(Scene scene)
+ {
+ API.iplSimulatorSetScene(mSimulator, scene.Get());
+ }
+
+ public void AddProbeBatch(ProbeBatch probeBatch)
+ {
+ API.iplSimulatorAddProbeBatch(mSimulator, probeBatch.Get());
+ }
+
+ public void RemoveProbeBatch(ProbeBatch probeBatch)
+ {
+ API.iplSimulatorRemoveProbeBatch(mSimulator, probeBatch.Get());
+ }
+
+ public void SetSharedInputs(SimulationFlags flags, SimulationSharedInputs sharedInputs)
+ {
+ API.iplSimulatorSetSharedInputs(mSimulator, flags, ref sharedInputs);
+ }
+
+ public void Commit()
+ {
+ API.iplSimulatorCommit(mSimulator);
+ }
+
+ public void RunDirect()
+ {
+ API.iplSimulatorRunDirect(mSimulator);
+ }
+
+ public void RunReflections()
+ {
+ API.iplSimulatorRunReflections(mSimulator);
+ }
+
+ public void RunPathing()
+ {
+ API.iplSimulatorRunPathing(mSimulator);
+ }
+ }
+
+ public class Source
+ {
+ IntPtr mSource = IntPtr.Zero;
+
+ public Source(Simulator simulator, SimulationSettings simulationSettings)
+ {
+ var sourceSettings = new SourceSettings { };
+ sourceSettings.flags = simulationSettings.flags;
+
+ var status = API.iplSourceCreate(simulator.Get(), ref sourceSettings, out mSource);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to create source for simulation. [{0}]", status));
+ }
+
+ public Source(Source source)
+ {
+ mSource = API.iplSourceRetain(source.mSource);
+ }
+
+ ~Source()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplSourceRelease(ref mSource);
+ }
+
+ public IntPtr Get()
+ {
+ return mSource;
+ }
+
+ public void AddToSimulator(Simulator simulator)
+ {
+ API.iplSourceAdd(mSource, simulator.Get());
+ }
+
+ public void RemoveFromSimulator(Simulator simulator)
+ {
+ API.iplSourceRemove(mSource, simulator.Get());
+ }
+
+ public void SetInputs(SimulationFlags flags, SimulationInputs inputs)
+ {
+ API.iplSourceSetInputs(mSource, flags, ref inputs);
+ }
+
+ public SimulationOutputs GetOutputs(SimulationFlags flags)
+ {
+ var outputs = new SimulationOutputs { };
+ API.iplSourceGetOutputs(mSource, flags, ref outputs);
+ return outputs;
+ }
+ }
+}
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/Simulator.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/Simulator.cs.meta
new file mode 100644
index 00000000..5b213b88
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/Simulator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 59c8ab9b6583fd541bae96e7d56ad808
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/StaticMesh.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/StaticMesh.cs
new file mode 100644
index 00000000..2e2e269f
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/StaticMesh.cs
@@ -0,0 +1,136 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace SteamAudio
+{
+ public class StaticMesh
+ {
+ Context mContext = null;
+ IntPtr mStaticMesh = IntPtr.Zero;
+
+ public StaticMesh(Context context, Scene scene, Vector3[] vertices, Triangle[] triangles, int[] materialIndices, Material[] materials)
+ {
+ mContext = context;
+
+ var verticesBuffer = Marshal.AllocHGlobal(vertices.Length * Marshal.SizeOf(typeof(Vector3)));
+ var trianglesBuffer = Marshal.AllocHGlobal(triangles.Length * Marshal.SizeOf(typeof(Triangle)));
+ var materialIndicesBuffer = Marshal.AllocHGlobal(materialIndices.Length * Marshal.SizeOf(typeof(int)));
+ var materialsBuffer = Marshal.AllocHGlobal(materials.Length * Marshal.SizeOf(typeof(Material)));
+
+ for (var i = 0; i < vertices.Length; ++i)
+ {
+ Marshal.StructureToPtr(vertices[i], new IntPtr(verticesBuffer.ToInt64() + i * Marshal.SizeOf(typeof(Vector3))), false);
+ }
+
+ for (var i = 0; i < triangles.Length; ++i)
+ {
+ Marshal.StructureToPtr(triangles[i], new IntPtr(trianglesBuffer.ToInt64() + i * Marshal.SizeOf(typeof(Triangle))), false);
+ }
+
+ Marshal.Copy(materialIndices, 0, materialIndicesBuffer, triangles.Length);
+
+ for (var i = 0; i < materials.Length; ++i)
+ {
+ Marshal.StructureToPtr(materials[i], new IntPtr(materialsBuffer.ToInt64() + i * Marshal.SizeOf(typeof(Material))), false);
+ }
+
+ var staticMeshSettings = new StaticMeshSettings { };
+ staticMeshSettings.numVertices = vertices.Length;
+ staticMeshSettings.numTriangles = triangles.Length;
+ staticMeshSettings.numMaterials = materials.Length;
+ staticMeshSettings.vertices = verticesBuffer;
+ staticMeshSettings.triangles = trianglesBuffer;
+ staticMeshSettings.materialIndices = materialIndicesBuffer;
+ staticMeshSettings.materials = materialsBuffer;
+
+ var status = API.iplStaticMeshCreate(scene.Get(), ref staticMeshSettings, out mStaticMesh);
+ if (status != Error.Success)
+ {
+ throw new Exception(string.Format("Unable to create static mesh for export ({0} vertices, {1} triangles, {2} materials): [{3}]",
+ staticMeshSettings.numVertices.ToString(), staticMeshSettings.numTriangles.ToString(), staticMeshSettings.numMaterials.ToString(),
+ status.ToString()));
+ }
+
+ Marshal.FreeHGlobal(verticesBuffer);
+ Marshal.FreeHGlobal(trianglesBuffer);
+ Marshal.FreeHGlobal(materialIndicesBuffer);
+ Marshal.FreeHGlobal(materialsBuffer);
+ }
+
+ public StaticMesh(Context context, Scene scene, SerializedData dataAsset)
+ {
+ mContext = context;
+
+ var serializedObject = new SerializedObject(context, dataAsset);
+
+ var status = API.iplStaticMeshLoad(scene.Get(), serializedObject.Get(), null, IntPtr.Zero, out mStaticMesh);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to load static mesh ({0}). [{1}]", dataAsset.name, status));
+
+ serializedObject.Release();
+ }
+
+ public StaticMesh(StaticMesh staticMesh)
+ {
+ mContext = staticMesh.mContext;
+
+ mStaticMesh = API.iplStaticMeshRetain(staticMesh.mStaticMesh);
+ }
+
+ ~StaticMesh()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplStaticMeshRelease(ref mStaticMesh);
+
+ mContext = null;
+ }
+
+ public IntPtr Get()
+ {
+ return mStaticMesh;
+ }
+
+ public void Save(SerializedData dataAsset)
+ {
+ var serializedObject = new SerializedObject(mContext);
+ API.iplStaticMeshSave(mStaticMesh, serializedObject.Get());
+ serializedObject.WriteToFile(dataAsset);
+ serializedObject.Release();
+ }
+
+ public void AddToScene(Scene scene)
+ {
+ API.iplStaticMeshAdd(mStaticMesh, scene.Get());
+ scene.NotifyAddObject();
+ }
+
+ public void RemoveFromScene(Scene scene)
+ {
+ API.iplStaticMeshRemove(mStaticMesh, scene.Get());
+ scene.NotifyRemoveObject();
+ }
+ }
+}
+
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/StaticMesh.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/StaticMesh.cs.meta
new file mode 100644
index 00000000..4d8969eb
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/StaticMesh.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 426a41fdb5d8b904fb4b688ed1b1db02
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudio.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudio.cs
new file mode 100644
index 00000000..4bb4e823
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudio.cs
@@ -0,0 +1,1679 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using System.Runtime.InteropServices;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ // CONSTANTS
+
+ public static class Constants
+ {
+ public const uint kVersionMajor = 4;
+ public const uint kVersionMinor = 7;
+ public const uint kVersionPatch = 0;
+ public const uint kVersion = (kVersionMajor << 16) | (kVersionMinor << 8) | kVersionPatch;
+ }
+
+ // ENUMERATIONS
+
+ public enum Bool
+ {
+ False,
+ True
+ }
+
+ public enum Error
+ {
+ Success,
+ Failure,
+ OutOfMemory,
+ Initialization
+ }
+
+ public enum LogLevel
+ {
+ Info,
+ Warning,
+ Error,
+ Debug
+ }
+
+ public enum SIMDLevel
+ {
+ SSE2,
+ SSE4,
+ AVX,
+ AVX2,
+ AVX512,
+ NEON = SSE2
+ }
+
+ [Flags]
+ public enum ContextFlags
+ {
+ Validation = 1 << 0,
+ Force32Bit = 0x7fffffff
+ }
+
+ public enum OpenCLDeviceType
+ {
+ Any,
+ CPU,
+ GPU
+ }
+
+ public enum SceneType
+ {
+ Default,
+ Embree,
+ RadeonRays,
+#if UNITY_2019_2_OR_NEWER
+ [InspectorName("Unity")]
+#endif
+ Custom
+ }
+
+ public enum HRTFType
+ {
+ Default,
+ SOFA
+ }
+
+ public enum HRTFNormType
+ {
+ None,
+ RMS
+ }
+
+ public enum ProbeGenerationType
+ {
+ Centroid,
+ UniformFloor
+ }
+
+ public enum BakedDataVariation
+ {
+ Reverb,
+ StaticSource,
+ StaticListener,
+ Dynamic
+ }
+
+ public enum BakedDataType
+ {
+ Reflections,
+ Pathing
+ }
+
+ [Flags]
+ public enum SimulationFlags
+ {
+ Direct = 1 << 0,
+ Reflections = 1 << 1,
+ Pathing = 1 << 2
+ }
+
+ [Flags]
+ public enum DirectSimulationFlags
+ {
+ DistanceAttenuation = 1 << 0,
+ AirAbsorption = 1 << 1,
+ Directivity = 1 << 2,
+ Occlusion = 1 << 3,
+ Transmission = 1 << 4
+ }
+
+ public enum HRTFInterpolation
+ {
+ Nearest,
+ Bilinear
+ }
+
+ public enum DistanceAttenuationModelType
+ {
+ Default,
+ InverseDistance,
+ Callback
+ }
+
+ public enum AirAbsorptionModelType
+ {
+ Default,
+ Exponential,
+ Callback
+ }
+
+ public enum OcclusionType
+ {
+ Raycast,
+ Volumetric
+ }
+
+ [Flags]
+ public enum DirectEffectFlags
+ {
+ ApplyDistanceAttenuation = 1 << 0,
+ ApplyAirAbsorption = 1 << 1,
+ ApplyDirectivity = 1 << 2,
+ ApplyOcclusion = 1 << 3,
+ ApplyTransmission = 1 << 4
+ }
+
+ public enum TransmissionType
+ {
+ FrequencyIndependent,
+ FrequencyDependent
+ }
+
+ public enum ReflectionEffectType
+ {
+ Convolution,
+ Parametric,
+ Hybrid,
+#if UNITY_2019_2_OR_NEWER
+ [InspectorName("TrueAudio Next")]
+#endif
+ TrueAudioNext
+ }
+
+ [Flags]
+ public enum ReflectionsBakeFlags
+ {
+ BakeConvolution = 1 << 0,
+ BakeParametric = 1 << 1
+ }
+
+ // CALLBACKS
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate void ProgressCallback(float progress, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate void LogCallback(LogLevel level, string message);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate IntPtr AllocateCallback(UIntPtr size, UIntPtr alignment);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate void FreeCallback(IntPtr memoryBlock);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate void ClosestHitCallback(ref Ray ray, float minDistance, float maxDistance, out Hit hit, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate void AnyHitCallback(ref Ray ray, float minDistance, float maxDistance, out byte occluded, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate void BatchedClosestHitCallback(int numRays, Ray[] rays, float[] minDistances, float[] maxDistances, [Out] Hit[] hits, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate void BatchedAnyHitCallback(int numRays, Ray[] rays, float[] minDistances, float[] maxDistances, [Out] byte[] occluded, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate float DistanceAttenuationCallback(float distance, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate float AirAbsorptionCallback(float distance, int band, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate float DirectivityCallback(Vector3 direction, IntPtr userData);
+
+ [UnmanagedFunctionPointer(CallingConvention.Winapi)]
+ public delegate void PathingVisualizationCallback(Vector3 from, Vector3 to, Bool occluded, IntPtr userData);
+
+ // STRUCTURES
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ContextSettings
+ {
+ public uint version;
+ public LogCallback logCallback;
+ public AllocateCallback allocateCallback;
+ public FreeCallback freeCallback;
+ public SIMDLevel simdLevel;
+ public ContextFlags flags;
+ }
+
+ [Serializable]
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Vector3
+ {
+ public float x;
+ public float y;
+ public float z;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Matrix4x4
+ {
+ public float m00;
+ public float m01;
+ public float m02;
+ public float m03;
+ public float m10;
+ public float m11;
+ public float m12;
+ public float m13;
+ public float m20;
+ public float m21;
+ public float m22;
+ public float m23;
+ public float m30;
+ public float m31;
+ public float m32;
+ public float m33;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Box
+ {
+ public Vector3 minCoordinates;
+ public Vector3 maxCoordinates;
+ }
+
+ [Serializable]
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Sphere
+ {
+ public Vector3 center;
+ public float radius;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct CoordinateSpace3
+ {
+ public Vector3 right;
+ public Vector3 up;
+ public Vector3 ahead;
+ public Vector3 origin;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct SerializedObjectSettings
+ {
+ public IntPtr data;
+ public UIntPtr size;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct EmbreeDeviceSettings { }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct OpenCLDeviceSettings
+ {
+ public OpenCLDeviceType type;
+ public int numCUsToReserve;
+ public float fractionCUsForIRUpdate;
+ public Bool requiresTAN;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct OpenCLDeviceDesc
+ {
+ public IntPtr platform;
+ public string platformName;
+ public string platformVendor;
+ public string platformVersion;
+ public IntPtr device;
+ public string deviceName;
+ public string deviceVendor;
+ public string deviceVersion;
+ public OpenCLDeviceType type;
+ public int numConvolutionCUs;
+ public int numIRUpdateCUs;
+ public int granularity;
+ public float perfScore;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct RadeonRaysDeviceSettings { }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct TrueAudioNextDeviceSettings
+ {
+ public int frameSize;
+ public int irSize;
+ public int order;
+ public int maxSources;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Triangle
+ {
+ public int index0;
+ public int index1;
+ public int index2;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Material
+ {
+ public float absorptionLow;
+ public float absorptionMid;
+ public float absorptionHigh;
+ public float scattering;
+ public float transmissionLow;
+ public float transmissionMid;
+ public float transmissionHigh;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Ray
+ {
+ public Vector3 origin;
+ public Vector3 direction;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Hit
+ {
+ public float distance;
+ public int triangleIndex;
+ public int objectIndex;
+ public int materialIndex;
+ public Vector3 normal;
+ public IntPtr material;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct SceneSettings
+ {
+ public SceneType type;
+ public ClosestHitCallback closestHitCallback;
+ public AnyHitCallback anyHitCallback;
+ public BatchedClosestHitCallback batchedClosestHitCallback;
+ public BatchedAnyHitCallback batchedAnyHitCallback;
+ public IntPtr userData;
+ public IntPtr embreeDevice;
+ public IntPtr radeonRaysDevice;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct StaticMeshSettings
+ {
+ public int numVertices;
+ public int numTriangles;
+ public int numMaterials;
+ public IntPtr vertices;
+ public IntPtr triangles;
+ public IntPtr materialIndices;
+ public IntPtr materials;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct InstancedMeshSettings
+ {
+ public IntPtr subScene;
+ public Matrix4x4 transform;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct AudioSettings
+ {
+ public int samplingRate;
+ public int frameSize;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct HRTFSettings
+ {
+ public HRTFType type;
+ public string sofaFileName;
+ public IntPtr sofaFileData;
+ public int sofaFileDataSize;
+ public float volume;
+ public HRTFNormType normType;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ProbeGenerationParams
+ {
+ public ProbeGenerationType type;
+ public float spacing;
+ public float height;
+ public Matrix4x4 transform;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ [Serializable]
+ public struct BakedDataIdentifier
+ {
+ public BakedDataType type;
+ public BakedDataVariation variation;
+ public Sphere endpointInfluence;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ReflectionsBakeParams
+ {
+ public IntPtr scene;
+ public IntPtr probeBatch;
+ public SceneType sceneType;
+ public BakedDataIdentifier identifier;
+ public ReflectionsBakeFlags flags;
+ public int numRays;
+ public int numDiffuseSamples;
+ public int numBounces;
+ public float simulatedDuration;
+ public float savedDuration;
+ public int order;
+ public int numThreads;
+ public int rayBatchSize;
+ public float irradianceMinDistance;
+ public int bakeBatchSize;
+ public IntPtr openCLDevice;
+ public IntPtr radeonRaysDevice;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct PathBakeParams
+ {
+ public IntPtr scene;
+ public IntPtr probeBatch;
+ public BakedDataIdentifier identifier;
+ public int numSamples;
+ public float radius;
+ public float threshold;
+ public float visRange;
+ public float pathRange;
+ public int numThreads;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct DistanceAttenuationModel
+ {
+ public DistanceAttenuationModelType type;
+ public float minDistance;
+ public DistanceAttenuationCallback callback;
+ public IntPtr userData;
+ public Bool dirty;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct AirAbsorptionModel
+ {
+ public AirAbsorptionModelType type;
+ public float coefficientsLow;
+ public float coefficientsMid;
+ public float coefficientsHigh;
+ public AirAbsorptionCallback callback;
+ public IntPtr userData;
+ public Bool dirty;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct Directivity
+ {
+ public float dipoleWeight;
+ public float dipolePower;
+ public DirectivityCallback callback;
+ public IntPtr userData;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct SimulationSettings
+ {
+ public SimulationFlags flags;
+ public SceneType sceneType;
+ public ReflectionEffectType reflectionType;
+ public int maxNumOcclusionSamples;
+ public int maxNumRays;
+ public int numDiffuseSamples;
+ public float maxDuration;
+ public int maxOrder;
+ public int maxNumSources;
+ public int numThreads;
+ public int rayBatchSize;
+ public int numVisSamples;
+ public int samplingRate;
+ public int frameSize;
+ public IntPtr openCLDevice;
+ public IntPtr radeonRaysDevice;
+ public IntPtr tanDevice;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct SourceSettings
+ {
+ public SimulationFlags flags;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct SimulationInputs
+ {
+ public SimulationFlags flags;
+ public DirectSimulationFlags directFlags;
+ public CoordinateSpace3 source;
+ public DistanceAttenuationModel distanceAttenuationModel;
+ public AirAbsorptionModel airAbsorptionModel;
+ public Directivity directivity;
+ public OcclusionType occlusionType;
+ public float occlusionRadius;
+ public int numOcclusionSamples;
+ public float reverbScaleLow;
+ public float reverbScaleMid;
+ public float reverbScaleHigh;
+ public float hybridReverbTransitionTime;
+ public float hybridReverbOverlapPercent;
+ public Bool baked;
+ public BakedDataIdentifier bakedDataIdentifier;
+ public IntPtr pathingProbes;
+ public float visRadius;
+ public float visThreshold;
+ public float visRange;
+ public int pathingOrder;
+ public Bool enableValidation;
+ public Bool findAlternatePaths;
+ public int numTransmissionRays;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct SimulationSharedInputs
+ {
+ public CoordinateSpace3 listener;
+ public int numRays;
+ public int numBounces;
+ public float duration;
+ public int order;
+ public float irradianceMinDistance;
+ public PathingVisualizationCallback pathingVisualizationCallback;
+ public IntPtr pathingUserData;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct DirectEffectParams
+ {
+ public DirectEffectFlags flags;
+ public TransmissionType transmissionType;
+ public float distanceAttenuation;
+ public float airAbsorptionLow;
+ public float airAbsorptionMid;
+ public float airAbsorptionHigh;
+ public float directivity;
+ public float occlusion;
+ public float transmissionLow;
+ public float transmissionMid;
+ public float transmissionHigh;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ReflectionEffectParams
+ {
+ public ReflectionEffectType type;
+ public IntPtr ir;
+ public float reverbTimesLow;
+ public float reverbTimesMid;
+ public float reverbTimesHigh;
+ public float eqLow;
+ public float eqMid;
+ public float eqHigh;
+ public int delay;
+ public int numChannels;
+ public int irSize;
+ public IntPtr tanDevice;
+ public int tanSlot;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct PathEffectParams
+ {
+ public float eqCoeffsLow;
+ public float eqCoeffsMid;
+ public float eqCoeffsHigh;
+ public IntPtr shCoeffs;
+ public int order;
+ public Bool binaural;
+ public IntPtr hrtf;
+ public CoordinateSpace3 listener;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct SimulationOutputs
+ {
+ public DirectEffectParams direct;
+ public ReflectionEffectParams reflections;
+ public PathEffectParams pathing;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct PerspectiveCorrection
+ {
+ public Bool enabled;
+ public float xfactor;
+ public float yfactor;
+ public Matrix4x4 transform;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct EnergyFieldSettings
+ {
+ public float duration;
+ public int order;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ImpulseResponseSettings
+ {
+ public float duration;
+ public int order;
+ public int samplingRate;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ReconstructorSettings
+ {
+ public float maxDuration;
+ public int maxOrder;
+ public int samplingRate;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ReconstructorInputs
+ {
+ public IntPtr energyField;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ReconstructorSharedInputs
+ {
+ public float duration;
+ public int order;
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct ReconstructorOutputs
+ {
+ public IntPtr impulseResponse;
+ }
+
+ // FUNCTIONS
+
+ public static class API
+ {
+ // Context
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplContextCreate(ref ContextSettings settings, out IntPtr context);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplContextRetain(IntPtr context);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplContextRelease(ref IntPtr context);
+
+ // Geometry
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Vector3 iplCalculateRelativeDirection(IntPtr context, Vector3 sourcePosition, Vector3 listenerPosition, Vector3 listenerAhead, Vector3 listenerUp);
+
+ // Serialization
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplSerializedObjectCreate(IntPtr context, ref SerializedObjectSettings settings, out IntPtr serializedObject);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplSerializedObjectRetain(IntPtr serializedObject);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSerializedObjectRelease(ref IntPtr serializedObject);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern UIntPtr iplSerializedObjectGetSize(IntPtr serializedObject);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplSerializedObjectGetData(IntPtr serializedObject);
+
+ // Embree
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplEmbreeDeviceCreate(IntPtr context, ref EmbreeDeviceSettings settings, out IntPtr device);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplEmbreeDeviceRetain(IntPtr device);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplEmbreeDeviceRelease(ref IntPtr device);
+
+ // OpenCL
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplOpenCLDeviceListCreate(IntPtr context, ref OpenCLDeviceSettings settings, out IntPtr deviceList);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplOpenCLDeviceListRetain(IntPtr deviceList);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplOpenCLDeviceListRelease(ref IntPtr deviceList);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern int iplOpenCLDeviceListGetNumDevices(IntPtr deviceList);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplOpenCLDeviceListGetDeviceDesc(IntPtr deviceList, int index, out OpenCLDeviceDesc deviceDesc);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplOpenCLDeviceCreate(IntPtr context, IntPtr deviceList, int index, out IntPtr device);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplOpenCLDeviceRetain(IntPtr device);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplOpenCLDeviceRelease(ref IntPtr device);
+
+ // Radeon Rays
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplRadeonRaysDeviceCreate(IntPtr openCLDevice, ref RadeonRaysDeviceSettings settings, out IntPtr rrDevice);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplRadeonRaysDeviceRetain(IntPtr device);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplRadeonRaysDeviceRelease(ref IntPtr device);
+
+ // TrueAudio Next
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplTrueAudioNextDeviceCreate(IntPtr openCLDevice, ref TrueAudioNextDeviceSettings settings, out IntPtr tanDevice);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplTrueAudioNextDeviceRetain(IntPtr device);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplTrueAudioNextDeviceRelease(ref IntPtr device);
+
+ // Scene
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplSceneCreate(IntPtr context, ref SceneSettings settings, out IntPtr scene);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplSceneRetain(IntPtr scene);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSceneRelease(ref IntPtr scene);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplSceneLoad(IntPtr context, ref SceneSettings settings, IntPtr serializedObject, ProgressCallback progressCallback, IntPtr progressCallbackUserData, out IntPtr scene);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSceneSave(IntPtr scene, IntPtr serializedObject);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSceneSaveOBJ(IntPtr scene, string fileBaseName);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSceneCommit(IntPtr scene);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplStaticMeshCreate(IntPtr scene, ref StaticMeshSettings settings, out IntPtr staticMesh);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplStaticMeshRetain(IntPtr staticMesh);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplStaticMeshRelease(ref IntPtr staticMesh);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplStaticMeshLoad(IntPtr scene, IntPtr serializedObject, ProgressCallback progressCallback, IntPtr progressCallbackUserData, out IntPtr staticMesh);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplStaticMeshSave(IntPtr staticMesh, IntPtr serializedObject);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplStaticMeshAdd(IntPtr staticMesh, IntPtr scene);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplStaticMeshRemove(IntPtr staticMesh, IntPtr scene);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplInstancedMeshCreate(IntPtr scene, ref InstancedMeshSettings settings, out IntPtr instancedMesh);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplInstancedMeshRetain(IntPtr instancedMesh);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplInstancedMeshRelease(ref IntPtr instancedMesh);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplInstancedMeshAdd(IntPtr instancedMesh, IntPtr scene);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplInstancedMeshRemove(IntPtr instancedMesh, IntPtr scene);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplInstancedMeshUpdateTransform(IntPtr instancedMesh, IntPtr scene, Matrix4x4 transform);
+
+ // HRTF
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplHRTFCreate(IntPtr context, ref AudioSettings audioSettings, ref HRTFSettings hrtfSettings, out IntPtr hrtf);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplHRTFRetain(IntPtr hrtf);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplHRTFRelease(ref IntPtr hrtf);
+
+ // Probes
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplProbeArrayCreate(IntPtr context, out IntPtr probeArray);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplProbeArrayRetain(IntPtr probeArray);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeArrayRelease(ref IntPtr probeArray);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeArrayGenerateProbes(IntPtr probeArray, IntPtr scene, ref ProbeGenerationParams generationParams);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern int iplProbeArrayGetNumProbes(IntPtr probeArray);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Sphere iplProbeArrayGetProbe(IntPtr probeArray, int index);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplProbeBatchCreate(IntPtr context, out IntPtr probeBatch);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplProbeBatchRetain(IntPtr probeBatch);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeBatchRelease(ref IntPtr probeBatch);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplProbeBatchLoad(IntPtr context, IntPtr serializedObject, out IntPtr probeBatch);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeBatchSave(IntPtr probeBatch, IntPtr serializedObject);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern int iplProbeBatchGetNumProbes(IntPtr probeBatch);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeBatchAddProbe(IntPtr probeBatch, Sphere probe);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeBatchAddProbeArray(IntPtr probeBatch, IntPtr probeArray);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeBatchRemoveProbe(IntPtr probeBatch, int index);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeBatchCommit(IntPtr probeBatch);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeBatchRemoveData(IntPtr probeBatch, ref BakedDataIdentifier identifier);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern UIntPtr iplProbeBatchGetDataSize(IntPtr probeBatch, ref BakedDataIdentifier identifier);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeBatchGetEnergyField(IntPtr probeBatch, ref BakedDataIdentifier identifier, int probeIndex, IntPtr energyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplProbeBatchGetReverb(IntPtr probeBatch, ref BakedDataIdentifier identifier, int probeIndex, float[] reverbTimes);
+
+ // Baking
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplReflectionsBakerBake(IntPtr context, ref ReflectionsBakeParams bakeParams, ProgressCallback progressCallback, IntPtr userData);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplReflectionsBakerCancelBake(IntPtr context);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplPathBakerBake(IntPtr context, ref PathBakeParams bakeParams, ProgressCallback progressCallback, IntPtr userData);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplPathBakerCancelBake(IntPtr context);
+
+ // Run-Time Simulation
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplSimulatorCreate(IntPtr context, ref SimulationSettings settings, out IntPtr simulator);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplSimulatorRetain(IntPtr simulator);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSimulatorRelease(ref IntPtr simulator);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSimulatorSetScene(IntPtr simulator, IntPtr scene);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSimulatorAddProbeBatch(IntPtr simulator, IntPtr probeBatch);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSimulatorRemoveProbeBatch(IntPtr simulator, IntPtr probeBatch);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSimulatorSetSharedInputs(IntPtr simulator, SimulationFlags flags, ref SimulationSharedInputs sharedInputs);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSimulatorCommit(IntPtr simulator);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSimulatorRunDirect(IntPtr simulator);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSimulatorRunReflections(IntPtr simulator);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSimulatorRunPathing(IntPtr simulator);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplSourceCreate(IntPtr simulator, ref SourceSettings settings, out IntPtr source);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplSourceRetain(IntPtr source);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSourceRelease(ref IntPtr source);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSourceAdd(IntPtr source, IntPtr simulator);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSourceRemove(IntPtr source, IntPtr simulator);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSourceSetInputs(IntPtr source, SimulationFlags flags, ref SimulationInputs inputs);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplSourceGetOutputs(IntPtr source, SimulationFlags flags, ref SimulationOutputs outputs);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern float iplDistanceAttenuationCalculate(IntPtr context, Vector3 source, Vector3 listener, ref DistanceAttenuationModel model);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplAirAbsorptionCalculate(IntPtr context, Vector3 source, Vector3 listener, ref AirAbsorptionModel mode, float[] minDistances);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern float iplDirectivityCalculate(IntPtr context, CoordinateSpace3 source, Vector3 listener, ref Directivity model);
+
+ // Energy Field API
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplEnergyFieldCreate(IntPtr context, ref EnergyFieldSettings settings, out IntPtr energyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplEnergyFieldRetain(IntPtr energyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplEnergyFieldRelease(ref IntPtr energyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern int iplEnergyFieldGetNumChannels(IntPtr energyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern int iplEnergyFieldGetNumBins(IntPtr energyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplEnergyFieldGetData(IntPtr energyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplEnergyFieldGetChannel(IntPtr energyField, int channelIndex);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplEnergyFieldGetBand(IntPtr energyField, int channelIndex, int bandIndex);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplEnergyFieldReset(IntPtr energyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplEnergyFieldCopy(IntPtr srcEnergyField, IntPtr dstEnergyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplEnergyFieldSwap(IntPtr energyFieldA, IntPtr energyFieldB);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplEnergyFieldAdd(IntPtr energyField1, IntPtr energyField2, IntPtr outEnergyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplEnergyFieldScale(IntPtr inEnergyField, float scalar, IntPtr outEnergyField);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplEnergyFieldScaleAccum(IntPtr inEnergyField, float scalar, IntPtr outEnergyField);
+
+ // Impulse Response API
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern Error iplImpulseResponseCreate(IntPtr context, ref ImpulseResponseSettings settings, out IntPtr impulseResponse);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplImpulseResponseRetain(IntPtr impulseResponse);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplImpulseResponseRelease(ref IntPtr impulseResponse);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern int iplImpulseResponseGetNumChannels(IntPtr impulseResponse);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern int iplImpulseResponseGetNumSamples(IntPtr impulseResponse);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplImpulseResponseGetData(IntPtr impulseResponse);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplImpulseResponseGetChannel(IntPtr impulseResponse, int channelIndex);
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplImpulseResponseReset(IntPtr impulseResponse);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplImpulseResponseCopy(IntPtr srcImpulseReponse, IntPtr dstImpulseResponse);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplImpulseResponseSwap(IntPtr impulseResponse1, IntPtr impulseResponse2);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplImpulseResponseAdd(IntPtr inImpulseResponse1, IntPtr inImpulseResponse2, IntPtr outImpulseResponse);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplImpulseResponseScale(IntPtr inImpulseResponse, float scalar, IntPtr outImpulseResponse);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplImpulseResponseScaleAccum(IntPtr inImpulseRespnse, float scalar, IntPtr outImpulseResponse);
+
+ // Reconstructor API
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+
+#endif
+ public static extern Error iplReconstructorCreate(IntPtr context, ref ReconstructorSettings settings, out IntPtr reconstructor);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern IntPtr iplReconstructorRetain(IntPtr reconstructor);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplReconstructorRelease(ref IntPtr reconstructor);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("phonon")]
+#endif
+ public static extern void iplReconstructorReconstruct(IntPtr reconstructor, int numInputs, ref ReconstructorInputs inputs, ref ReconstructorSharedInputs sharedInputs, ref ReconstructorOutputs outputs);
+
+ // UNITY PLUGIN
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("audioplugin_phonon")]
+#endif
+ public static extern void iplUnityInitialize(IntPtr context);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("audioplugin_phonon")]
+#endif
+ public static extern void iplUnitySetPerspectiveCorrection(PerspectiveCorrection correction);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("audioplugin_phonon")]
+#endif
+ public static extern void iplUnitySetHRTF(IntPtr hrtf);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("audioplugin_phonon")]
+#endif
+ public static extern void iplUnitySetSimulationSettings(SimulationSettings simulationSettings);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("audioplugin_phonon")]
+#endif
+ public static extern void iplUnitySetReverbSource(IntPtr reverbSource);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("audioplugin_phonon")]
+#endif
+ public static extern int iplUnityAddSource(IntPtr source);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("audioplugin_phonon")]
+#endif
+ public static extern void iplUnityRemoveSource(int handle);
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("audioplugin_phonon")]
+#endif
+ public static extern void iplUnityTerminate();
+
+#if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
+ [DllImport("__Internal")]
+#else
+ [DllImport("audioplugin_phonon")]
+#endif
+ public static extern void iplUnitySetHRTFDisabled(bool disabled);
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudio.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudio.cs.meta
new file mode 100644
index 00000000..8a19be27
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudio.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: faab0996f33b3304faccb7f9f8c48dc9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioAmbisonicSource.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioAmbisonicSource.cs
new file mode 100644
index 00000000..f3018b3d
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioAmbisonicSource.cs
@@ -0,0 +1,74 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ [AddComponentMenu("Steam Audio/Steam Audio Ambisonic Source")]
+ [RequireComponent(typeof(AudioSource))]
+ public class SteamAudioAmbisonicSource : MonoBehaviour
+ {
+ [Header("HRTF Settings")]
+ public bool applyHRTF = true;
+
+ AudioEngineAmbisonicSource mAudioEngineAmbisonicSource = null;
+
+ private void Awake()
+ {
+ mAudioEngineAmbisonicSource = AudioEngineAmbisonicSource.Create(SteamAudioSettings.Singleton.audioEngine);
+ if (mAudioEngineAmbisonicSource != null)
+ {
+ mAudioEngineAmbisonicSource.Initialize(gameObject);
+ mAudioEngineAmbisonicSource.UpdateParameters(this);
+ }
+ }
+
+ private void Start()
+ {
+ if (mAudioEngineAmbisonicSource != null)
+ {
+ mAudioEngineAmbisonicSource.UpdateParameters(this);
+ }
+ }
+
+ private void OnDestroy()
+ {
+ if (mAudioEngineAmbisonicSource != null)
+ {
+ mAudioEngineAmbisonicSource.Destroy();
+ }
+ }
+
+ private void OnEnable()
+ {
+ if (mAudioEngineAmbisonicSource != null)
+ {
+ mAudioEngineAmbisonicSource.UpdateParameters(this);
+ }
+ }
+
+ private void Update()
+ {
+ if (mAudioEngineAmbisonicSource != null)
+ {
+ mAudioEngineAmbisonicSource.UpdateParameters(this);
+ }
+ }
+
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioAmbisonicSource.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioAmbisonicSource.cs.meta
new file mode 100644
index 00000000..9e402b20
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioAmbisonicSource.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fe05866fd4e732246be6461a576ebcb0
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedListener.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedListener.cs
new file mode 100644
index 00000000..cac4028e
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedListener.cs
@@ -0,0 +1,158 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ [AddComponentMenu("Steam Audio/Steam Audio Baked Listener")]
+ public class SteamAudioBakedListener : MonoBehaviour
+ {
+ [Header("Baked Static Listener Settings")]
+ [Range(0.0f, 1000.0f)]
+ public float influenceRadius = 1000.0f;
+ public bool useAllProbeBatches = false;
+ public SteamAudioProbeBatch[] probeBatches = null;
+
+ [SerializeField]
+ int mTotalDataSize = 0;
+ [SerializeField]
+ int[] mProbeDataSizes = null;
+ [SerializeField]
+ BakedDataIdentifier mIdentifier = new BakedDataIdentifier { };
+ [SerializeField]
+ SteamAudioProbeBatch[] mProbeBatchesUsed = null;
+
+#if STEAMAUDIO_ENABLED
+ public int GetTotalDataSize()
+ {
+ return mTotalDataSize;
+ }
+
+ public int[] GetProbeDataSizes()
+ {
+ return mProbeDataSizes;
+ }
+
+ public int GetSizeForProbeBatch(int index)
+ {
+ return mProbeDataSizes[index];
+ }
+
+ public SteamAudioProbeBatch[] GetProbeBatchesUsed()
+ {
+ if (mProbeBatchesUsed == null)
+ {
+ CacheProbeBatchesUsed();
+ }
+
+ return mProbeBatchesUsed;
+ }
+
+ public BakedDataIdentifier GetBakedDataIdentifier()
+ {
+ var identifier = new BakedDataIdentifier { };
+ identifier.type = BakedDataType.Reflections;
+ identifier.variation = BakedDataVariation.StaticListener;
+ identifier.endpointInfluence.center = Common.ConvertVector(transform.position);
+ identifier.endpointInfluence.radius = influenceRadius;
+ return identifier;
+ }
+
+ private void OnDrawGizmosSelected()
+ {
+ var oldColor = Gizmos.color;
+ var oldMatrix = Gizmos.matrix;
+
+ Gizmos.color = Color.yellow;
+ Gizmos.DrawWireSphere(transform.position, influenceRadius);
+
+ Gizmos.color = Color.magenta;
+
+ if (mProbeBatchesUsed != null)
+ {
+ foreach (var probeBatch in mProbeBatchesUsed)
+ {
+ if (probeBatch == null)
+ continue;
+
+ Gizmos.matrix = probeBatch.transform.localToWorldMatrix;
+ Gizmos.DrawWireCube(new UnityEngine.Vector3(0, 0, 0), new UnityEngine.Vector3(1, 1, 1));
+ }
+ }
+
+ Gizmos.matrix = oldMatrix;
+ Gizmos.color = oldColor;
+ }
+
+ public void UpdateBakedDataStatistics()
+ {
+ if (mProbeBatchesUsed == null)
+ return;
+
+ mProbeDataSizes = new int[mProbeBatchesUsed.Length];
+ mTotalDataSize = 0;
+
+ for (var i = 0; i < mProbeBatchesUsed.Length; ++i)
+ {
+ mProbeDataSizes[i] = mProbeBatchesUsed[i].GetSizeForLayer(mIdentifier);
+ mTotalDataSize += mProbeDataSizes[i];
+ }
+ }
+
+ public void BeginBake()
+ {
+ CacheIdentifier();
+ CacheProbeBatchesUsed();
+
+ var tasks = new BakedDataTask[1];
+ tasks[0].gameObject = gameObject;
+ tasks[0].component = this;
+ tasks[0].name = gameObject.name;
+ tasks[0].identifier = mIdentifier;
+#if UNITY_2020_3_OR_NEWER
+ tasks[0].probeBatches = (useAllProbeBatches) ? FindObjectsByType(FindObjectsSortMode.None) : probeBatches;
+#else
+ tasks[0].probeBatches = (useAllProbeBatches) ? FindObjectsOfType() : probeBatches;
+#endif
+ tasks[0].probeBatchNames = new string[tasks[0].probeBatches.Length];
+ tasks[0].probeBatchAssets = new SerializedData[tasks[0].probeBatches.Length];
+ for (var i = 0; i < tasks[0].probeBatchNames.Length; ++i)
+ {
+ tasks[0].probeBatchNames[i] = tasks[0].probeBatches[i].gameObject.name;
+ tasks[0].probeBatchAssets[i] = tasks[0].probeBatches[i].GetAsset();
+ }
+
+ Baker.BeginBake(tasks);
+ }
+
+ void CacheIdentifier()
+ {
+ mIdentifier = GetBakedDataIdentifier();
+ }
+
+ void CacheProbeBatchesUsed()
+ {
+#if UNITY_2020_3_OR_NEWER
+ mProbeBatchesUsed = (useAllProbeBatches) ? FindObjectsByType(FindObjectsSortMode.None) : probeBatches;
+#else
+ mProbeBatchesUsed = (useAllProbeBatches) ? FindObjectsOfType() : probeBatches;
+#endif
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedListener.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedListener.cs.meta
new file mode 100644
index 00000000..744db8ab
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedListener.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3d1a2bdfdee8e5b48a9949c674b73640
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedSource.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedSource.cs
new file mode 100644
index 00000000..68a59e5f
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedSource.cs
@@ -0,0 +1,158 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ [AddComponentMenu("Steam Audio/Steam Audio Baked Source")]
+ public class SteamAudioBakedSource : MonoBehaviour
+ {
+ [Header("Baked Static Source Settings")]
+ [Range(0.0f, 1000.0f)]
+ public float influenceRadius = 1000.0f;
+ public bool useAllProbeBatches = false;
+ public SteamAudioProbeBatch[] probeBatches = null;
+
+ [SerializeField]
+ int mTotalDataSize = 0;
+ [SerializeField]
+ int[] mProbeDataSizes = null;
+ [SerializeField]
+ BakedDataIdentifier mIdentifier = new BakedDataIdentifier { };
+ [SerializeField]
+ SteamAudioProbeBatch[] mProbeBatchesUsed = null;
+
+#if STEAMAUDIO_ENABLED
+ public int GetTotalDataSize()
+ {
+ return mTotalDataSize;
+ }
+
+ public int[] GetProbeDataSizes()
+ {
+ return mProbeDataSizes;
+ }
+
+ public int GetSizeForProbeBatch(int index)
+ {
+ return mProbeDataSizes[index];
+ }
+
+ public SteamAudioProbeBatch[] GetProbeBatchesUsed()
+ {
+ if (mProbeBatchesUsed == null)
+ {
+ CacheProbeBatchesUsed();
+ }
+
+ return mProbeBatchesUsed;
+ }
+
+ public BakedDataIdentifier GetBakedDataIdentifier()
+ {
+ var identifier = new BakedDataIdentifier { };
+ identifier.type = BakedDataType.Reflections;
+ identifier.variation = BakedDataVariation.StaticSource;
+ identifier.endpointInfluence.center = Common.ConvertVector(transform.position);
+ identifier.endpointInfluence.radius = influenceRadius;
+ return identifier;
+ }
+
+ private void OnDrawGizmosSelected()
+ {
+ var oldColor = Gizmos.color;
+ var oldMatrix = Gizmos.matrix;
+
+ Gizmos.color = Color.yellow;
+ Gizmos.DrawWireSphere(transform.position, influenceRadius);
+
+ Gizmos.color = Color.magenta;
+
+ if (mProbeBatchesUsed != null)
+ {
+ foreach (var probeBatch in mProbeBatchesUsed)
+ {
+ if (probeBatch == null)
+ continue;
+
+ Gizmos.matrix = probeBatch.transform.localToWorldMatrix;
+ Gizmos.DrawWireCube(new UnityEngine.Vector3(0, 0, 0), new UnityEngine.Vector3(1, 1, 1));
+ }
+ }
+
+ Gizmos.matrix = oldMatrix;
+ Gizmos.color = oldColor;
+ }
+
+ public void UpdateBakedDataStatistics()
+ {
+ if (mProbeBatchesUsed == null)
+ return;
+
+ mProbeDataSizes = new int[mProbeBatchesUsed.Length];
+ mTotalDataSize = 0;
+
+ for (var i = 0; i < mProbeBatchesUsed.Length; ++i)
+ {
+ mProbeDataSizes[i] = mProbeBatchesUsed[i].GetSizeForLayer(mIdentifier);
+ mTotalDataSize += mProbeDataSizes[i];
+ }
+ }
+
+ public void BeginBake()
+ {
+ CacheIdentifier();
+ CacheProbeBatchesUsed();
+
+ var tasks = new BakedDataTask[1];
+ tasks[0].gameObject = gameObject;
+ tasks[0].component = this;
+ tasks[0].name = gameObject.name;
+ tasks[0].identifier = mIdentifier;
+#if UNITY_2020_3_OR_NEWER
+ tasks[0].probeBatches = (useAllProbeBatches) ? FindObjectsByType(FindObjectsSortMode.None) : probeBatches;
+#else
+ tasks[0].probeBatches = (useAllProbeBatches) ? FindObjectsOfType() : probeBatches;
+#endif
+ tasks[0].probeBatchNames = new string[tasks[0].probeBatches.Length];
+ tasks[0].probeBatchAssets = new SerializedData[tasks[0].probeBatches.Length];
+ for (var i = 0; i < tasks[0].probeBatchNames.Length; ++i)
+ {
+ tasks[0].probeBatchNames[i] = tasks[0].probeBatches[i].gameObject.name;
+ tasks[0].probeBatchAssets[i] = tasks[0].probeBatches[i].GetAsset();
+ }
+
+ Baker.BeginBake(tasks);
+ }
+
+ void CacheIdentifier()
+ {
+ mIdentifier = GetBakedDataIdentifier();
+ }
+
+ void CacheProbeBatchesUsed()
+ {
+#if UNITY_2020_3_OR_NEWER
+ mProbeBatchesUsed = (useAllProbeBatches) ? FindObjectsByType(FindObjectsSortMode.None) : probeBatches;
+#else
+ mProbeBatchesUsed = (useAllProbeBatches) ? FindObjectsOfType() : probeBatches;
+#endif
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedSource.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedSource.cs.meta
new file mode 100644
index 00000000..6cff2a42
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioBakedSource.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8ea378497d2d9e847898c57b9eb3fb94
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioDynamicObject.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioDynamicObject.cs
new file mode 100644
index 00000000..b4cd741c
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioDynamicObject.cs
@@ -0,0 +1,82 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ [AddComponentMenu("Steam Audio/Steam Audio Dynamic Object")]
+ public class SteamAudioDynamicObject : MonoBehaviour
+ {
+ [Header("Export Settings")]
+ public SerializedData asset = null;
+
+#if STEAMAUDIO_ENABLED
+ InstancedMesh mInstancedMesh = null;
+
+ private void OnDestroy()
+ {
+ SteamAudioManager.UnloadDynamicObject(this);
+
+ if (mInstancedMesh != null)
+ {
+ mInstancedMesh.Release();
+ }
+ }
+
+ private void OnEnable()
+ {
+ if (mInstancedMesh != null)
+ {
+ mInstancedMesh.AddToScene(SteamAudioManager.CurrentScene);
+ SteamAudioManager.ScheduleCommitScene();
+ }
+ }
+
+ private void OnDisable()
+ {
+ if (mInstancedMesh != null && SteamAudioManager.CurrentScene != null)
+ {
+ mInstancedMesh.RemoveFromScene(SteamAudioManager.CurrentScene);
+ SteamAudioManager.ScheduleCommitScene();
+ }
+ }
+
+ private void Update()
+ {
+ if (mInstancedMesh == null && asset != null)
+ {
+ mInstancedMesh = SteamAudioManager.LoadDynamicObject(this, SteamAudioManager.CurrentScene, SteamAudioManager.Context);
+
+ if (enabled)
+ {
+ mInstancedMesh.AddToScene(SteamAudioManager.CurrentScene);
+ SteamAudioManager.ScheduleCommitScene();
+ }
+ }
+
+ // Only update the dynamic object if it has actually move this frame
+ if (transform.hasChanged)
+ {
+ mInstancedMesh.UpdateTransform(SteamAudioManager.CurrentScene, transform);
+ SteamAudioManager.ScheduleCommitScene();
+ transform.hasChanged = false;
+ }
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioDynamicObject.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioDynamicObject.cs.meta
new file mode 100644
index 00000000..5ad4b517
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioDynamicObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2fb43d10a308b2f46ad4561774f97e52
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioGeometry.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioGeometry.cs
new file mode 100644
index 00000000..9fe63c06
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioGeometry.cs
@@ -0,0 +1,74 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+
+namespace SteamAudio
+{
+ [AddComponentMenu("Steam Audio/Steam Audio Geometry")]
+ public class SteamAudioGeometry : MonoBehaviour
+ {
+ [Header("Material Settings")]
+ public SteamAudioMaterial material = null;
+ [Header("Export Settings")]
+ public bool exportAllChildren = false;
+ [Header("Terrain Settings")]
+ [Range(0, 10)]
+ public int terrainSimplificationLevel = 0;
+
+#if STEAMAUDIO_ENABLED
+ public int GetNumVertices()
+ {
+ if (exportAllChildren)
+ {
+ var objects = SteamAudioManager.GetGameObjectsForExport(gameObject);
+
+ var numVertices = 0;
+ foreach (var obj in objects)
+ {
+ numVertices += SteamAudioManager.GetNumVertices(obj);
+ }
+
+ return numVertices;
+ }
+ else
+ {
+ return SteamAudioManager.GetNumVertices(gameObject);
+ }
+ }
+
+ public int GetNumTriangles()
+ {
+ if (exportAllChildren)
+ {
+ var objects = SteamAudioManager.GetGameObjectsForExport(gameObject);
+
+ var numTriangles = 0;
+ foreach (var obj in objects)
+ {
+ numTriangles += SteamAudioManager.GetNumTriangles(obj);
+ }
+
+ return numTriangles;
+ }
+ else
+ {
+ return SteamAudioManager.GetNumTriangles(gameObject);
+ }
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioGeometry.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioGeometry.cs.meta
new file mode 100644
index 00000000..41cbce3e
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioGeometry.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e829c87dc2a2ed2419c5f67848317fe4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences:
+ - material: {fileID: 11400000, guid: a086f686223eed942816c70be67841b0, type: 2}
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioListener.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioListener.cs
new file mode 100644
index 00000000..88364334
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioListener.cs
@@ -0,0 +1,247 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public enum ReverbType
+ {
+ Realtime,
+ Baked
+ }
+
+ [AddComponentMenu("Steam Audio/Steam Audio Listener")]
+ public class SteamAudioListener : MonoBehaviour
+ {
+ [Header("Baked Static Listener Settings")]
+ public SteamAudioBakedListener currentBakedListener = null;
+
+ [Header("Reverb Settings")]
+ public bool applyReverb = false;
+ public ReverbType reverbType = ReverbType.Realtime;
+
+ [Header("Baked Reverb Settings")]
+ public bool useAllProbeBatches = false;
+ public SteamAudioProbeBatch[] probeBatches = null;
+
+ [SerializeField]
+ int mTotalDataSize = 0;
+ [SerializeField]
+ int[] mProbeDataSizes = null;
+ [SerializeField]
+ BakedDataIdentifier mIdentifier = new BakedDataIdentifier { };
+ [SerializeField]
+ SteamAudioProbeBatch[] mProbeBatchesUsed = null;
+
+#if STEAMAUDIO_ENABLED
+ Simulator mSimulator = null;
+ Source mSource = null;
+
+ public int GetTotalDataSize()
+ {
+ return mTotalDataSize;
+ }
+
+ public int[] GetProbeDataSizes()
+ {
+ return mProbeDataSizes;
+ }
+
+ public int GetSizeForProbeBatch(int index)
+ {
+ return mProbeDataSizes[index];
+ }
+
+ public SteamAudioProbeBatch[] GetProbeBatchesUsed()
+ {
+ if (mProbeBatchesUsed == null)
+ {
+ CacheProbeBatchesUsed();
+ }
+
+ return mProbeBatchesUsed;
+ }
+
+ private void Awake()
+ {
+ Reinitialize();
+ }
+
+ public void Reinitialize()
+ {
+ mSimulator = SteamAudioManager.Simulator;
+
+ var settings = SteamAudioManager.GetSimulationSettings(false);
+ mSource = new Source(SteamAudioManager.Simulator, settings);
+
+ SteamAudioManager.GetAudioEngineState().SetReverbSource(mSource);
+ }
+
+ private void OnDestroy()
+ {
+ if (mSource != null)
+ {
+ mSource.Release();
+ }
+ }
+
+ private void Start()
+ {
+ SteamAudioManager.GetAudioEngineState().SetReverbSource(mSource);
+ }
+
+ private void OnEnable()
+ {
+ if (applyReverb)
+ {
+ mSource.AddToSimulator(mSimulator);
+ SteamAudioManager.AddListener(this);
+ SteamAudioManager.GetAudioEngineState().SetReverbSource(mSource);
+ }
+ }
+
+ private void OnDisable()
+ {
+ if (applyReverb)
+ {
+ SteamAudioManager.RemoveListener(this);
+ mSource.RemoveFromSimulator(mSimulator);
+ SteamAudioManager.GetAudioEngineState().SetReverbSource(mSource);
+ }
+ }
+
+ private void Update()
+ {
+ SteamAudioManager.GetAudioEngineState().SetReverbSource(mSource);
+ }
+
+ public BakedDataIdentifier GetBakedDataIdentifier()
+ {
+ var identifier = new BakedDataIdentifier { };
+ identifier.type = BakedDataType.Reflections;
+ identifier.variation = BakedDataVariation.Reverb;
+ return identifier;
+ }
+
+ public void SetInputs(SimulationFlags flags)
+ {
+ var inputs = new SimulationInputs { };
+ inputs.source.origin = Common.ConvertVector(transform.position);
+ inputs.source.ahead = Common.ConvertVector(transform.forward);
+ inputs.source.up = Common.ConvertVector(transform.up);
+ inputs.source.right = Common.ConvertVector(transform.right);
+ inputs.distanceAttenuationModel.type = DistanceAttenuationModelType.Default;
+ inputs.airAbsorptionModel.type = AirAbsorptionModelType.Default;
+ inputs.reverbScaleLow = 1.0f;
+ inputs.reverbScaleMid = 1.0f;
+ inputs.reverbScaleHigh = 1.0f;
+ inputs.hybridReverbTransitionTime = SteamAudioSettings.Singleton.hybridReverbTransitionTime;
+ inputs.hybridReverbOverlapPercent = SteamAudioSettings.Singleton.hybridReverbOverlapPercent / 100.0f;
+ inputs.baked = (reverbType != ReverbType.Realtime) ? Bool.True : Bool.False;
+ if (reverbType == ReverbType.Baked)
+ {
+ inputs.bakedDataIdentifier = GetBakedDataIdentifier();
+ }
+
+ inputs.flags = 0;
+ if (applyReverb)
+ {
+ inputs.flags = inputs.flags | SimulationFlags.Reflections;
+ }
+
+ inputs.directFlags = 0;
+
+ mSource.SetInputs(flags, inputs);
+ }
+
+ public void UpdateOutputs(SimulationFlags flags)
+ {}
+
+ private void OnDrawGizmosSelected()
+ {
+ var oldColor = Gizmos.color;
+ var oldMatrix = Gizmos.matrix;
+
+ Gizmos.color = Color.magenta;
+
+ if (mProbeBatchesUsed != null)
+ {
+ foreach (var probeBatch in mProbeBatchesUsed)
+ {
+ if (probeBatch == null)
+ continue;
+
+ Gizmos.matrix = probeBatch.transform.localToWorldMatrix;
+ Gizmos.DrawWireCube(new UnityEngine.Vector3(0, 0, 0), new UnityEngine.Vector3(1, 1, 1));
+ }
+ }
+
+ Gizmos.matrix = oldMatrix;
+ Gizmos.color = oldColor;
+ }
+
+ public void UpdateBakedDataStatistics()
+ {
+ if (mProbeBatchesUsed == null)
+ return;
+
+ mProbeDataSizes = new int[mProbeBatchesUsed.Length];
+ mTotalDataSize = 0;
+
+ for (var i = 0; i < mProbeBatchesUsed.Length; ++i)
+ {
+ mProbeDataSizes[i] = mProbeBatchesUsed[i].GetSizeForLayer(mIdentifier);
+ mTotalDataSize += mProbeDataSizes[i];
+ }
+ }
+
+ public void BeginBake()
+ {
+ CacheIdentifier();
+ CacheProbeBatchesUsed();
+
+ var tasks = new BakedDataTask[1];
+ tasks[0].gameObject = gameObject;
+ tasks[0].component = this;
+ tasks[0].name = gameObject.name;
+ tasks[0].identifier = mIdentifier;
+ tasks[0].probeBatches = (useAllProbeBatches) ? FindObjectsOfType() : probeBatches;
+ tasks[0].probeBatchNames = new string[tasks[0].probeBatches.Length];
+ tasks[0].probeBatchAssets = new SerializedData[tasks[0].probeBatches.Length];
+ for (var i = 0; i < tasks[0].probeBatchNames.Length; ++i)
+ {
+ tasks[0].probeBatchNames[i] = tasks[0].probeBatches[i].gameObject.name;
+ tasks[0].probeBatchAssets[i] = tasks[0].probeBatches[i].GetAsset();
+ }
+
+ Baker.BeginBake(tasks);
+ }
+
+ void CacheIdentifier()
+ {
+ mIdentifier.type = BakedDataType.Reflections;
+ mIdentifier.variation = BakedDataVariation.Reverb;
+ }
+
+ void CacheProbeBatchesUsed()
+ {
+ mProbeBatchesUsed = (useAllProbeBatches) ? FindObjectsOfType() : probeBatches;
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioListener.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioListener.cs.meta
new file mode 100644
index 00000000..3ffc3631
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioListener.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6fd9ebf1401392e4bbd47fea32f47642
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioManager.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioManager.cs
new file mode 100644
index 00000000..18d24452
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioManager.cs
@@ -0,0 +1,2091 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using System.Threading;
+using AOT;
+using UnityEngine;
+using UnityEngine.SceneManagement;
+#if UNITY_EDITOR
+using UnityEditor;
+using UnityEditor.SceneManagement;
+using System.IO;
+#if UNITY_2019_2_OR_NEWER
+using UnityEditor.PackageManager;
+#endif
+#endif
+
+namespace SteamAudio
+{
+ public enum ManagerInitReason
+ {
+ ExportingScene,
+ GeneratingProbes,
+ EditingProbes,
+ Baking,
+ Playing
+ }
+
+ /**
+ * Maintains global state for Steam Audio, manages simulations, and passes simulation results to the audio engine.
+ */
+ public class SteamAudioManager : MonoBehaviour
+ {
+ [Header("HRTF Settings")]
+ public int currentHRTF = 0;
+
+#if STEAMAUDIO_ENABLED
+ public string[] hrtfNames = null;
+
+ int mNumCPUCores = 0;
+ AudioSettings mAudioSettings;
+ Context mContext = null;
+ HRTF[] mHRTFs = null;
+ EmbreeDevice mEmbreeDevice = null;
+ bool mEmbreeInitFailed = false;
+ OpenCLDevice mOpenCLDevice = null;
+ bool mOpenCLInitFailed = false;
+ RadeonRaysDevice mRadeonRaysDevice = null;
+ bool mRadeonRaysInitFailed = false;
+ TrueAudioNextDevice mTrueAudioNextDevice = null;
+ bool mTrueAudioNextInitFailed = false;
+ Scene mCurrentScene = null;
+ Dictionary mDynamicObjectRefCounts = new Dictionary();
+ Dictionary mDynamicObjects = new Dictionary();
+ Simulator mSimulator = null;
+ AudioEngineState mAudioEngineState = null;
+ Transform mListener = null;
+ SteamAudioListener mListenerComponent = null;
+ HashSet mSources = new HashSet();
+ HashSet mListeners = new HashSet();
+ RaycastHit[] mRayHits = new RaycastHit[1];
+ IntPtr mMaterialBuffer = IntPtr.Zero;
+ Thread mSimulationThread = null;
+ EventWaitHandle mSimulationThreadWaitHandle = null;
+ bool mStopSimulationThread = false;
+ bool mSimulationCompleted = false;
+ float mSimulationUpdateTimeElapsed = 0.0f;
+ bool mSceneCommitRequired = false;
+ Camera mMainCamera;
+
+ static SteamAudioManager sSingleton = null;
+
+ public static SteamAudioManager Singleton
+ {
+ get
+ {
+ return sSingleton;
+ }
+ }
+
+ public static Context Context
+ {
+ get
+ {
+ return sSingleton.mContext;
+ }
+ }
+
+ public static HRTF CurrentHRTF
+ {
+ get
+ {
+ return sSingleton.mHRTFs[sSingleton.currentHRTF];
+ }
+ }
+
+ public static IntPtr EmbreeDevice
+ {
+ get
+ {
+ return sSingleton.mEmbreeDevice.Get();
+ }
+ }
+
+ public static IntPtr OpenCLDevice
+ {
+ get
+ {
+ return sSingleton.mOpenCLDevice.Get();
+ }
+ }
+
+ public static IntPtr RadeonRaysDevice
+ {
+ get
+ {
+ return sSingleton.mRadeonRaysDevice.Get();
+ }
+ }
+
+ public static IntPtr TrueAudioNextDevice
+ {
+ get
+ {
+ return sSingleton.mTrueAudioNextDevice.Get();
+ }
+ }
+
+ public static Scene CurrentScene
+ {
+ get
+ {
+ return sSingleton.mCurrentScene;
+ }
+ }
+
+ public static Simulator Simulator
+ {
+ get
+ {
+ return sSingleton.mSimulator;
+ }
+ }
+
+ public static AudioSettings AudioSettings
+ {
+ get
+ {
+ return sSingleton.mAudioSettings;
+ }
+ }
+
+ public static AudioEngineState GetAudioEngineState()
+ {
+ return sSingleton.mAudioEngineState;
+ }
+
+ public static SteamAudioListener GetSteamAudioListener()
+ {
+ if (sSingleton.mListenerComponent == null)
+ return null;
+
+ return sSingleton.mListenerComponent;
+ }
+
+ public int NumThreadsForCPUCorePercentage(int percentage)
+ {
+ return (int)Mathf.Max(1, (percentage * mNumCPUCores) / 100.0f);
+ }
+
+ public static SceneType GetSceneType()
+ {
+ var sceneType = SteamAudioSettings.Singleton.sceneType;
+
+ if ((sceneType == SceneType.Embree && sSingleton.mEmbreeInitFailed) ||
+ (sceneType == SceneType.RadeonRays && (sSingleton.mOpenCLInitFailed || sSingleton.mRadeonRaysInitFailed)))
+ {
+ sceneType = SceneType.Default;
+ }
+
+ return sceneType;
+ }
+
+ public static ReflectionEffectType GetReflectionEffectType()
+ {
+ var reflectionEffectType = SteamAudioSettings.Singleton.reflectionEffectType;
+
+ if ((reflectionEffectType == ReflectionEffectType.TrueAudioNext && (sSingleton.mOpenCLInitFailed || sSingleton.mTrueAudioNextInitFailed)))
+ {
+ reflectionEffectType = ReflectionEffectType.Convolution;
+ }
+
+ return reflectionEffectType;
+ }
+
+ public static PerspectiveCorrection GetPerspectiveCorrection()
+ {
+ if (!SteamAudioSettings.Singleton.perspectiveCorrection)
+ return default;
+
+ var mainCamera = Singleton.GetMainCamera();
+ PerspectiveCorrection correction = default;
+ if (mainCamera != null && mainCamera.aspect > .0f)
+ {
+ correction.enabled = SteamAudioSettings.Singleton.perspectiveCorrection ? Bool.True : Bool.False;
+ correction.xfactor = 1.0f * SteamAudioSettings.Singleton.perspectiveCorrectionFactor;
+ correction.yfactor = correction.xfactor / mainCamera.aspect;
+
+ // Camera space matches OpenGL convention. No need to transform matrix to ConvertTransform.
+ correction.transform = Common.TransformMatrix(mainCamera.projectionMatrix * mainCamera.worldToCameraMatrix);
+ }
+
+ return correction;
+ }
+
+ public Camera GetMainCamera()
+ {
+ return mMainCamera;
+ }
+
+ public static SimulationSettings GetSimulationSettings(bool baking)
+ {
+ var simulationSettings = new SimulationSettings { };
+ simulationSettings.sceneType = GetSceneType();
+ simulationSettings.reflectionType = GetReflectionEffectType();
+
+ if (baking)
+ {
+ simulationSettings.flags = SimulationFlags.Reflections | SimulationFlags.Pathing;
+ simulationSettings.maxNumRays = SteamAudioSettings.Singleton.bakingRays;
+ simulationSettings.numDiffuseSamples = 1024;
+ simulationSettings.maxDuration = SteamAudioSettings.Singleton.bakingDuration;
+ simulationSettings.maxOrder = SteamAudioSettings.Singleton.bakingAmbisonicOrder;
+ simulationSettings.numThreads = sSingleton.NumThreadsForCPUCorePercentage(SteamAudioSettings.Singleton.bakingCPUCoresPercentage);
+ simulationSettings.rayBatchSize = 16;
+ }
+ else
+ {
+ simulationSettings.flags = SimulationFlags.Direct | SimulationFlags.Reflections | SimulationFlags.Pathing;
+ simulationSettings.maxNumOcclusionSamples = SteamAudioSettings.Singleton.maxOcclusionSamples;
+ simulationSettings.maxNumRays = SteamAudioSettings.Singleton.realTimeRays;
+ simulationSettings.numDiffuseSamples = 1024;
+ simulationSettings.maxDuration = (simulationSettings.reflectionType == ReflectionEffectType.TrueAudioNext) ? SteamAudioSettings.Singleton.TANDuration : SteamAudioSettings.Singleton.realTimeDuration;
+ simulationSettings.maxOrder = (simulationSettings.reflectionType == ReflectionEffectType.TrueAudioNext) ? SteamAudioSettings.Singleton.TANAmbisonicOrder : SteamAudioSettings.Singleton.realTimeAmbisonicOrder;
+ simulationSettings.maxNumSources = (simulationSettings.reflectionType == ReflectionEffectType.TrueAudioNext) ? SteamAudioSettings.Singleton.TANMaxSources : SteamAudioSettings.Singleton.realTimeMaxSources;
+ simulationSettings.numThreads = sSingleton.NumThreadsForCPUCorePercentage(SteamAudioSettings.Singleton.realTimeCPUCoresPercentage);
+ simulationSettings.rayBatchSize = 16;
+ simulationSettings.numVisSamples = SteamAudioSettings.Singleton.bakingVisibilitySamples;
+ simulationSettings.samplingRate = AudioSettings.samplingRate;
+ simulationSettings.frameSize = AudioSettings.frameSize;
+ }
+
+ if (simulationSettings.sceneType == SceneType.RadeonRays)
+ {
+ simulationSettings.openCLDevice = sSingleton.mOpenCLDevice.Get();
+ simulationSettings.radeonRaysDevice = sSingleton.mRadeonRaysDevice.Get();
+ }
+
+ if (!baking && simulationSettings.reflectionType == ReflectionEffectType.TrueAudioNext)
+ {
+ simulationSettings.openCLDevice = sSingleton.mOpenCLDevice.Get();
+ simulationSettings.tanDevice = sSingleton.mTrueAudioNextDevice.Get();
+ }
+
+ return simulationSettings;
+ }
+
+ // This method is called at app startup (see above).
+ void OnApplicationStart(ManagerInitReason reason)
+ {
+ if (reason == ManagerInitReason.Playing)
+ {
+ SceneManager.sceneLoaded += OnSceneLoaded;
+ SceneManager.sceneUnloaded += OnSceneUnloaded;
+ }
+
+ mNumCPUCores = SystemInfo.processorCount;
+
+ mContext = new Context();
+
+ if (reason == ManagerInitReason.Playing)
+ {
+ mAudioSettings = AudioEngineStateHelpers.Create(SteamAudioSettings.Singleton.audioEngine).GetAudioSettings();
+
+ mHRTFs = new HRTF[SteamAudioSettings.Singleton.SOFAFiles.Length + 1];
+
+ hrtfNames = new string[SteamAudioSettings.Singleton.SOFAFiles.Length + 1];
+ hrtfNames[0] = "Default";
+ for (var i = 0; i < SteamAudioSettings.Singleton.SOFAFiles.Length; ++i)
+ {
+ if (SteamAudioSettings.Singleton.SOFAFiles[i])
+ hrtfNames[i + 1] = SteamAudioSettings.Singleton.SOFAFiles[i].sofaName;
+ else
+ hrtfNames[i + 1] = null;
+ }
+
+ mHRTFs[0] = new HRTF(mContext, mAudioSettings, null, null, SteamAudioSettings.Singleton.hrtfVolumeGainDB, SteamAudioSettings.Singleton.hrtfNormalizationType);
+
+ for (var i = 0; i < SteamAudioSettings.Singleton.SOFAFiles.Length; ++i)
+ {
+ if (SteamAudioSettings.Singleton.SOFAFiles[i])
+ {
+ mHRTFs[i + 1] = new HRTF(mContext, mAudioSettings,
+ SteamAudioSettings.Singleton.SOFAFiles[i].sofaName,
+ SteamAudioSettings.Singleton.SOFAFiles[i].data,
+ SteamAudioSettings.Singleton.SOFAFiles[i].volume,
+ SteamAudioSettings.Singleton.SOFAFiles[i].normType);
+ }
+ else
+ {
+ Debug.LogWarning("SOFA Asset File Missing. Assigning default HRTF.");
+ mHRTFs[i + 1] = mHRTFs[0];
+ }
+ }
+ }
+
+ if (reason != ManagerInitReason.EditingProbes)
+ {
+ if (SteamAudioSettings.Singleton.sceneType == SceneType.Embree)
+ {
+ try
+ {
+ mEmbreeInitFailed = false;
+
+ mEmbreeDevice = new EmbreeDevice(mContext);
+ }
+ catch (Exception e)
+ {
+ mEmbreeInitFailed = true;
+
+ Debug.LogException(e);
+ Debug.LogWarning("Embree initialization failed, reverting to Phonon for ray tracing.");
+ }
+ }
+
+ var requiresTAN = (SteamAudioSettings.Singleton.reflectionEffectType == ReflectionEffectType.TrueAudioNext);
+
+ if (SteamAudioSettings.Singleton.sceneType == SceneType.RadeonRays ||
+ SteamAudioSettings.Singleton.reflectionEffectType == ReflectionEffectType.TrueAudioNext)
+ {
+ try
+ {
+ mOpenCLInitFailed = false;
+
+ mOpenCLDevice = new OpenCLDevice(mContext, SteamAudioSettings.Singleton.deviceType,
+ SteamAudioSettings.Singleton.maxReservedComputeUnits,
+ SteamAudioSettings.Singleton.fractionComputeUnitsForIRUpdate,
+ requiresTAN);
+ }
+ catch (Exception e)
+ {
+ mOpenCLInitFailed = true;
+
+ Debug.LogException(e);
+
+ var warningMessage = "OpenCL initialization failed.";
+ if (SteamAudioSettings.Singleton.sceneType == SceneType.RadeonRays)
+ warningMessage += " Reverting to Phonon for ray tracing.";
+ if (SteamAudioSettings.Singleton.reflectionEffectType == ReflectionEffectType.TrueAudioNext)
+ warningMessage += " Reverting to Convolution for reflection effect processing.";
+
+ Debug.LogWarning(warningMessage);
+ }
+ }
+
+ if (SteamAudioSettings.Singleton.sceneType == SceneType.RadeonRays &&
+ !mOpenCLInitFailed)
+ {
+ try
+ {
+ mRadeonRaysInitFailed = false;
+
+ mRadeonRaysDevice = new RadeonRaysDevice(mOpenCLDevice);
+ }
+ catch (Exception e)
+ {
+ mRadeonRaysInitFailed = true;
+
+ Debug.LogException(e);
+ Debug.LogWarning("Radeon Rays initialization failed, reverting to Phonon for ray tracing.");
+ }
+ }
+
+ if (SteamAudioSettings.Singleton.reflectionEffectType == ReflectionEffectType.TrueAudioNext &&
+ reason == ManagerInitReason.Playing &&
+ !mOpenCLInitFailed)
+ {
+ try
+ {
+ mTrueAudioNextInitFailed = false;
+
+ var frameSize = AudioSettings.frameSize;
+ var irSize = Mathf.CeilToInt(SteamAudioSettings.Singleton.realTimeDuration * AudioSettings.samplingRate);
+ var order = SteamAudioSettings.Singleton.realTimeAmbisonicOrder;
+ var maxSources = SteamAudioSettings.Singleton.TANMaxSources;
+
+ mTrueAudioNextDevice = new TrueAudioNextDevice(mOpenCLDevice, frameSize, irSize,
+ order, maxSources);
+ }
+ catch (Exception e)
+ {
+ mTrueAudioNextInitFailed = true;
+
+ Debug.LogException(e);
+ Debug.LogWarning("TrueAudio Next initialization failed, reverting to Convolution for reflection effect processing.");
+ }
+ }
+ }
+
+ if (reason == ManagerInitReason.Playing)
+ {
+ var simulationSettings = GetSimulationSettings(false);
+ var perspectiveCorrection = GetPerspectiveCorrection();
+
+ mSimulator = new Simulator(mContext, simulationSettings);
+
+ mSimulationThreadWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset);
+
+ mSimulationThread = new Thread(RunSimulation);
+ mSimulationThread.Start();
+
+ mAudioEngineState = AudioEngineState.Create(SteamAudioSettings.Singleton.audioEngine);
+ if (mAudioEngineState != null)
+ {
+ mAudioEngineState.Initialize(mContext.Get(), mHRTFs[0].Get(), simulationSettings, perspectiveCorrection);
+ }
+
+#if UNITY_EDITOR && UNITY_2019_3_OR_NEWER
+ // If the developer has disabled scene reload, SceneManager.sceneLoaded won't fire during initial load
+ if ( EditorSettings.enterPlayModeOptionsEnabled &&
+ EditorSettings.enterPlayModeOptions.HasFlag(EnterPlayModeOptions.DisableSceneReload))
+ {
+ OnSceneLoaded(SceneManager.GetActiveScene(), LoadSceneMode.Single);
+ }
+#endif
+ }
+ }
+
+ // This method is called at app shutdown.
+ void OnApplicationQuit()
+ {
+ ShutDown();
+ }
+
+ // This method is called when a scene is loaded.
+ void OnSceneLoaded(UnityEngine.SceneManagement.Scene scene, LoadSceneMode loadSceneMode)
+ {
+ LoadScene(scene, mContext, additive: (loadSceneMode == LoadSceneMode.Additive));
+
+ NotifyMainCameraChanged();
+ NotifyAudioListenerChanged();
+ }
+
+ // This method is called when a scene is unloaded.
+ void OnSceneUnloaded(UnityEngine.SceneManagement.Scene scene)
+ {
+ RemoveAllDynamicObjects();
+ }
+
+ /** Notifies Steam Audio that the \c AudioListener has changed.
+ *
+ * Call this function when you create a new \c AudioListener component (or its equivalent, if you are using
+ * third-party audio middleware).
+ *
+ * Steam Audio attempts to find the \c AudioListener whenever the scene changes, but if the \c AudioListener
+ * changes dynamically after the scene has been loaded, this function must be called, otherwise simulation
+ * results will be incorrect.
+ *
+ * If the \c AudioListener starts out disabled, but is then enabled after scene load, this function
+ * must be called, because Steam Audio does not consider disabled \c AudioListener components in its initial search.
+ *
+ * Use this function if you want Steam Audio to automatically find the new AudioListener.
+ */
+ public static void NotifyAudioListenerChanged()
+ {
+ NotifyAudioListenerChangedTo(AudioEngineStateHelpers.Create(SteamAudioSettings.Singleton.audioEngine).GetListenerTransform());
+ }
+
+ /** Notifies Steam Audio that the \c AudioListener has changed to a specific \c GameObject.
+ * Call this function when you want to explicitly specify a new \c AudioListener component (or its equivalent, if
+ * you are using third-party audio middleware).
+ *
+ * Steam Audio attempts to find the \c AudioListener whenever the scene changes, but if the \c AudioListener
+ * changes dynamically after the scene has been loaded, this function must be called, otherwise simulation
+ * results will be incorrect.
+ *
+ * If the \c AudioListener starts out disabled, but is then enabled after scene load, this function
+ * must be called, because Steam Audio does not consider disabled \c AudioListener components in its initial search.
+ *
+ * \param[in] listenerTransform The \c Transform component attached to the \c GameObject that contains the \c AudioListener.
+ */
+ public static void NotifyAudioListenerChangedTo(Transform listenerTransform)
+ {
+ sSingleton.mListener = listenerTransform;
+ if (sSingleton.mListener)
+ {
+ sSingleton.mListenerComponent = sSingleton.mListener.GetComponent();
+ }
+ }
+
+ // Call this function when you create or change the main camera.
+ public static void NotifyMainCameraChanged()
+ {
+ sSingleton.mMainCamera = Camera.main;
+ }
+
+ // Call this function to request that changes to a scene be committed. Call only when changes have happened.
+ public static void ScheduleCommitScene()
+ {
+ sSingleton.mSceneCommitRequired = true;
+ }
+
+#if STEAMAUDIO_ENABLED
+ private void LateUpdate()
+ {
+ if (mAudioEngineState == null)
+ return;
+
+ mAudioEngineState.SetHRTFDisabled(SteamAudioSettings.Singleton.hrtfDisabled);
+ var perspectiveCorrection = GetPerspectiveCorrection();
+ mAudioEngineState.SetPerspectiveCorrection(perspectiveCorrection);
+
+ mAudioEngineState.SetHRTF(CurrentHRTF.Get());
+
+ if (mCurrentScene == null || mSimulator == null)
+ return;
+
+ if (mSimulationThread.ThreadState == ThreadState.WaitSleepJoin)
+ {
+ if (mSceneCommitRequired)
+ {
+ mCurrentScene.Commit();
+ mSceneCommitRequired = false;
+ }
+
+ mSimulator.SetScene(mCurrentScene);
+ mSimulator.Commit();
+ }
+
+ var sharedInputs = new SimulationSharedInputs { };
+
+ if (mListener != null)
+ {
+ sharedInputs.listener.origin = Common.ConvertVector(mListener.position);
+ sharedInputs.listener.ahead = Common.ConvertVector(mListener.forward);
+ sharedInputs.listener.up = Common.ConvertVector(mListener.up);
+ sharedInputs.listener.right = Common.ConvertVector(mListener.right);
+ }
+
+ sharedInputs.numRays = SteamAudioSettings.Singleton.realTimeRays;
+ sharedInputs.numBounces = SteamAudioSettings.Singleton.realTimeBounces;
+ sharedInputs.duration = SteamAudioSettings.Singleton.realTimeDuration;
+ sharedInputs.order = SteamAudioSettings.Singleton.realTimeAmbisonicOrder;
+ sharedInputs.irradianceMinDistance = SteamAudioSettings.Singleton.realTimeIrradianceMinDistance;
+ sharedInputs.pathingVisualizationCallback = null;
+ sharedInputs.pathingUserData = IntPtr.Zero;
+
+ mSimulator.SetSharedInputs(SimulationFlags.Direct, sharedInputs);
+
+ foreach (var source in mSources)
+ {
+ source.SetInputs(SimulationFlags.Direct);
+ }
+
+ foreach (var listener in mListeners)
+ {
+ listener.SetInputs(SimulationFlags.Direct);
+ }
+
+ mSimulator.RunDirect();
+
+ foreach (var source in mSources)
+ {
+ source.UpdateOutputs(SimulationFlags.Direct);
+ }
+
+ foreach (var listener in mListeners)
+ {
+ listener.UpdateOutputs(SimulationFlags.Direct);
+ }
+
+ mSimulationUpdateTimeElapsed += Time.deltaTime;
+ if (mSimulationUpdateTimeElapsed < SteamAudioSettings.Singleton.simulationUpdateInterval)
+ return;
+
+ mSimulationUpdateTimeElapsed = 0.0f;
+
+ if (mSimulationThread.ThreadState == ThreadState.WaitSleepJoin)
+ {
+ if (mSimulationCompleted)
+ {
+ mSimulationCompleted = false;
+
+ foreach (var source in mSources)
+ {
+ source.UpdateOutputs(SimulationFlags.Reflections | SimulationFlags.Pathing);
+ }
+
+ foreach (var listener in mListeners)
+ {
+ listener.UpdateOutputs(SimulationFlags.Reflections | SimulationFlags.Pathing);
+ }
+ }
+
+ mSimulator.SetSharedInputs(SimulationFlags.Reflections | SimulationFlags.Pathing, sharedInputs);
+
+ foreach (var source in mSources)
+ {
+ source.SetInputs(SimulationFlags.Reflections | SimulationFlags.Pathing);
+ }
+
+ foreach (var listener in mListeners)
+ {
+ listener.SetInputs(SimulationFlags.Reflections | SimulationFlags.Pathing);
+ }
+
+ if (SteamAudioSettings.Singleton.sceneType == SceneType.Custom)
+ {
+ // The Unity ray tracer must be called from the main thread only, so run the simulation here.
+ // It's not suitable for heavy workloads anyway, so we assume that the performance hit is
+ // acceptable. If not, we recommend switching to one of the other ray tracers.
+ RunSimulationInternal();
+ }
+ else
+ {
+ mSimulationThreadWaitHandle.Set();
+ }
+ }
+ }
+#endif
+
+ void RunSimulationInternal()
+ {
+ if (mSimulator == null)
+ return;
+
+ mSimulator.RunReflections();
+ mSimulator.RunPathing();
+
+ mSimulationCompleted = true;
+ }
+
+ void RunSimulation()
+ {
+ while (!mStopSimulationThread)
+ {
+ mSimulationThreadWaitHandle.WaitOne();
+
+ if (mStopSimulationThread)
+ break;
+
+ RunSimulationInternal();
+ }
+ }
+
+ public static void Initialize(ManagerInitReason reason)
+ {
+ var managerObject = new GameObject("Steam Audio Manager");
+ var manager = managerObject.AddComponent();
+
+ if (reason == ManagerInitReason.Playing)
+ {
+ DontDestroyOnLoad(managerObject);
+ }
+
+ sSingleton = manager;
+
+ manager.OnApplicationStart(reason);
+ }
+
+ public static void ShutDown()
+ {
+ if (sSingleton.mSimulationThread != null)
+ {
+ sSingleton.mStopSimulationThread = true;
+ sSingleton.mSimulationThreadWaitHandle.Set();
+ sSingleton.mSimulationThread.Join();
+ }
+
+ RemoveAllDynamicObjects(force: true);
+ RemoveAllAdditiveScenes();
+
+ if (sSingleton.mAudioEngineState != null)
+ {
+ sSingleton.mAudioEngineState.Destroy();
+ }
+
+ if (sSingleton.mSimulator != null)
+ {
+ sSingleton.mSimulator.Release();
+ sSingleton.mSimulator = null;
+ }
+
+ if (sSingleton.mTrueAudioNextDevice != null)
+ {
+ sSingleton.mTrueAudioNextDevice.Release();
+ sSingleton.mTrueAudioNextDevice = null;
+ }
+
+ if (sSingleton.mRadeonRaysDevice != null)
+ {
+ sSingleton.mRadeonRaysDevice.Release();
+ sSingleton.mRadeonRaysDevice = null;
+ }
+
+ if (sSingleton.mOpenCLDevice != null)
+ {
+ sSingleton.mOpenCLDevice.Release();
+ sSingleton.mOpenCLDevice = null;
+ }
+
+ if (sSingleton.mEmbreeDevice != null)
+ {
+ sSingleton.mEmbreeDevice.Release();
+ sSingleton.mEmbreeDevice = null;
+ }
+
+ if (sSingleton.mHRTFs != null)
+ {
+ for (var i = 0; i < sSingleton.mHRTFs.Length; ++i)
+ {
+ sSingleton.mHRTFs[i].Release();
+ sSingleton.mHRTFs[i] = null;
+ }
+ }
+
+ SceneManager.sceneLoaded -= sSingleton.OnSceneLoaded;
+ SceneManager.sceneUnloaded -= sSingleton.OnSceneUnloaded;
+
+ sSingleton.mContext.Release();
+ sSingleton.mContext = null;
+ }
+
+ public static void Reinitialize()
+ {
+ if (sSingleton.mSimulationThread != null)
+ {
+ sSingleton.mStopSimulationThread = true;
+ sSingleton.mSimulationThreadWaitHandle.Set();
+ sSingleton.mSimulationThread.Join();
+ }
+
+ RemoveAllDynamicObjects(force: true);
+ RemoveAllAdditiveScenes();
+
+ if (sSingleton.mAudioEngineState != null)
+ {
+ sSingleton.mAudioEngineState.Destroy();
+ }
+
+ sSingleton.mSimulator = null;
+
+ UnityEngine.AudioSettings.Reset(UnityEngine.AudioSettings.GetConfiguration());
+
+ if ((sSingleton.mEmbreeDevice == null || sSingleton.mEmbreeDevice.Get() == IntPtr.Zero)
+ && SteamAudioSettings.Singleton.sceneType == SceneType.Embree)
+ {
+ try
+ {
+ sSingleton.mEmbreeInitFailed = false;
+
+ sSingleton.mEmbreeDevice = new EmbreeDevice(sSingleton.mContext);
+ }
+ catch (Exception e)
+ {
+ sSingleton.mEmbreeInitFailed = true;
+
+ Debug.LogException(e);
+ Debug.LogWarning("Embree initialization failed, reverting to Phonon for ray tracing.");
+ }
+ }
+
+ var requiresTAN = (SteamAudioSettings.Singleton.reflectionEffectType == ReflectionEffectType.TrueAudioNext);
+
+ if ((sSingleton.mOpenCLDevice == null || sSingleton.mOpenCLDevice.Get() == IntPtr.Zero) &&
+ (SteamAudioSettings.Singleton.sceneType == SceneType.RadeonRays ||
+ SteamAudioSettings.Singleton.reflectionEffectType == ReflectionEffectType.TrueAudioNext))
+ {
+ try
+ {
+ sSingleton.mOpenCLInitFailed = false;
+
+ sSingleton.mOpenCLDevice = new OpenCLDevice(sSingleton.mContext, SteamAudioSettings.Singleton.deviceType,
+ SteamAudioSettings.Singleton.maxReservedComputeUnits,
+ SteamAudioSettings.Singleton.fractionComputeUnitsForIRUpdate,
+ requiresTAN);
+ }
+ catch (Exception e)
+ {
+ sSingleton.mOpenCLInitFailed = true;
+
+ Debug.LogException(e);
+
+ var warningMessage = "OpenCL initialization failed.";
+ if (SteamAudioSettings.Singleton.sceneType == SceneType.RadeonRays)
+ warningMessage += " Reverting to Phonon for ray tracing.";
+ if (SteamAudioSettings.Singleton.reflectionEffectType == ReflectionEffectType.TrueAudioNext)
+ warningMessage += " Reverting to Convolution for reflection effect processing.";
+
+ Debug.LogWarning(warningMessage);
+ }
+ }
+
+ if ((sSingleton.mRadeonRaysDevice == null || sSingleton.mRadeonRaysDevice.Get() == IntPtr.Zero) &&
+ SteamAudioSettings.Singleton.sceneType == SceneType.RadeonRays &&
+ !sSingleton.mOpenCLInitFailed)
+ {
+ try
+ {
+ sSingleton.mRadeonRaysInitFailed = false;
+
+ sSingleton.mRadeonRaysDevice = new RadeonRaysDevice(sSingleton.mOpenCLDevice);
+ }
+ catch (Exception e)
+ {
+ sSingleton.mRadeonRaysInitFailed = true;
+
+ Debug.LogException(e);
+ Debug.LogWarning("Radeon Rays initialization failed, reverting to Phonon for ray tracing.");
+ }
+ }
+
+ if ((sSingleton.mTrueAudioNextDevice == null || sSingleton.mTrueAudioNextDevice.Get() == IntPtr.Zero) &&
+ SteamAudioSettings.Singleton.reflectionEffectType == ReflectionEffectType.TrueAudioNext &&
+ !sSingleton.mOpenCLInitFailed)
+ {
+ try
+ {
+ sSingleton.mTrueAudioNextInitFailed = false;
+
+ var frameSize = AudioSettings.frameSize;
+ var irSize = Mathf.CeilToInt(SteamAudioSettings.Singleton.realTimeDuration * AudioSettings.samplingRate);
+ var order = SteamAudioSettings.Singleton.realTimeAmbisonicOrder;
+ var maxSources = SteamAudioSettings.Singleton.TANMaxSources;
+
+ sSingleton.mTrueAudioNextDevice = new TrueAudioNextDevice(sSingleton.mOpenCLDevice, frameSize, irSize,
+ order, maxSources);
+ }
+ catch (Exception e)
+ {
+ sSingleton.mTrueAudioNextInitFailed = true;
+
+ Debug.LogException(e);
+ Debug.LogWarning("TrueAudio Next initialization failed, reverting to Convolution for reflection effect processing.");
+ }
+ }
+
+ var simulationSettings = GetSimulationSettings(false);
+ var persPectiveCorrection = GetPerspectiveCorrection();
+
+ sSingleton.mSimulator = new Simulator(sSingleton.mContext, simulationSettings);
+
+ sSingleton.mStopSimulationThread = false;
+ sSingleton.mSimulationThread = new Thread(sSingleton.RunSimulation);
+ sSingleton.mSimulationThread.Start();
+
+ sSingleton.mAudioEngineState = AudioEngineState.Create(SteamAudioSettings.Singleton.audioEngine);
+ if (sSingleton.mAudioEngineState != null)
+ {
+ sSingleton.mAudioEngineState.Initialize(sSingleton.mContext.Get(), sSingleton.mHRTFs[0].Get(), simulationSettings, persPectiveCorrection);
+
+ var listeners = new SteamAudioListener[sSingleton.mListeners.Count];
+ sSingleton.mListeners.CopyTo(listeners);
+ foreach (var listener in listeners)
+ {
+ listener.enabled = false;
+ listener.Reinitialize();
+ listener.enabled = true;
+ }
+ }
+ }
+
+ public static void AddSource(SteamAudioSource source)
+ {
+ sSingleton.mSources.Add(source);
+ }
+
+ public static void RemoveSource(SteamAudioSource source)
+ {
+ sSingleton.mSources.Remove(source);
+ }
+
+ public static void AddListener(SteamAudioListener listener)
+ {
+ sSingleton.mListeners.Add(listener);
+ }
+
+ public static void RemoveListener(SteamAudioListener listener)
+ {
+ sSingleton.mListeners.Remove(listener);
+ }
+
+#if UNITY_EDITOR
+ [MenuItem("Steam Audio/Settings", false, 1)]
+ public static void EditSettings()
+ {
+ Selection.activeObject = SteamAudioSettings.Singleton;
+#if UNITY_2018_2_OR_NEWER
+ EditorApplication.ExecuteMenuItem("Window/General/Inspector");
+#else
+ EditorApplication.ExecuteMenuItem("Window/Inspector");
+#endif
+ }
+
+ [MenuItem("Steam Audio/Export Active Scene", false, 12)]
+ public static void ExportActiveScene()
+ {
+ ExportScene(SceneManager.GetActiveScene(), false);
+ }
+
+ [MenuItem("Steam Audio/Export All Open Scenes", false, 13)]
+ public static void ExportAllOpenScenes()
+ {
+ for (var i = 0; i < SceneManager.sceneCount; ++i)
+ {
+ var scene = SceneManager.GetSceneAt(i);
+
+ EditorUtility.DisplayProgressBar("Steam Audio", string.Format("Exporting scene: {0}", scene.name), (float)i / (float)SceneManager.sceneCount);
+
+ if (!scene.isLoaded)
+ {
+ Debug.LogWarning(string.Format("Scene {0} is not loaded in the hierarchy.", scene.name));
+ continue;
+ }
+
+ ExportScene(scene, false);
+ }
+
+ EditorUtility.DisplayProgressBar("Steam Audio", "", 1.0f);
+ EditorUtility.ClearProgressBar();
+ }
+
+ [MenuItem("Steam Audio/Export All Scenes In Build", false, 14)]
+ public static void ExportAllScenesInBuild()
+ {
+ for (var i = 0; i < SceneManager.sceneCountInBuildSettings; ++i)
+ {
+ var scene = SceneManager.GetSceneByBuildIndex(i);
+
+ EditorUtility.DisplayProgressBar("Steam Audio", string.Format("Exporting scene: {0}", scene.name), (float)i / (float)SceneManager.sceneCountInBuildSettings);
+
+ var shouldClose = false;
+ if (!scene.isLoaded)
+ {
+ scene = EditorSceneManager.OpenScene(SceneUtility.GetScenePathByBuildIndex(i), OpenSceneMode.Additive);
+ shouldClose = true;
+ }
+
+ ExportScene(scene, false);
+
+ if (shouldClose)
+ {
+ EditorSceneManager.CloseScene(scene, true);
+ }
+ }
+
+ EditorUtility.DisplayProgressBar("Steam Audio", "", 1.0f);
+ EditorUtility.ClearProgressBar();
+ }
+
+ [MenuItem("Steam Audio/Export Active Scene To OBJ", false, 25)]
+ public static void ExportActiveSceneToOBJ()
+ {
+ ExportScene(SceneManager.GetActiveScene(), true);
+ }
+
+ [MenuItem("Steam Audio/Export Dynamic Objects In Active Scene", false, 36)]
+ public static void ExportDynamicObjectsInActiveScene()
+ {
+ ExportDynamicObjectsInArray(GetDynamicObjectsInScene(SceneManager.GetActiveScene()));
+ }
+
+ [MenuItem("Steam Audio/Export Dynamic Objects In All Open Scenes", false, 37)]
+ public static void ExportDynamicObjectsInAllOpenScenes()
+ {
+ for (var i = 0; i < SceneManager.sceneCount; ++i)
+ {
+ var scene = SceneManager.GetSceneAt(i);
+
+ EditorUtility.DisplayProgressBar("Steam Audio", string.Format("Exporting dynamic objects in scene: {0}", scene.name), (float)i / (float)SceneManager.sceneCount);
+
+ if (!scene.isLoaded)
+ {
+ Debug.LogWarning(string.Format("Scene {0} is not loaded in the hierarchy.", scene.name));
+ continue;
+ }
+
+ ExportDynamicObjectsInArray(GetDynamicObjectsInScene(scene));
+ }
+
+ EditorUtility.DisplayProgressBar("Steam Audio", "", 1.0f);
+ EditorUtility.ClearProgressBar();
+ }
+
+ [MenuItem("Steam Audio/Export Dynamic Objects In All Scenes In Build", false, 38)]
+ public static void ExportDynamicObjectsInBuild()
+ {
+ for (var i = 0; i < SceneManager.sceneCountInBuildSettings; ++i)
+ {
+ var scene = SceneManager.GetSceneByBuildIndex(i);
+
+ EditorUtility.DisplayProgressBar("Steam Audio", string.Format("Exporting dynamic objects in scene: {0}", scene.name), (float)i / (float)SceneManager.sceneCountInBuildSettings);
+
+ var shouldClose = false;
+ if (!scene.isLoaded)
+ {
+ scene = EditorSceneManager.OpenScene(SceneUtility.GetScenePathByBuildIndex(i), OpenSceneMode.Additive);
+ shouldClose = true;
+ }
+
+ ExportDynamicObjectsInArray(GetDynamicObjectsInScene(scene));
+
+ if (shouldClose)
+ {
+ EditorSceneManager.CloseScene(scene, true);
+ }
+ }
+
+ EditorUtility.DisplayProgressBar("Steam Audio", "", 1.0f);
+ EditorUtility.ClearProgressBar();
+ }
+
+ [MenuItem("Steam Audio/Export All Dynamic Objects In Project", false, 39)]
+ public static void ExportDynamicObjectsInProject()
+ {
+ var scenes = AssetDatabase.FindAssets("t:Scene");
+ var prefabs = AssetDatabase.FindAssets("t:Prefab");
+
+ var numItems = scenes.Length + prefabs.Length;
+
+ var index = 0;
+ foreach (var sceneGUID in scenes)
+ {
+ var scenePath = AssetDatabase.GUIDToAssetPath(sceneGUID);
+
+ EditorUtility.DisplayProgressBar("Steam Audio", string.Format("Exporting dynamic objects in scene: {0}", scenePath), (float)index / (float)numItems);
+
+ var activeScene = EditorSceneManager.GetActiveScene();
+ var isLoadedScene = (scenePath == activeScene.path);
+
+ var scene = activeScene;
+ if (!isLoadedScene)
+ {
+#if UNITY_2019_2_OR_NEWER
+ var packageInfo = UnityEditor.PackageManager.PackageInfo.FindForAssetPath(scenePath);
+ if (!(packageInfo == null || packageInfo.source == PackageSource.Embedded || packageInfo.source == PackageSource.Local))
+ {
+ Debug.LogWarning(string.Format("Scene {0} is part of a read-only package, skipping.", scenePath));
+ continue;
+ }
+#endif
+
+ scene = EditorSceneManager.OpenScene(scenePath, OpenSceneMode.Additive);
+ }
+
+ ExportDynamicObjectsInArray(GetDynamicObjectsInScene(scene));
+
+ if (!isLoadedScene)
+ {
+ EditorSceneManager.CloseScene(scene, true);
+ }
+
+ ++index;
+ }
+
+ foreach (var prefabGUID in prefabs)
+ {
+ var prefabPath = AssetDatabase.GUIDToAssetPath(prefabGUID);
+
+ EditorUtility.DisplayProgressBar("Steam Audio", string.Format("Exporting dynamic objects in prefab: {0}", prefabPath), (float)index / (float)numItems);
+
+ var prefab = AssetDatabase.LoadMainAssetAtPath(prefabPath) as GameObject;
+ var dynamicObjects = prefab.GetComponentsInChildren();
+ ExportDynamicObjectsInArray(dynamicObjects);
+
+ ++index;
+ }
+
+ EditorUtility.DisplayProgressBar("Steam Audio", "", 1.0f);
+ EditorUtility.ClearProgressBar();
+ }
+
+ [MenuItem("Steam Audio/Install FMOD Studio Plugin Files", false, 50)]
+ public static void InstallFMODStudioPluginFiles()
+ {
+ // Make sure the FMOD Studio Unity integration is installed.
+ var assemblySuffix = ",FMODUnity";
+ var FMODUnity_Settings = Type.GetType("FMODUnity.Settings" + assemblySuffix);
+ if (FMODUnity_Settings == null)
+ {
+ EditorUtility.DisplayDialog("Steam Audio",
+ "The FMOD Studio Unity integration does not seem to be installed to your Unity project. Install " +
+ "it and try again.",
+ "OK");
+ return;
+ }
+
+ // Make sure we're using at least FMOD Studio v2.0.
+ var FMODUnity_Settings_Instance = FMODUnity_Settings.GetProperty("Instance");
+ var FMODUnity_Settings_CurrentVersion = FMODUnity_Settings.GetField("CurrentVersion");
+ var fmodSettings = FMODUnity_Settings_Instance.GetValue(null, null);
+ var fmodVersion = (int)FMODUnity_Settings_CurrentVersion.GetValue(fmodSettings);
+ var fmodVersionMajor = (fmodVersion & 0x00ff0000) >> 16;
+ var fmodVersionMinor = (fmodVersion & 0x0000ff00) >> 8;
+ var fmodVersionPatch = (fmodVersion & 0x000000ff);
+ if (fmodVersionMajor < 2)
+ {
+ EditorUtility.DisplayDialog("Steam Audio",
+ "Steam Audio requires FMOD Studio 2.0 or later.",
+ "OK");
+ return;
+ }
+
+ var moveRequired = false;
+ var moveSucceeded = false;
+
+ // Look for the FMOD Studio plugin files. The files are in the right place for FMOD Studio 2.2
+ // out of the box, but will need to be copied for 2.1 or earlier.
+ // 2.0 through 2.1 expect plugin files in Assets/Plugins/FMOD/lib/(platform)
+ // 2.2 expects plugin files in Assets/Plugins/FMOD/platforms/(platform)/lib
+ if (AssetExists("Assets/Plugins/FMOD/lib/win/x86_64/phonon_fmod.dll"))
+ {
+ // Files are in the location corresponding to 2.1 or earlier.
+ if (fmodVersionMinor >= 2)
+ {
+ // We're using 2.2 or later, so we need to move files.
+ moveRequired = true;
+
+ var moves = new Dictionary();
+ moves.Add("Assets/Plugins/FMOD/lib/win/x86/phonon_fmod.dll", "Assets/Plugins/FMOD/platforms/win/lib/x86/phonon_fmod.dll");
+ moves.Add("Assets/Plugins/FMOD/lib/win/x86_64/phonon_fmod.dll", "Assets/Plugins/FMOD/platforms/win/lib/x86_64/phonon_fmod.dll");
+ moves.Add("Assets/Plugins/FMOD/lib/linux/x86/libphonon_fmod.so", "Assets/Plugins/FMOD/platforms/linux/lib/x86/libphonon_fmod.so");
+ moves.Add("Assets/Plugins/FMOD/lib/linux/x86_64/libphonon_fmod.so", "Assets/Plugins/FMOD/platforms/linux/lib/x86_64/libphonon_fmod.so");
+ moves.Add("Assets/Plugins/FMOD/lib/mac/phonon_fmod.bundle", "Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle");
+ moves.Add("Assets/Plugins/FMOD/lib/android/armeabi-v7a/libphonon_fmod.so", "Assets/Plugins/FMOD/platforms/android/lib/armeabi-v7a/libphonon_fmod.so");
+ moves.Add("Assets/Plugins/FMOD/lib/android/arm64-v8a/libphonon_fmod.so", "Assets/Plugins/FMOD/platforms/android/lib/arm64-v8a/libphonon_fmod.so");
+ moves.Add("Assets/Plugins/FMOD/lib/android/x86/libphonon_fmod.so", "Assets/Plugins/FMOD/platforms/android/lib/x86/libphonon_fmod.so");
+
+ moveSucceeded = MoveAssets(moves);
+ }
+ }
+ else if (AssetExists("Assets/Plugins/FMOD/platforms/win/lib/x86_64/phonon_fmod.dll"))
+ {
+ // Files are in the location corresponding to 2.2 or later.
+ if (fmodVersionMinor <= 1)
+ {
+ // We're using 2.1 or earlier, so we need to move files.
+ moveRequired = true;
+
+ var moves = new Dictionary();
+ moves.Add("Assets/Plugins/FMOD/platforms/win/lib/x86/phonon_fmod.dll", "Assets/Plugins/FMOD/lib/win/x86/phonon_fmod.dll");
+ moves.Add("Assets/Plugins/FMOD/platforms/win/lib/x86_64/phonon_fmod.dll", "Assets/Plugins/FMOD/lib/win/x86_64/phonon_fmod.dll");
+ moves.Add("Assets/Plugins/FMOD/platforms/linux/lib/x86/libphonon_fmod.so", "Assets/Plugins/FMOD/lib/linux/x86/libphonon_fmod.so");
+ moves.Add("Assets/Plugins/FMOD/platforms/linux/lib/x86_64/libphonon_fmod.so", "Assets/Plugins/FMOD/lib/linux/x86_64/libphonon_fmod.so");
+ moves.Add("Assets/Plugins/FMOD/platforms/mac/lib/phonon_fmod.bundle", "Assets/Plugins/FMOD/lib/mac/phonon_fmod.bundle");
+ moves.Add("Assets/Plugins/FMOD/platforms/android/lib/armeabi-v7a/libphonon_fmod.so", "Assets/Plugins/FMOD/lib/android/armeabi-v7a/libphonon_fmod.so");
+ moves.Add("Assets/Plugins/FMOD/platforms/android/lib/arm64-v8a/libphonon_fmod.so", "Assets/Plugins/FMOD/lib/android/arm64-v8a/libphonon_fmod.so");
+ moves.Add("Assets/Plugins/FMOD/platforms/android/lib/x86/libphonon_fmod.so", "Assets/Plugins/FMOD/lib/android/x86/libphonon_fmod.so");
+
+ moveSucceeded = MoveAssets(moves);
+ }
+ }
+ else
+ {
+ EditorUtility.DisplayDialog("Steam Audio",
+ "Unable to find Steam Audio FMOD Studio plugin files. Try reinstalling the Steam Audio Unity " +
+ "integration.",
+ "OK");
+ return;
+ }
+
+ if (!moveRequired)
+ {
+ EditorUtility.DisplayDialog("Steam Audio",
+ "Steam Audio FMOD Studio plugin files are already in the correct place.",
+ "OK");
+ }
+ else if (!moveSucceeded)
+ {
+ EditorUtility.DisplayDialog("Steam Audio",
+ "Failed to copy Steam Audio FMOD Studio plugin files to the correct place. See the console for " +
+ "details.",
+ "OK");
+ }
+ else
+ {
+ EditorUtility.DisplayDialog("Steam Audio",
+ "Steam Audio FMOD Studio plugin files moved to the correct place.",
+ "OK");
+ }
+ }
+
+ [MenuItem("Steam Audio/Install FMOD Studio Plugin Files", true)]
+ public static bool ValidateInstallFMODStudioPluginFiles()
+ {
+ return (SteamAudioSettings.Singleton.audioEngine == AudioEngineType.FMODStudio);
+ }
+
+ private static bool AssetExists(string assetPath)
+ {
+ return !string.IsNullOrEmpty(AssetDatabase.AssetPathToGUID(assetPath)) &&
+ (File.Exists(Environment.CurrentDirectory + "/" + assetPath) || Directory.Exists(Environment.CurrentDirectory + "/" + assetPath));
+ }
+
+ private static bool EnsureAssetDirectoryExists(string directory)
+ {
+ if (AssetDatabase.IsValidFolder(directory))
+ return true;
+
+ var parent = Path.GetDirectoryName(directory);
+ var baseName = Path.GetFileName(directory);
+
+ if (!EnsureAssetDirectoryExists(parent))
+ return false;
+
+ var result = AssetDatabase.CreateFolder(parent, baseName);
+ if (string.IsNullOrEmpty(result))
+ {
+ Debug.LogErrorFormat("Unable to create asset directory {0} in {1}: {2}", baseName, parent, result);
+ return false;
+ }
+
+ return true;
+ }
+
+ private static bool MoveAssets(Dictionary moves)
+ {
+ foreach (var source in moves.Keys)
+ {
+ if (!AssetExists(source))
+ {
+ Debug.LogErrorFormat("Unable to find plugin file: {0}", source);
+ return false;
+ }
+
+ var destination = moves[source];
+ var directory = Path.GetDirectoryName(destination);
+
+ if (!EnsureAssetDirectoryExists(directory))
+ {
+ Debug.LogErrorFormat("Unable to create directory: {0}", directory);
+ return false;
+ }
+
+ var result = AssetDatabase.MoveAsset(source, destination);
+
+ if (!string.IsNullOrEmpty(result))
+ {
+ Debug.LogErrorFormat("Unable to move {0} to {1}: {2}", source, destination, result);
+ return false;
+ }
+
+ Debug.LogFormat("Moved {0} to {1}.", source, destination);
+ }
+
+ return true;
+ }
+#endif
+
+ // Exports a dynamic object.
+ public static void ExportDynamicObject(SteamAudioDynamicObject dynamicObject, bool exportOBJ)
+ {
+ var objects = GetDynamicGameObjectsForExport(dynamicObject);
+
+ if (objects == null || objects.Length == 0)
+ {
+ Debug.LogError(string.Format("Dynamic object {0} has no Steam Audio geometry attached. Skipping export.", dynamicObject.name));
+ return;
+ }
+
+ var dataAsset = (!exportOBJ) ? GetDataAsset(dynamicObject) : null;
+ var objFileName = (exportOBJ) ? GetOBJFileName(dynamicObject) : "";
+
+ if (!exportOBJ && dataAsset == null)
+ return;
+
+ if (exportOBJ && (objFileName == null || objFileName.Length == 0))
+ return;
+
+ Export(objects, dynamicObject.name, dataAsset, objFileName, true, exportOBJ);
+ }
+
+ // Exports all dynamic objects in an array.
+ static void ExportDynamicObjectsInArray(SteamAudioDynamicObject[] dynamicObjects)
+ {
+ foreach (var dynamicObject in dynamicObjects)
+ {
+ ExportDynamicObject(dynamicObject, false);
+ }
+ }
+
+ // Finds all dynamic objects in a scene.
+ static SteamAudioDynamicObject[] GetDynamicObjectsInScene(UnityEngine.SceneManagement.Scene scene)
+ {
+ var dynamicObjects = new List();
+
+ var rootObjects = scene.GetRootGameObjects();
+ foreach (var rootObject in rootObjects)
+ {
+ dynamicObjects.AddRange(rootObject.GetComponentsInChildren());
+ }
+
+ return dynamicObjects.ToArray();
+ }
+
+ // Loads a static scene.
+ public static void LoadScene(UnityEngine.SceneManagement.Scene unityScene, Context context, bool additive)
+ {
+ if (!additive)
+ {
+ sSingleton.mCurrentScene = CreateScene(context);
+ }
+ }
+
+ // Loads a dynamic object as an instanced mesh. Multiple dynamic objects loaded from the same file
+ // will share the underlying geometry and material data (using a reference count). The instanced meshes
+ // allow each dynamic object to have its own transform.
+ public static InstancedMesh LoadDynamicObject(SteamAudioDynamicObject dynamicObject, Scene parentScene, Context context)
+ {
+ InstancedMesh instancedMesh = null;
+
+ var dataAsset = dynamicObject.asset;
+ var assetName = dataAsset.name;
+ if (dataAsset != null)
+ {
+ Scene subScene = null;
+ if (sSingleton.mDynamicObjects.ContainsKey(assetName))
+ {
+ subScene = sSingleton.mDynamicObjects[assetName];
+ sSingleton.mDynamicObjectRefCounts[assetName]++;
+ }
+ else
+ {
+ subScene = CreateScene(context);
+ var subStaticMesh = Load(dataAsset, context, subScene);
+ subStaticMesh.AddToScene(subScene);
+ subStaticMesh.Release();
+
+ sSingleton.mDynamicObjects.Add(assetName, subScene);
+ sSingleton.mDynamicObjectRefCounts.Add(assetName, 1);
+ }
+
+ instancedMesh = new InstancedMesh(parentScene, subScene, dynamicObject.transform);
+ }
+
+ return instancedMesh;
+ }
+
+ // Unloads a dynamic object and decrements the reference count of the underlying data. However,
+ // when the reference count hits zero, we don't get rid of the data, because the dynamic object may
+ // be instantiated again within a few frames, and we don't want to waste time re-loading it. The data
+ // will eventually be unloaded at the next scene change.
+ public static void UnloadDynamicObject(SteamAudioDynamicObject dynamicObject)
+ {
+ var assetName = (dynamicObject.asset) ? dynamicObject.asset.name : "";
+
+ if (sSingleton.mDynamicObjectRefCounts.ContainsKey(assetName))
+ {
+ sSingleton.mDynamicObjectRefCounts[assetName]--;
+ }
+ }
+
+ // Gather a list of all GameObjects to export, starting from a given root object.
+ public static List GetGameObjectsForExport(GameObject root, bool exportingStaticObjects = false)
+ {
+ var gameObjects = new List();
+
+ if (exportingStaticObjects && root.GetComponentInParent() != null)
+ return new List();
+
+ var geometries = root.GetComponentsInChildren();
+ foreach (var geometry in geometries)
+ {
+ if (IsDynamicSubObject(root, geometry.gameObject))
+ continue;
+
+ if (geometry.exportAllChildren)
+ {
+ var meshes = geometry.GetComponentsInChildren();
+ foreach (var mesh in meshes)
+ {
+ if (!IsDynamicSubObject(root, mesh.gameObject))
+ {
+ if (IsActiveInHierarchy(mesh.gameObject.transform))
+ {
+ gameObjects.Add(mesh.gameObject);
+ }
+ }
+ }
+
+ var terrains = geometry.GetComponentsInChildren();
+ foreach (var terrain in terrains)
+ {
+ if (!IsDynamicSubObject(root, terrain.gameObject))
+ {
+ if (IsActiveInHierarchy(terrain.gameObject.transform))
+ {
+ gameObjects.Add(terrain.gameObject);
+ }
+ }
+ }
+ }
+ else
+ {
+ if (IsActiveInHierarchy(geometry.gameObject.transform))
+ {
+ if (geometry.gameObject.GetComponent() != null ||
+ geometry.gameObject.GetComponent() != null)
+ {
+ gameObjects.Add(geometry.gameObject);
+ }
+ }
+ }
+ }
+
+ var uniqueGameObjects = new HashSet(gameObjects);
+
+ gameObjects.Clear();
+ foreach (var uniqueGameObject in uniqueGameObjects)
+ {
+ gameObjects.Add(uniqueGameObject);
+ }
+
+ return gameObjects;
+ }
+
+ // Returns the number of vertices associated with a GameObject.
+ public static int GetNumVertices(GameObject gameObject)
+ {
+ var mesh = gameObject.GetComponent();
+ var terrain = gameObject.GetComponent();
+
+ if (mesh != null && mesh.sharedMesh != null)
+ {
+ return mesh.sharedMesh.vertexCount;
+ }
+ else if (terrain != null)
+ {
+ var terrainSimplificationLevel = GetTerrainSimplificationLevel(terrain);
+
+ var w = terrain.terrainData.heightmapResolution;
+ var h = terrain.terrainData.heightmapResolution;
+ var s = Mathf.Min(w - 1, Mathf.Min(h - 1, (int)Mathf.Pow(2.0f, terrainSimplificationLevel)));
+
+ if (s == 0)
+ {
+ s = 1;
+ }
+
+ w = ((w - 1) / s) + 1;
+ h = ((h - 1) / s) + 1;
+
+ return (w * h);
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ // Returns the number of triangles associated with a GameObject.
+ public static int GetNumTriangles(GameObject gameObject)
+ {
+ var mesh = gameObject.GetComponent();
+ var terrain = gameObject.GetComponent();
+
+ if (mesh != null && mesh.sharedMesh != null)
+ {
+ return mesh.sharedMesh.triangles.Length / 3;
+ }
+ else if (terrain != null)
+ {
+ var terrainSimplificationLevel = GetTerrainSimplificationLevel(terrain);
+
+ var w = terrain.terrainData.heightmapResolution;
+ var h = terrain.terrainData.heightmapResolution;
+ var s = Mathf.Min(w - 1, Mathf.Min(h - 1, (int)Mathf.Pow(2.0f, terrainSimplificationLevel)));
+
+ if (s == 0)
+ {
+ s = 1;
+ }
+
+ w = ((w - 1) / s) + 1;
+ h = ((h - 1) / s) + 1;
+
+ return ((w - 1) * (h - 1) * 2);
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ [MonoPInvokeCallback(typeof(ClosestHitCallback))]
+ public static void ClosestHit(ref Ray ray, float minDistance, float maxDistance, out Hit hit, IntPtr userData)
+ {
+ var origin = Common.ConvertVector(ray.origin);
+ var direction = Common.ConvertVector(ray.direction);
+
+ origin += minDistance * direction;
+
+ var layerMask = SteamAudioSettings.Singleton.layerMask;
+
+ hit.objectIndex = 0;
+ hit.triangleIndex = 0;
+ hit.materialIndex = 0;
+
+ var numHits = Physics.RaycastNonAlloc(origin, direction, sSingleton.mRayHits, maxDistance, layerMask);
+ if (numHits > 0)
+ {
+ hit.distance = sSingleton.mRayHits[0].distance;
+ hit.normal = Common.ConvertVector(sSingleton.mRayHits[0].normal);
+ hit.material = GetMaterialBufferForTransform(sSingleton.mRayHits[0].collider.transform);
+ }
+ else
+ {
+ hit.distance = Mathf.Infinity;
+ hit.normal = new Vector3 { x = 0.0f, y = 0.0f, z = 0.0f };
+ hit.material = IntPtr.Zero;
+ }
+ }
+
+ [MonoPInvokeCallback(typeof(AnyHitCallback))]
+ public static void AnyHit(ref Ray ray, float minDistance, float maxDistance, out byte occluded, IntPtr userData)
+ {
+ var origin = Common.ConvertVector(ray.origin);
+ var direction = Common.ConvertVector(ray.direction);
+
+ origin += minDistance * direction;
+
+ var layerMask = SteamAudioSettings.Singleton.layerMask;
+
+ var numHits = Physics.RaycastNonAlloc(origin, direction, sSingleton.mRayHits, maxDistance, layerMask);
+
+ occluded = (byte)((numHits > 0) ? 1 : 0);
+ }
+
+ // This method is called as soon as scripts are loaded, which happens whenever play mode is started
+ // (in the editor), or whenever the game is launched. We then create a Steam Audio Manager object
+ // and move it to the Don't Destroy On Load list.
+ [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
+ static void AutoInitialize()
+ {
+ Initialize(ManagerInitReason.Playing);
+ }
+
+ // Exports the static geometry in a scene.
+ public static void ExportScene(UnityEngine.SceneManagement.Scene unityScene, bool exportOBJ)
+ {
+ var objects = GetStaticGameObjectsForExport(unityScene);
+
+ if (objects == null || objects.Length == 0)
+ {
+ Debug.LogWarning(string.Format("Scene {0} has no Steam Audio static geometry. Skipping export.", unityScene.name));
+ return;
+ }
+
+ var dataAsset = (!exportOBJ) ? GetDataAsset(unityScene) : null;
+ var objFileName = (exportOBJ) ? GetOBJFileName(unityScene) : "";
+
+ if (!exportOBJ && dataAsset == null)
+ return;
+
+ if (exportOBJ && (objFileName == null || objFileName.Length == 0))
+ return;
+
+ Export(objects, unityScene.name, dataAsset, objFileName, false, exportOBJ);
+ }
+
+ // Exports a set of GameObjects.
+ static void Export(GameObject[] objects, string name, SerializedData dataAsset, string objFileName, bool dynamic, bool exportOBJ)
+ {
+ var type = (dynamic) ? "Dynamic Object" : "Scene";
+
+ Vector3[] vertices = null;
+ Triangle[] triangles = null;
+ int[] materialIndices = null;
+ Material[] materials = null;
+ GetGeometryAndMaterialBuffers(objects, ref vertices, ref triangles, ref materialIndices, ref materials, dynamic, exportOBJ);
+
+ if (vertices.Length == 0 || triangles.Length == 0 || materialIndices.Length == 0 || materials.Length == 0)
+ {
+ Debug.LogError(string.Format("Steam Audio {0} [{1}]: No Steam Audio Geometry components attached.", type, name));
+ return;
+ }
+
+ var context = new Context();
+
+ // Scene type should always be Phonon when exporting.
+ var scene = new Scene(context, SceneType.Default, null, null, null, null);
+
+ var staticMesh = new StaticMesh(context, scene, vertices, triangles, materialIndices, materials);
+ staticMesh.AddToScene(scene);
+
+ if (exportOBJ)
+ {
+ scene.Commit();
+ scene.SaveOBJ(objFileName);
+ }
+ else
+ {
+ staticMesh.Save(dataAsset);
+ }
+
+ Debug.Log(string.Format("Steam Audio {0} [{1}]: Exported to {2}.", type, name, (exportOBJ) ? objFileName : dataAsset.name));
+
+ staticMesh.Release();
+ scene.Release();
+ }
+
+ static Scene CreateScene(Context context)
+ {
+ var sceneType = GetSceneType();
+
+ var scene = new Scene(context, sceneType, sSingleton.mEmbreeDevice, sSingleton.mRadeonRaysDevice,
+ ClosestHit, AnyHit);
+
+ if (sceneType == SceneType.Custom)
+ {
+ if (sSingleton.mMaterialBuffer == IntPtr.Zero)
+ {
+ sSingleton.mMaterialBuffer = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Material)));
+ }
+ }
+
+ return scene;
+ }
+
+ // Loads a Steam Audio scene.
+ static StaticMesh Load(SerializedData dataAsset, Context context, Scene scene)
+ {
+ return new StaticMesh(context, scene, dataAsset);
+ }
+
+ // Unloads the underlying data for dynamic objects. Can either remove only unreferenced data (for use when
+ // changing scenes) or all data (for use when shutting down).
+ static void RemoveAllDynamicObjects(bool force = false)
+ {
+ var unreferencedDynamicObjects = new List();
+
+ foreach (var scene in sSingleton.mDynamicObjectRefCounts.Keys)
+ {
+ if (force || sSingleton.mDynamicObjectRefCounts[scene] == 0)
+ {
+ unreferencedDynamicObjects.Add(scene);
+ }
+ }
+
+ foreach (var scene in unreferencedDynamicObjects)
+ {
+ sSingleton.mDynamicObjects[scene].Release();
+ sSingleton.mDynamicObjects.Remove(scene);
+ sSingleton.mDynamicObjectRefCounts.Remove(scene);
+ }
+ }
+
+ // Unloads all currently-loaded scenes.
+ static void RemoveAllAdditiveScenes()
+ {
+ Marshal.FreeHGlobal(sSingleton.mMaterialBuffer);
+
+ if (sSingleton.mCurrentScene != null)
+ {
+ sSingleton.mCurrentScene.Release();
+ sSingleton.mCurrentScene = null;
+ }
+ }
+
+ static IntPtr GetMaterialBufferForTransform(Transform obj)
+ {
+ var material = new Material();
+ var found = false;
+
+ var currentObject = obj;
+ while (currentObject != null)
+ {
+ var steamAudioGeometry = currentObject.GetComponent();
+ if (steamAudioGeometry != null && steamAudioGeometry.material != null)
+ {
+ material = steamAudioGeometry.material.GetMaterial();
+ found = true;
+ break;
+ }
+ currentObject = currentObject.parent;
+ }
+
+ if (!found)
+ {
+ material = SteamAudioSettings.Singleton.defaultMaterial.GetMaterial();
+ }
+
+ Marshal.StructureToPtr(material, sSingleton.mMaterialBuffer, true);
+
+ return sSingleton.mMaterialBuffer;
+ }
+
+ // Gather a list of all GameObjects to export in a scene, excluding dynamic objects.
+ static GameObject[] GetStaticGameObjectsForExport(UnityEngine.SceneManagement.Scene scene)
+ {
+ var gameObjects = new List();
+
+ var roots = scene.GetRootGameObjects();
+ foreach (var root in roots)
+ {
+ gameObjects.AddRange(GetGameObjectsForExport(root, true));
+ }
+
+ return gameObjects.ToArray();
+ }
+
+ // Gather a list of all GameObjects to export for a given dynamic object.
+ static GameObject[] GetDynamicGameObjectsForExport(SteamAudioDynamicObject dynamicObject)
+ {
+ return GetGameObjectsForExport(dynamicObject.gameObject).ToArray();
+ }
+
+ static bool IsDynamicSubObject(GameObject root, GameObject obj)
+ {
+ return (root.GetComponentInParent() !=
+ obj.GetComponentInParent());
+ }
+
+ // Ideally, we want to use GameObject.activeInHierarchy to check if a GameObject is active. However, when
+ // we batch-export dynamic objects, Prefabs are instantiated using AssetDatabase.LoadMainAssetAtPath,
+ // and isActiveInHierarchy returns false even if all GameObjects in the Prefab return true for
+ // GameObject.activeSelf. Therefore, we manually walk up the hierarchy and check if the GameObject is active.
+ static bool IsActiveInHierarchy(Transform obj)
+ {
+ if (obj == null)
+ return true;
+
+ return (obj.gameObject.activeSelf && IsActiveInHierarchy(obj.parent));
+ }
+
+ // Given an array of GameObjects, export the vertex, triangle, material index, and material data.
+ static void GetGeometryAndMaterialBuffers(GameObject[] gameObjects, ref Vector3[] vertices, ref Triangle[] triangles, ref int[] materialIndices, ref Material[] materials, bool isDynamic, bool exportOBJ)
+ {
+ var numVertices = new int[gameObjects.Length];
+ var numTriangles = new int[gameObjects.Length];
+ var totalNumVertices = 0;
+ var totalNumTriangles = 0;
+ for (var i = 0; i < gameObjects.Length; ++i)
+ {
+ numVertices[i] = GetNumVertices(gameObjects[i]);
+ numTriangles[i] = GetNumTriangles(gameObjects[i]);
+ totalNumVertices += numVertices[i];
+ totalNumTriangles += numTriangles[i];
+ }
+
+ int[] materialIndicesPerObject = null;
+ GetMaterialMapping(gameObjects, ref materials, ref materialIndicesPerObject);
+
+ vertices = new Vector3[totalNumVertices];
+ triangles = new Triangle[totalNumTriangles];
+ materialIndices = new int[totalNumTriangles];
+
+ // If we're exporting a dynamic object, apply the relevant transform. However, if we're exporting
+ // to an OBJ file, _don't_ apply the transform, so the dynamic object appears centered at its local
+ // origin.
+ Transform transform = null;
+ if (isDynamic && !exportOBJ)
+ {
+ var dynamicObject = gameObjects[0].GetComponent();
+ if (dynamicObject == null)
+ {
+ dynamicObject = GetDynamicObjectInParent(gameObjects[0].transform);
+ }
+ transform = dynamicObject.transform;
+ }
+
+ var verticesOffset = 0;
+ var trianglesOffset = 0;
+ for (var i = 0; i < gameObjects.Length; ++i)
+ {
+ GetVertices(gameObjects[i], vertices, verticesOffset, transform);
+ GetTriangles(gameObjects[i], triangles, trianglesOffset);
+ FixupTriangleIndices(triangles, trianglesOffset, trianglesOffset + numTriangles[i], verticesOffset);
+
+ for (var j = 0; j < numTriangles[i]; ++j)
+ {
+ materialIndices[trianglesOffset + j] = materialIndicesPerObject[i];
+ }
+
+ verticesOffset += numVertices[i];
+ trianglesOffset += numTriangles[i];
+ }
+ }
+
+ // Ideally, we want to use GameObject.GetComponentInParent<>() to find the SteamAudioDynamicObject attached to
+ // an ancestor of this GameObject. However, GetComponentInParent only returns "active" components, which in
+ // turn seem to be subject to the same behavior as activeInHierarchy (see above), so we have to manually walk
+ // the hierarchy upwards to find the first SteamAudioDynamicObject.
+ static SteamAudioDynamicObject GetDynamicObjectInParent(Transform obj)
+ {
+ if (obj == null)
+ return null;
+
+ var dynamicObject = obj.gameObject.GetComponent();
+ if (dynamicObject != null)
+ return dynamicObject;
+
+ return GetDynamicObjectInParent(obj.parent);
+ }
+
+ // Populates an array with the vertices associated with a GameObject, starting at a given offset.
+ static void GetVertices(GameObject gameObject, Vector3[] vertices, int offset, Transform transform)
+ {
+ var mesh = gameObject.GetComponent();
+ var terrain = gameObject.GetComponent();
+
+ if (mesh != null && mesh.sharedMesh != null)
+ {
+ var vertexArray = mesh.sharedMesh.vertices;
+ for (var i = 0; i < vertexArray.Length; ++i)
+ {
+ var transformedVertex = mesh.transform.TransformPoint(vertexArray[i]);
+ if (transform != null)
+ {
+ transformedVertex = transform.InverseTransformPoint(transformedVertex);
+ }
+ vertices[offset + i] = Common.ConvertVector(transformedVertex);
+ }
+ }
+ else if (terrain != null)
+ {
+ var terrainSimplificationLevel = GetTerrainSimplificationLevel(terrain);
+
+ var w = terrain.terrainData.heightmapResolution;
+ var h = terrain.terrainData.heightmapResolution;
+ var s = Mathf.Min(w - 1, Mathf.Min(h - 1, (int)Mathf.Pow(2.0f, terrainSimplificationLevel)));
+ if (s == 0)
+ {
+ s = 1;
+ }
+
+ w = ((w - 1) / s) + 1;
+ h = ((h - 1) / s) + 1;
+
+ var heights = terrain.terrainData.GetHeights(0, 0, terrain.terrainData.heightmapResolution,
+ terrain.terrainData.heightmapResolution);
+
+ var index = 0;
+ for (var v = 0; v < terrain.terrainData.heightmapResolution; v += s)
+ {
+ for (var u = 0; u < terrain.terrainData.heightmapResolution; u += s)
+ {
+ var height = heights[v, u];
+
+ var x = ((float) u / terrain.terrainData.heightmapResolution) * terrain.terrainData.size.x;
+ var y = height * terrain.terrainData.size.y;
+ var z = ((float) v / terrain.terrainData.heightmapResolution) * terrain.terrainData.size.z;
+
+ var vertex = new UnityEngine.Vector3 { x = x, y = y, z = z };
+ var transformedVertex = terrain.transform.TransformPoint(vertex);
+ if (transform != null)
+ {
+ transformedVertex = transform.InverseTransformPoint(transformedVertex);
+ }
+ vertices[offset + index] = Common.ConvertVector(transformedVertex);
+ ++index;
+ }
+ }
+ }
+ }
+
+ // Populates an array with the triangles associated with a GameObject, starting at a given offset.
+ static void GetTriangles(GameObject gameObject, Triangle[] triangles, int offset)
+ {
+ var mesh = gameObject.GetComponent();
+ var terrain = gameObject.GetComponent();
+
+ if (mesh != null && mesh.sharedMesh != null)
+ {
+ var triangleArray = mesh.sharedMesh.triangles;
+ for (var i = 0; i < triangleArray.Length / 3; ++i)
+ {
+ triangles[offset + i].index0 = triangleArray[3 * i + 0];
+ triangles[offset + i].index1 = triangleArray[3 * i + 1];
+ triangles[offset + i].index2 = triangleArray[3 * i + 2];
+ }
+ }
+ else if (terrain != null)
+ {
+ var terrainSimplificationLevel = GetTerrainSimplificationLevel(terrain);
+
+ var w = terrain.terrainData.heightmapResolution;
+ var h = terrain.terrainData.heightmapResolution;
+ var s = Mathf.Min(w - 1, Mathf.Min(h - 1, (int)Mathf.Pow(2.0f, terrainSimplificationLevel)));
+ if (s == 0)
+ {
+ s = 1;
+ }
+
+ w = ((w - 1) / s) + 1;
+ h = ((h - 1) / s) + 1;
+
+ var index = 0;
+ for (var v = 0; v < h - 1; ++v)
+ {
+ for (var u = 0; u < w - 1; ++u)
+ {
+ var i0 = v * w + u;
+ var i1 = (v + 1) * w + u;
+ var i2 = v * w + (u + 1);
+ triangles[offset + index] = new Triangle
+ {
+ index0 = i0,
+ index1 = i1,
+ index2 = i2
+ };
+
+ i0 = v * w + (u + 1);
+ i1 = (v + 1) * w + u;
+ i2 = (v + 1) * w + (u + 1);
+ triangles[offset + index + 1] = new Triangle
+ {
+ index0 = i0,
+ index1 = i1,
+ index2 = i2
+ };
+
+ index += 2;
+ }
+ }
+ }
+ }
+
+ // When multiple meshes are combined to form a single piece of geometry, each mesh will have
+ // 0-based triangle indices, even though the combined mesh will have a single vertex buffer. This
+ // function applies appropriate offsets to triangle indices so make all vertex indices correct.
+ static void FixupTriangleIndices(Triangle[] triangles, int startIndex, int endIndex, int indexOffset)
+ {
+ for (var i = startIndex; i < endIndex; ++i)
+ {
+ triangles[i].index0 += indexOffset;
+ triangles[i].index1 += indexOffset;
+ triangles[i].index2 += indexOffset;
+ }
+ }
+
+ static float GetTerrainSimplificationLevel(Terrain terrain)
+ {
+ return terrain.GetComponentInParent().terrainSimplificationLevel;
+ }
+
+ // Given an array of GameObjects, returns: a) an array containing all the unique materials referenced by
+ // them, and b) an array indicating for each GameObject, which material it references.
+ static void GetMaterialMapping(GameObject[] gameObjects, ref Material[] materials, ref int[] materialIndices)
+ {
+ var materialMapping = new Dictionary>();
+
+ // Loop through all the given GameObjects, and generate a dictionary mapping each material
+ // to a list of GameObjects that reference it.
+ for (var i = 0; i < gameObjects.Length; ++i)
+ {
+ var material = GetMaterialForGameObject(gameObjects[i]);
+ if (!materialMapping.ContainsKey(material))
+ {
+ materialMapping.Add(material, new List());
+ }
+ materialMapping[material].Add(i);
+ }
+
+ materials = new Material[materialMapping.Keys.Count];
+ materialIndices = new int[gameObjects.Length];
+
+ // Extract an array of unique materials and an array mapping GameObjects to materials.
+ var index = 0;
+ foreach (var material in materialMapping.Keys)
+ {
+ materials[index] = material;
+ foreach (var gameObjectIndex in materialMapping[material])
+ {
+ materialIndices[gameObjectIndex] = index;
+ }
+ ++index;
+ }
+ }
+
+ // Returns the Steam Audio material associated with a given GameObject.
+ static Material GetMaterialForGameObject(GameObject gameObject)
+ {
+ // Traverse the hierarchy upwards starting at this GameObject, until we find the
+ // first GameObject that has a Steam Audio Geometry component with a non-empty
+ // Material property.
+ var current = gameObject.transform;
+ while (current != null)
+ {
+ var geometry = current.gameObject.GetComponent();
+ if (geometry != null && geometry.material != null)
+ {
+ return geometry.material.GetMaterial();
+ }
+
+ current = current.parent;
+ }
+
+ // If we didn't find any such GameObject, use the default material specified in
+ // the Steam Audio Settings.
+ var defaultMaterial = SteamAudioSettings.Singleton.defaultMaterial;
+ if (defaultMaterial != null)
+ {
+ return SteamAudioSettings.Singleton.defaultMaterial.GetMaterial();
+ }
+
+ // The default material was set to null, so create a default material and use it.
+ Debug.LogWarning(
+ "A default material has not been set, using built-in default. Click Steam Audio > Settings " +
+ "to specify a default material.");
+ return ScriptableObject.CreateInstance().GetMaterial();
+ }
+
+ static string GetOBJFileName(UnityEngine.SceneManagement.Scene scene)
+ {
+ var fileName = "";
+
+#if UNITY_EDITOR
+ fileName = EditorUtility.SaveFilePanelInProject("Export Scene to OBJ", scene.name, "obj",
+ "Select a file to export this scene's data to.");
+#endif
+
+ return fileName;
+ }
+
+ static string GetOBJFileName(SteamAudioDynamicObject dynamicObject)
+ {
+ var fileName = "";
+
+#if UNITY_EDITOR
+ fileName = EditorUtility.SaveFilePanelInProject("Export Dynamic Object to OBJ", dynamicObject.name, "obj",
+ "Select a file to export this dynamic object's data to.");
+#endif
+
+ return fileName;
+ }
+
+ static SerializedData GetDataAsset(UnityEngine.SceneManagement.Scene scene)
+ {
+ SteamAudioStaticMesh steamAudioStaticMesh = null;
+ var rootObjects = scene.GetRootGameObjects();
+ foreach (var rootObject in rootObjects)
+ {
+ steamAudioStaticMesh = rootObject.GetComponentInChildren();
+ if (steamAudioStaticMesh != null)
+ break;
+ }
+
+ if (steamAudioStaticMesh == null)
+ {
+ var activeScene = SceneManager.GetActiveScene();
+ SceneManager.SetActiveScene(scene);
+ var rootObject = new GameObject("Steam Audio Static Mesh");
+ steamAudioStaticMesh = rootObject.AddComponent();
+#if UNITY_EDITOR
+ EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
+#endif
+ SceneManager.SetActiveScene(activeScene);
+ }
+
+ if (steamAudioStaticMesh.asset == null)
+ {
+ steamAudioStaticMesh.asset = SerializedData.PromptForNewAsset(scene.name);
+ steamAudioStaticMesh.sceneNameWhenExported = scene.name;
+ }
+
+ return steamAudioStaticMesh.asset;
+ }
+
+ static SerializedData GetDataAsset(SteamAudioDynamicObject dynamicObject)
+ {
+ return dynamicObject.asset;
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioManager.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioManager.cs.meta
new file mode 100644
index 00000000..39a542ba
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioManager.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b11066ff95bbf3344b868394742f7002
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioMaterial.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioMaterial.cs
new file mode 100644
index 00000000..0c6759b8
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioMaterial.cs
@@ -0,0 +1,55 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+
+namespace SteamAudio
+{
+ [CreateAssetMenu(menuName = "Steam Audio/Steam Audio Material")]
+ public class SteamAudioMaterial : ScriptableObject
+ {
+ [Header("Absorption")]
+ [Range(0.0f, 1.0f)]
+ public float lowFreqAbsorption = 0.1f;
+ [Range(0.0f, 1.0f)]
+ public float midFreqAbsorption = 0.1f;
+ [Range(0.0f, 1.0f)]
+ public float highFreqAbsorption = 0.1f;
+ [Header("Scattering")]
+ [Range(0.0f, 1.0f)]
+ public float scattering = 0.5f;
+ [Header("Transmission")]
+ [Range(0.0f, 1.0f)]
+ public float lowFreqTransmission = 0.1f;
+ [Range(0.0f, 1.0f)]
+ public float midFreqTransmission = 0.1f;
+ [Range(0.0f, 1.0f)]
+ public float highFreqTransmission = 0.1f;
+
+ public Material GetMaterial()
+ {
+ var material = new Material { };
+ material.absorptionLow = lowFreqAbsorption;
+ material.absorptionMid = midFreqAbsorption;
+ material.absorptionHigh = highFreqAbsorption;
+ material.scattering = scattering;
+ material.transmissionLow = lowFreqTransmission;
+ material.transmissionMid = midFreqTransmission;
+ material.transmissionHigh = highFreqTransmission;
+ return material;
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioMaterial.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioMaterial.cs.meta
new file mode 100644
index 00000000..9792e895
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioMaterial.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1cb82a87a4954a947923856a12b49b38
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioProbeBatch.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioProbeBatch.cs
new file mode 100644
index 00000000..304e5a57
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioProbeBatch.cs
@@ -0,0 +1,329 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.SceneManagement;
+#if UNITY_EDITOR
+using UnityEditor;
+#endif
+
+namespace SteamAudio
+{
+ [Serializable]
+ public struct BakedDataLayerInfo
+ {
+ public GameObject gameObject;
+ public BakedDataIdentifier identifier;
+ public int dataSize;
+ }
+
+ [AddComponentMenu("Steam Audio/Steam Audio Probe Batch")]
+ public class SteamAudioProbeBatch : MonoBehaviour
+ {
+ [Header("Placement Settings")]
+ public ProbeGenerationType placementStrategy = ProbeGenerationType.UniformFloor;
+ [Range(.1f, 50f)]
+ public float horizontalSpacing = 5f;
+ [Range(.1f, 20f)]
+ public float heightAboveFloor = 1.5f;
+
+ [Header("Export Settings")]
+ public SerializedData asset = null;
+
+ public int probeDataSize = 0;
+ [SerializeField] Sphere[] mProbeSpheres = null;
+ [SerializeField] List mBakedDataLayerInfo = new List();
+
+#if STEAMAUDIO_ENABLED
+ ProbeBatch mProbeBatch = null;
+
+ const float kProbeDrawSize = 0.1f;
+
+ public SerializedData GetAsset()
+ {
+ if (asset == null)
+ {
+ asset = SerializedData.PromptForNewAsset(gameObject.scene.name + "_" + name);
+ }
+
+ return asset;
+ }
+
+ public int GetNumProbes()
+ {
+ return (mProbeSpheres == null) ? 0 : mProbeSpheres.Length;
+ }
+
+ public int GetNumLayers()
+ {
+ return mBakedDataLayerInfo.Count;
+ }
+
+ public IntPtr GetProbeBatch()
+ {
+ return mProbeBatch.Get();
+ }
+
+ private void Awake()
+ {
+ if (asset == null)
+ return;
+
+ mProbeBatch = new ProbeBatch(SteamAudioManager.Context, asset);
+ mProbeBatch.Commit();
+ }
+
+ private void OnDestroy()
+ {
+ if (mProbeBatch != null)
+ {
+ mProbeBatch.Release();
+ }
+ }
+
+ private void OnEnable()
+ {
+ SteamAudioManager.Simulator.AddProbeBatch(mProbeBatch);
+ }
+
+ private void OnDisable()
+ {
+ if (SteamAudioManager.Simulator != null)
+ {
+ SteamAudioManager.Simulator.RemoveProbeBatch(mProbeBatch);
+ }
+ }
+
+ void OnDrawGizmosSelected()
+ {
+ var oldColor = Gizmos.color;
+ Gizmos.color = Color.magenta;
+
+ var oldMatrix = Gizmos.matrix;
+ Gizmos.matrix = transform.localToWorldMatrix;
+ Gizmos.DrawWireCube(new UnityEngine.Vector3(0, 0, 0), new UnityEngine.Vector3(1, 1, 1));
+ Gizmos.matrix = oldMatrix;
+
+ Gizmos.color = Color.yellow;
+ if (mProbeSpheres != null)
+ {
+ for (var i = 0; i < mProbeSpheres.Length; ++i)
+ {
+ var center = Common.ConvertVector(mProbeSpheres[i].center);
+ Gizmos.DrawCube(center, new UnityEngine.Vector3(kProbeDrawSize, kProbeDrawSize, kProbeDrawSize));
+ }
+ }
+ Gizmos.color = oldColor;
+ }
+
+ public void GenerateProbes()
+ {
+ SteamAudioManager.Initialize(ManagerInitReason.GeneratingProbes);
+ SteamAudioManager.LoadScene(SceneManager.GetActiveScene(), SteamAudioManager.Context, false);
+ var scene = SteamAudioManager.CurrentScene;
+
+ SteamAudioStaticMesh staticMeshComponent = null;
+ var rootObjects = SceneManager.GetActiveScene().GetRootGameObjects();
+ foreach (var rootObject in rootObjects)
+ {
+ staticMeshComponent = rootObject.GetComponentInChildren();
+ if (staticMeshComponent)
+ break;
+ }
+
+ if (staticMeshComponent == null || staticMeshComponent.asset == null)
+ {
+ Debug.LogError(string.Format("Scene {0} has not been exported. Click Steam Audio > Export Active Scene to do so.", SceneManager.GetActiveScene().name));
+ return;
+ }
+
+ var staticMesh = new StaticMesh(SteamAudioManager.Context, scene, staticMeshComponent.asset);
+ staticMesh.AddToScene(scene);
+
+ scene.Commit();
+
+ var probeArray = new ProbeArray(SteamAudioManager.Context);
+
+ var probeGenerationParams = new ProbeGenerationParams { };
+ probeGenerationParams.type = placementStrategy;
+ probeGenerationParams.spacing = horizontalSpacing;
+ probeGenerationParams.height = heightAboveFloor;
+ probeGenerationParams.transform = Common.ConvertTransform(gameObject.transform);
+
+ probeArray.GenerateProbes(scene, probeGenerationParams);
+
+ var numProbes = probeArray.GetNumProbes();
+ mProbeSpheres = new Sphere[numProbes];
+ for (var i = 0; i < numProbes; ++i)
+ {
+ mProbeSpheres[i] = probeArray.GetProbe(i);
+ }
+
+ var probeBatch = new ProbeBatch(SteamAudioManager.Context);
+ probeBatch.AddProbeArray(probeArray);
+
+ probeDataSize = probeBatch.Save(GetAsset());
+
+ probeBatch.Release();
+ probeArray.Release();
+ staticMesh.Release();
+
+ SteamAudioManager.ShutDown();
+ DestroyImmediate(SteamAudioManager.Singleton.gameObject);
+
+ ResetLayers();
+
+ Debug.Log("Generated " + mProbeSpheres.Length + " probes for game object " + gameObject.name + ".");
+
+ // Redraw scene view for probes to show up instantly.
+#if UNITY_EDITOR
+ SceneView.RepaintAll();
+#endif
+ }
+
+ public void DeleteBakedDataForIdentifier(BakedDataIdentifier identifier)
+ {
+ if (asset == null)
+ return;
+
+ SteamAudioManager.Initialize(ManagerInitReason.EditingProbes);
+
+ var probeBatch = new ProbeBatch(SteamAudioManager.Context, asset);
+ probeBatch.RemoveData(identifier);
+ probeDataSize = probeBatch.Save(asset);
+ probeBatch.Release();
+
+ SteamAudioManager.ShutDown();
+ DestroyImmediate(SteamAudioManager.Singleton.gameObject);
+
+ RemoveLayer(identifier);
+ }
+
+ public int GetSizeForLayer(BakedDataIdentifier identifier)
+ {
+ for (int i = 0; i < mBakedDataLayerInfo.Count; ++i)
+ {
+ if (mBakedDataLayerInfo[i].identifier.Equals(identifier))
+ {
+ return mBakedDataLayerInfo[i].dataSize;
+ }
+
+ }
+
+ return 0;
+ }
+
+ public BakedDataLayerInfo GetInfoForLayer(int index)
+ {
+ return mBakedDataLayerInfo[index];
+ }
+
+ public void ResetLayers()
+ {
+ mBakedDataLayerInfo.Clear();
+ }
+
+ public void AddLayer(GameObject gameObject, BakedDataIdentifier identifier, int dataSize)
+ {
+ var layerInfo = new BakedDataLayerInfo { };
+ layerInfo.gameObject = gameObject;
+ layerInfo.identifier = identifier;
+ layerInfo.dataSize = dataSize;
+
+ mBakedDataLayerInfo.Add(layerInfo);
+ }
+
+ public void RemoveLayer(BakedDataIdentifier identifier)
+ {
+ for (int i = 0; i < mBakedDataLayerInfo.Count; ++i)
+ {
+ if (mBakedDataLayerInfo[i].identifier.Equals(identifier))
+ {
+ var layerInfo = mBakedDataLayerInfo[i];
+ mBakedDataLayerInfo.RemoveAt(i);
+ UpdateGameObjectStatistics(layerInfo);
+ return;
+ }
+ }
+ }
+
+ public void AddOrUpdateLayer(GameObject gameObject, BakedDataIdentifier identifier, int dataSize)
+ {
+ for (int i = 0; i < mBakedDataLayerInfo.Count; ++i)
+ {
+ if (mBakedDataLayerInfo[i].identifier.Equals(identifier))
+ {
+ var layerInfo = mBakedDataLayerInfo[i];
+ layerInfo.dataSize = dataSize;
+ mBakedDataLayerInfo[i] = layerInfo;
+ return;
+ }
+ }
+
+ AddLayer(gameObject, identifier, dataSize);
+ }
+
+ void UpdateGameObjectStatistics(BakedDataLayerInfo layerInfo)
+ {
+ if (layerInfo.identifier.type == BakedDataType.Reflections)
+ {
+ switch (layerInfo.identifier.variation)
+ {
+ case BakedDataVariation.Reverb:
+ layerInfo.gameObject.GetComponent().UpdateBakedDataStatistics();
+ break;
+
+ case BakedDataVariation.StaticSource:
+ layerInfo.gameObject.GetComponent().UpdateBakedDataStatistics();
+ break;
+
+ case BakedDataVariation.StaticListener:
+ layerInfo.gameObject.GetComponent().UpdateBakedDataStatistics();
+ break;
+ }
+ }
+ }
+
+ BakedDataIdentifier GetBakedDataIdentifier()
+ {
+ var identifier = new BakedDataIdentifier { };
+ identifier.type = BakedDataType.Pathing;
+ identifier.variation = BakedDataVariation.Dynamic;
+ return identifier;
+ }
+
+ public void BeginBake()
+ {
+ var tasks = new BakedDataTask[1];
+ tasks[0].gameObject = gameObject;
+ tasks[0].component = this;
+ tasks[0].name = gameObject.name;
+ tasks[0].identifier = GetBakedDataIdentifier();
+ tasks[0].probeBatches = new SteamAudioProbeBatch[1];
+ tasks[0].probeBatchNames = new string[1];
+ tasks[0].probeBatchAssets = new SerializedData[1];
+
+ tasks[0].probeBatches[0] = this;
+ tasks[0].probeBatchNames[0] = gameObject.name;
+ tasks[0].probeBatchAssets[0] = GetAsset();
+
+ Baker.BeginBake(tasks);
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioProbeBatch.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioProbeBatch.cs.meta
new file mode 100644
index 00000000..cdf6c011
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioProbeBatch.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 286962cac82a4fa4e9ec38ab663c9578
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbData.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbData.cs
new file mode 100644
index 00000000..78bd86df
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbData.cs
@@ -0,0 +1,102 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+
+namespace SteamAudio
+{
+ /** Baked reverb data stored for a \c SteamAudioReverbDataPoint.
+ */
+ public class SteamAudioReverbData : ScriptableObject
+ {
+ /** Reverb times (in seconds), for use in a parametric reverb effect. One per frequency band. */
+ public float[] reverbTimes;
+
+ /** The energy field, stored in a row-major array of size (#channels x #bands x #bins). */
+ public float[] reverbEnergyField;
+
+ /** The number of channels in the energy field. */
+ public int reverbEnergyFieldNumChannels;
+
+ /** The number of bands in the energy field. */
+ public int reverbEnergyFieldNumBands;
+
+ /** The number of bins in the energy field. */
+ public int reverbEnergyFieldNumBins;
+
+ /** The impulse response, stored in a row-major array of size (#channels x #samples). */
+ public float[] reverbIR;
+
+ /** The number of channels in the impulse response. */
+ public int reverbIRNumChannels;
+
+ /** The number of samples in the impulse response. */
+ public int reverbIRNumSamples;
+
+ /** Initializes the reverb data to default (empty) values.
+ */
+ public void Initialize()
+ {
+ reverbTimes = new float[3];
+
+ reverbEnergyField = null;
+ reverbEnergyFieldNumChannels = 0;
+ reverbEnergyFieldNumBands = 0;
+ reverbEnergyFieldNumBins = 0;
+
+ reverbIR = null;
+ reverbIRNumChannels = 0;
+ reverbIRNumSamples = 0;
+ }
+
+ /** \return The total size of the impulse response (#channels x #samples).
+ */
+ public int GetImpulseResponseSize()
+ {
+ return sizeof(float) * reverbIR.Length;
+ }
+
+ /** \return The energy value stored for a particular channel, band, and bin.
+ *
+ * \param[in] channel The index of the channel.
+ * \param[in] band The index of the band.
+ * \param[in] bin The index of the bin.
+ */
+ public float GetEnergyFieldData(int channel, int band, int bin)
+ {
+ int index = (channel * reverbEnergyFieldNumBands * reverbEnergyFieldNumBins) + band * reverbEnergyFieldNumBins + bin;
+ return reverbEnergyField[index];
+ }
+
+ /** \return The total size of the energy field (#channels x #bands x #bins).
+ */
+ public int GetEnergyFieldSize()
+ {
+ return sizeof(float) * reverbEnergyField.Length;
+ }
+
+ /** \return The sample value stored for a particular channel and sample index.
+ *
+ * \param[in] channel The index of the channel.
+ * \param[in] sample The index of the sample.
+ */
+ public float GetImpulseResponseData(int channel, int sample)
+ {
+ int index = (channel * reverbIRNumSamples) + sample;
+ return reverbIR[index];
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbData.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbData.cs.meta
new file mode 100644
index 00000000..c2b7485e
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ddca39a7a8acf7243a7a2d1226a3d28a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbDataPoint.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbDataPoint.cs
new file mode 100644
index 00000000..597ff108
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbDataPoint.cs
@@ -0,0 +1,239 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+using System;
+using System.Runtime.InteropServices;
+using System.IO;
+using System.Collections.Generic;
+
+#if UNITY_EDITOR
+using UnityEditor;
+#endif
+
+namespace SteamAudio
+{
+ [AddComponentMenu("Steam Audio/Steam Audio Reverb Data Point")]
+ [ExecuteAlways]
+ public class SteamAudioReverbDataPoint : MonoBehaviour
+ {
+ public int sampleRate = 44100;
+
+ [Range(0, 3)]
+ public int ambisonicOrder = 0;
+
+ [Range(0.1f, 10.0f)]
+ public float reverbDuration = 1.0f;
+
+ public bool storeEnergyField = false;
+ public bool storeImpulseResponse = true;
+
+ [Header("Baked Data")]
+ public SteamAudioReverbData reverbData;
+
+ static List sAssetsToFlush = null;
+
+#if STEAMAUDIO_ENABLED
+ void CreateFolderRecursively(string path)
+ {
+#if UNITY_EDITOR
+ string[] parts = path.Split('/');
+ string currentPath = "";
+
+ for (int i = 1; i < parts.Length; i++)
+ {
+ currentPath += "/" + parts[i];
+ string fullPath = "Assets" + currentPath;
+
+ if (!AssetDatabase.IsValidFolder(fullPath))
+ {
+ string parentPath = string.Join("/", parts, 0, i);
+ AssetDatabase.CreateFolder(parentPath, parts[i]);
+ AssetDatabase.Refresh();
+ }
+ }
+#endif
+ }
+
+ public static string GetAssetFolderPath()
+ {
+ // Must start with Assets/
+ return "Assets/Resources/ReverbData";
+ }
+
+ static BakedDataIdentifier GetBakedDataIdentifier()
+ {
+ var identifier = new BakedDataIdentifier { };
+ identifier.type = BakedDataType.Reflections;
+ identifier.variation = BakedDataVariation.Reverb;
+ return identifier;
+ }
+
+ public void EnsureValidData()
+ {
+#if UNITY_EDITOR
+ if (reverbData != null)
+ return;
+
+ var folderPath = GetAssetFolderPath();
+
+ if (!AssetDatabase.IsValidFolder(folderPath))
+ {
+ CreateFolderRecursively(folderPath);
+ }
+
+ string assetName = $"{gameObject.name}_{Guid.NewGuid()}.asset";
+ string path = Path.Combine(folderPath, assetName);
+
+ reverbData = ScriptableObject.CreateInstance();
+ reverbData.Initialize();
+
+ AssetDatabase.CreateAsset(reverbData, path);
+ AssetDatabase.SaveAssets();
+ AssetDatabase.Refresh();
+ EditorUtility.SetDirty(this);
+#endif
+ }
+
+ public static void BeginBake(SteamAudioReverbDataPoint[] probes)
+ {
+#if UNITY_EDITOR
+ AssetDatabase.StartAssetEditing();
+#endif
+
+ var tasks = new BakedDataTask[probes.Length];
+ for (var i = 0; i < probes.Length; i++)
+ {
+ tasks[i].gameObject = probes[i].gameObject;
+ tasks[i].component = probes[i];
+ tasks[i].name = probes[i].gameObject.name;
+ tasks[i].identifier = GetBakedDataIdentifier();
+ tasks[i].probeBatches = null;
+ tasks[i].probeBatchNames = null;
+ tasks[i].probeBatchAssets = null;
+ tasks[i].probe = probes[i];
+ tasks[i].probePosition = probes[i].gameObject.transform.position;
+
+ tasks[i].probe.EnsureValidData();
+ }
+
+#if UNITY_EDITOR
+ AssetDatabase.StopAssetEditing();
+#endif
+
+ Baker.BeginBake(tasks, true);
+ }
+
+ public void UpdateEnergyField(IntPtr energyField)
+ {
+ if (!storeEnergyField)
+ {
+ reverbData.reverbEnergyFieldNumChannels = 0;
+ reverbData.reverbEnergyFieldNumBands = 0;
+ reverbData.reverbEnergyFieldNumBins = 0;
+ reverbData.reverbEnergyField = null;
+ return;
+ }
+
+ if (energyField == IntPtr.Zero)
+ return;
+
+ reverbData.reverbEnergyFieldNumChannels = API.iplEnergyFieldGetNumChannels(energyField);
+ reverbData.reverbEnergyFieldNumBands = 3;
+ reverbData.reverbEnergyFieldNumBins = API.iplEnergyFieldGetNumBins(energyField);
+ reverbData.reverbEnergyField = new float[reverbData.reverbEnergyFieldNumChannels * reverbData.reverbEnergyFieldNumBands * reverbData.reverbEnergyFieldNumBins];
+
+ IntPtr reverbEnergyFieldData = API.iplEnergyFieldGetData(energyField);
+ if (reverbEnergyFieldData == IntPtr.Zero)
+ return;
+
+ Marshal.Copy(reverbEnergyFieldData, reverbData.reverbEnergyField, 0, reverbData.reverbEnergyField.Length);
+ }
+
+ public void UpdateImpulseResponse(IntPtr ir)
+ {
+ if (!storeImpulseResponse)
+ {
+ reverbData.reverbIRNumChannels = 0;
+ reverbData.reverbIRNumSamples = 0;
+ reverbData.reverbIR = null;
+ return;
+ }
+
+ if (ir == IntPtr.Zero)
+ return;
+
+ reverbData.reverbIRNumChannels = API.iplImpulseResponseGetNumChannels(ir);
+ reverbData.reverbIRNumSamples = API.iplImpulseResponseGetNumSamples(ir);
+ reverbData.reverbIR = new float[reverbData.reverbIRNumChannels * reverbData.reverbIRNumSamples];
+
+ IntPtr reverbIRData = API.iplImpulseResponseGetData(ir);
+ if (reverbIRData == IntPtr.Zero)
+ return;
+
+ Marshal.Copy(reverbIRData, reverbData.reverbIR, 0, reverbData.reverbIR.Length);
+ }
+
+ public void WriteReverbDataToFile(bool flush = true)
+ {
+ if (flush)
+ {
+ FlushWrite(reverbData);
+ }
+ else
+ {
+ if (sAssetsToFlush == null)
+ {
+ sAssetsToFlush = new List();
+ }
+
+ sAssetsToFlush.Add(reverbData);
+ }
+ }
+
+ public static void FlushWrite(SteamAudioReverbData dataAsset)
+ {
+#if UNITY_EDITOR
+ var assetPaths = new string[1];
+ assetPaths[0] = AssetDatabase.GetAssetPath(dataAsset);
+
+ // TODO: Deprecate older versions of Unity.
+#if UNITY_2017_3_OR_NEWER
+ AssetDatabase.ForceReserializeAssets(assetPaths);
+#endif
+#endif
+ }
+
+ public static void FlushAllWrites()
+ {
+#if UNITY_EDITOR
+ AssetDatabase.StartAssetEditing();
+ if (sAssetsToFlush != null)
+ {
+ for (int i = 0; i < sAssetsToFlush.Count; ++i)
+ {
+ EditorUtility.DisplayProgressBar("Saving Assets", $"{sAssetsToFlush[i]}", ((float)(i + 1)) / sAssetsToFlush.Count);
+ FlushWrite(sAssetsToFlush[i]);
+ }
+
+ sAssetsToFlush.Clear();
+ }
+ AssetDatabase.StopAssetEditing();
+#endif
+ }
+#endif
+ }
+}
\ No newline at end of file
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbDataPoint.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbDataPoint.cs.meta
new file mode 100644
index 00000000..c6439e05
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioReverbDataPoint.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d6493fe7d181e8d47a0681aa8a5be3c8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSettings.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSettings.cs
new file mode 100644
index 00000000..1b476f70
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSettings.cs
@@ -0,0 +1,165 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using UnityEngine;
+#if UNITY_EDITOR
+using UnityEditor;
+#endif
+
+namespace SteamAudio
+{
+ public enum AudioEngineType
+ {
+ Unity,
+ FMODStudio,
+ Wwise
+ }
+
+ [CreateAssetMenu(menuName = "Steam Audio/Steam Audio Settings")]
+ public class SteamAudioSettings : ScriptableObject
+ {
+ [Header("Audio Engine Settings")]
+ public AudioEngineType audioEngine = AudioEngineType.Unity;
+
+ [Header("HRTF Settings")]
+ public bool hrtfDisabled = false;
+ public bool perspectiveCorrection = false;
+ [Range(.25f, 4.0f)]
+ public float perspectiveCorrectionFactor = 1.0f;
+ [Range(-12.0f, 12.0f)]
+ public float hrtfVolumeGainDB = 0.0f;
+ public HRTFNormType hrtfNormalizationType = HRTFNormType.None;
+ public SOFAFile[] SOFAFiles = null;
+
+ [Header("Material Settings")]
+ public SteamAudioMaterial defaultMaterial = null;
+
+ [Header("Ray Tracer Settings")]
+ public SceneType sceneType = SceneType.Default;
+ public LayerMask layerMask = new LayerMask();
+
+ [Header("Occlusion Settings")]
+ [Range(1, 128)]
+ public int maxOcclusionSamples = 16;
+
+ [Header("Real-time Reflections Settings")]
+ [Range(1024, 65536)]
+ public int realTimeRays = 4096;
+ [Range(1, 64)]
+ public int realTimeBounces = 4;
+ [Range(0.1f, 10.0f)]
+ public float realTimeDuration = 1.0f;
+ [Range(0, 3)]
+ public int realTimeAmbisonicOrder = 1;
+ [Range(1, 128)]
+ public int realTimeMaxSources = 32;
+ [Range(0, 100)]
+ public int realTimeCPUCoresPercentage = 5;
+ [Range(0.1f, 10.0f)]
+ public float realTimeIrradianceMinDistance = 1.0f;
+
+ [Header("Baked Reflections Settings")]
+ public bool bakeConvolution = true;
+ public bool bakeParametric = false;
+ [Range(1024, 65536)]
+ public int bakingRays = 16384;
+ [Range(1, 64)]
+ public int bakingBounces = 16;
+ [Range(0.1f, 10.0f)]
+ public float bakingDuration = 1.0f;
+ [Range(0, 3)]
+ public int bakingAmbisonicOrder = 1;
+ [Range(0, 100)]
+ public int bakingCPUCoresPercentage = 50;
+ [Range(0.1f, 10.0f)]
+ public float bakingIrradianceMinDistance = 1.0f;
+
+ [Header("Baked Pathing Settings")]
+ [Range(1, 32)]
+ public int bakingVisibilitySamples = 4;
+ [Range(0.0f, 2.0f)]
+ public float bakingVisibilityRadius = 1.0f;
+ [Range(0.0f, 1.0f)]
+ public float bakingVisibilityThreshold = 0.1f;
+ [Range(0.0f, 1000.0f)]
+ public float bakingVisibilityRange = 1000.0f;
+ [Range(0.0f, 1000.0f)]
+ public float bakingPathRange = 1000.0f;
+ [Range(0, 100)]
+ public int bakedPathingCPUCoresPercentage = 50;
+
+ [Header("Simulation Update Settings")]
+ [Range(0.1f, 1.0f)]
+ public float simulationUpdateInterval = 0.1f;
+
+ [Header("Reflection Effect Settings")]
+ public ReflectionEffectType reflectionEffectType = ReflectionEffectType.Convolution;
+
+ [Header("Hybrid Reverb Settings")]
+ [Range(0.1f, 2.0f)]
+ public float hybridReverbTransitionTime = 1.0f;
+ [Range(0, 100)]
+ public int hybridReverbOverlapPercent = 25;
+
+ [Header("OpenCL Settings")]
+ public OpenCLDeviceType deviceType = OpenCLDeviceType.GPU;
+ [Range(0, 16)]
+ public int maxReservedComputeUnits = 8;
+ [Range(0.0f, 1.0f)]
+ public float fractionComputeUnitsForIRUpdate = 0.5f;
+
+ [Header("Radeon Rays Settings")]
+ [Range(1, 16)]
+ public int bakingBatchSize = 8;
+
+ [Header("TrueAudio Next Settings")]
+ [Range(0.1f, 10.0f)]
+ public float TANDuration = 1.0f;
+ [Range(0, 3)]
+ public int TANAmbisonicOrder = 1;
+ [Range(1, 128)]
+ public int TANMaxSources = 32;
+
+ [Header("Advanced Settings")]
+ public bool EnableValidation = false;
+
+ static SteamAudioSettings sSingleton = null;
+
+ public static SteamAudioSettings Singleton
+ {
+ get
+ {
+ if (sSingleton == null)
+ {
+ sSingleton = Resources.Load("SteamAudioSettings");
+ if (sSingleton == null)
+ {
+ sSingleton = CreateInstance();
+ sSingleton.name = "Steam Audio Settings";
+
+#if UNITY_EDITOR
+ sSingleton.defaultMaterial = (SteamAudioMaterial) AssetDatabase.LoadAssetAtPath("Assets/Plugins/SteamAudio/Resources/Materials/Default.asset", typeof(SteamAudioMaterial));
+
+ AssetDatabase.CreateAsset(sSingleton, "Assets/Plugins/SteamAudio/Resources/SteamAudioSettings.asset");
+#endif
+ }
+ }
+
+ return sSingleton;
+ }
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSettings.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSettings.cs.meta
new file mode 100644
index 00000000..0ed17b22
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSettings.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f3efcebd75ef2af49badc83215c91685
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences:
+ - defaultMaterial: {fileID: 11400000, guid: a086f686223eed942816c70be67841b0, type: 2}
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSource.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSource.cs
new file mode 100644
index 00000000..7f2bb166
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSource.cs
@@ -0,0 +1,553 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using AOT;
+using System;
+using System.Runtime.InteropServices;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public enum DistanceAttenuationInput
+ {
+ CurveDriven,
+ PhysicsBased
+ }
+
+ public enum AirAbsorptionInput
+ {
+ SimulationDefined,
+ UserDefined
+ }
+
+ public enum DirectivityInput
+ {
+ SimulationDefined,
+ UserDefined
+ }
+
+ public enum OcclusionInput
+ {
+ SimulationDefined,
+ UserDefined
+ }
+
+ public enum TransmissionInput
+ {
+ SimulationDefined,
+ UserDefined
+ }
+
+ public enum ReflectionsType
+ {
+ Realtime,
+ BakedStaticSource,
+ BakedStaticListener
+ }
+
+ public struct AudioSourceAttenuationData
+ {
+ public AudioRolloffMode rolloffMode;
+ public float minDistance;
+ public float maxDistance;
+ public AnimationCurve curve;
+ }
+
+ [AddComponentMenu("Steam Audio/Steam Audio Source")]
+ public class SteamAudioSource : MonoBehaviour
+ {
+ [Header("HRTF Settings")]
+ public bool directBinaural = true;
+ public HRTFInterpolation interpolation = HRTFInterpolation.Nearest;
+ public bool perspectiveCorrection = false;
+
+ [Header("Attenuation Settings")]
+ public bool distanceAttenuation = false;
+ public DistanceAttenuationInput distanceAttenuationInput = DistanceAttenuationInput.CurveDriven;
+ public float distanceAttenuationValue = 1.0f;
+ public bool airAbsorption = false;
+ public AirAbsorptionInput airAbsorptionInput = AirAbsorptionInput.SimulationDefined;
+ [Range(0.0f, 1.0f)]
+ public float airAbsorptionLow = 1.0f;
+ [Range(0.0f, 1.0f)]
+ public float airAbsorptionMid = 1.0f;
+ [Range(0.0f, 1.0f)]
+ public float airAbsorptionHigh = 1.0f;
+
+ [Header("Directivity Settings")]
+ public bool directivity = false;
+ public DirectivityInput directivityInput = DirectivityInput.SimulationDefined;
+ [Range(0.0f, 1.0f)]
+ public float dipoleWeight = 0.0f;
+ [Range(0.0f, 4.0f)]
+ public float dipolePower = 0.0f;
+ [Range(0.0f, 1.0f)]
+ public float directivityValue = 1.0f;
+
+ [Header("Occlusion Settings")]
+ public bool occlusion = false;
+ public OcclusionInput occlusionInput = OcclusionInput.SimulationDefined;
+ public OcclusionType occlusionType = OcclusionType.Raycast;
+ [Range(0.0f, 4.0f)]
+ public float occlusionRadius = 1.0f;
+ [Range(1, 128)]
+ public int occlusionSamples = 16;
+ [Range(0.0f, 1.0f)]
+ public float occlusionValue = 1.0f;
+ public bool transmission = false;
+ public TransmissionType transmissionType = TransmissionType.FrequencyIndependent;
+ public TransmissionInput transmissionInput = TransmissionInput.SimulationDefined;
+ [Range(0.0f, 1.0f)]
+ public float transmissionLow = 1.0f;
+ [Range(0.0f, 1.0f)]
+ public float transmissionMid = 1.0f;
+ [Range(0.0f, 1.0f)]
+ public float transmissionHigh = 1.0f;
+ [Range(1, 8)]
+ public int maxTransmissionSurfaces = 1;
+
+ [Header("Direct Mix Settings")]
+ [Range(0.0f, 1.0f)]
+ public float directMixLevel = 1.0f;
+
+ [Header("Reflections Settings")]
+ public bool reflections = false;
+ public ReflectionsType reflectionsType = ReflectionsType.Realtime;
+ public bool useDistanceCurveForReflections = false;
+ public SteamAudioBakedSource currentBakedSource = null;
+ public IntPtr reflectionsIR = IntPtr.Zero;
+ public float reverbTimeLow = 0.0f;
+ public float reverbTimeMid = 0.0f;
+ public float reverbTimeHigh = 0.0f;
+ public float hybridReverbEQLow = 1.0f;
+ public float hybridReverbEQMid = 1.0f;
+ public float hybridReverbEQHigh = 1.0f;
+ public int hybridReverbDelay = 0;
+ public bool applyHRTFToReflections = false;
+ [Range(0.0f, 10.0f)]
+ public float reflectionsMixLevel = 1.0f;
+
+ [Header("Pathing Settings")]
+ public bool pathing = false;
+ public SteamAudioProbeBatch pathingProbeBatch = null;
+ public bool pathValidation = true;
+ public bool findAlternatePaths = true;
+ public float[] pathingEQ = new float[3] { 1.0f, 1.0f, 1.0f };
+ public float[] pathingSH = new float[16];
+ public bool applyHRTFToPathing = false;
+ [Range(0.0f, 10.0f)]
+ public float pathingMixLevel = 1.0f;
+ public bool normalizePathingEQ = false;
+
+#if STEAMAUDIO_ENABLED
+ Simulator mSimulator = null;
+ Source mSource = null;
+ AudioEngineSource mAudioEngineSource = null;
+ UnityEngine.Vector3[] mSphereVertices = null;
+ UnityEngine.Vector3[] mDeformedSphereVertices = null;
+ Mesh mDeformedSphereMesh = null;
+
+ AudioSource mAudioSource = null;
+ AudioSourceAttenuationData mAttenuationData = new AudioSourceAttenuationData { };
+ DistanceAttenuationModel mCurveAttenuationModel = new DistanceAttenuationModel { };
+ GCHandle mThis;
+ SteamAudioSettings mSettings = null;
+
+ private void Awake()
+ {
+ mSimulator = SteamAudioManager.Simulator;
+
+ var settings = SteamAudioManager.GetSimulationSettings(false);
+ mSource = new Source(SteamAudioManager.Simulator, settings);
+ mSettings = SteamAudioSettings.Singleton;
+
+ mAudioEngineSource = AudioEngineSource.Create(mSettings.audioEngine);
+ if (mAudioEngineSource != null)
+ {
+ mAudioEngineSource.Initialize(gameObject);
+ mAudioEngineSource.UpdateParameters(this);
+ }
+
+ mAudioSource = GetComponent();
+
+ mThis = GCHandle.Alloc(this);
+
+ if ((mSettings.audioEngine == AudioEngineType.Unity &&
+ distanceAttenuation &&
+ distanceAttenuationInput == DistanceAttenuationInput.CurveDriven &&
+ reflections &&
+ useDistanceCurveForReflections) ||
+ (pathing && distanceAttenuationInput == DistanceAttenuationInput.CurveDriven))
+ {
+ mAttenuationData.rolloffMode = mAudioSource.rolloffMode;
+ mAttenuationData.minDistance = mAudioSource.minDistance;
+ mAttenuationData.maxDistance = mAudioSource.maxDistance;
+ mAttenuationData.curve = mAudioSource.GetCustomCurve(AudioSourceCurveType.CustomRolloff);
+
+ mCurveAttenuationModel.type = DistanceAttenuationModelType.Callback;
+ mCurveAttenuationModel.callback = EvaluateDistanceCurve;
+ mCurveAttenuationModel.userData = GCHandle.ToIntPtr(mThis);
+ mCurveAttenuationModel.dirty = Bool.False;
+ }
+ }
+
+ private void Start()
+ {
+ if (mAudioEngineSource != null)
+ {
+ mAudioEngineSource.UpdateParameters(this);
+ }
+ }
+
+ private void OnDestroy()
+ {
+ if (mAudioEngineSource != null)
+ {
+ mAudioEngineSource.Destroy();
+ mAudioEngineSource = null;
+ }
+
+ if (mSource != null)
+ {
+ mSource.Release();
+ mSource = null;
+ }
+ }
+
+ ~SteamAudioSource()
+ {
+ if (mThis.IsAllocated)
+ {
+ mThis.Free();
+ }
+ }
+
+ private void OnEnable()
+ {
+ mSource.AddToSimulator(mSimulator);
+ SteamAudioManager.AddSource(this);
+
+ if (mAudioEngineSource != null)
+ {
+ mAudioEngineSource.UpdateParameters(this);
+ }
+ }
+
+ private void OnDisable()
+ {
+ SteamAudioManager.RemoveSource(this);
+ mSource.RemoveFromSimulator(mSimulator);
+ }
+
+ private void Update()
+ {
+ if (mAudioEngineSource != null)
+ {
+ mAudioEngineSource.UpdateParameters(this);
+ }
+ }
+
+ private void OnDrawGizmosSelected()
+ {
+ if (directivity && directivityInput == DirectivityInput.SimulationDefined && dipoleWeight > 0.0f)
+ {
+ if (mDeformedSphereMesh == null)
+ {
+ InitializeDeformedSphereMesh(32, 32);
+ }
+
+ DeformSphereMesh();
+
+ var oldColor = Gizmos.color;
+ Gizmos.color = Color.red;
+ Gizmos.DrawWireMesh(mDeformedSphereMesh, transform.position, transform.rotation);
+ Gizmos.color = oldColor;
+ }
+ }
+
+ public void SetInputs(SimulationFlags flags)
+ {
+ var listener = SteamAudioManager.GetSteamAudioListener();
+
+ var inputs = new SimulationInputs { };
+ inputs.source.origin = Common.ConvertVector(transform.position);
+ inputs.source.ahead = Common.ConvertVector(transform.forward);
+ inputs.source.up = Common.ConvertVector(transform.up);
+ inputs.source.right = Common.ConvertVector(transform.right);
+
+ if (mSettings.audioEngine == AudioEngineType.Unity &&
+ distanceAttenuation &&
+ distanceAttenuationInput == DistanceAttenuationInput.CurveDriven &&
+ reflections &&
+ useDistanceCurveForReflections)
+ {
+ inputs.distanceAttenuationModel = mCurveAttenuationModel;
+ }
+ else if (pathing && distanceAttenuationInput == DistanceAttenuationInput.CurveDriven)
+ {
+ inputs.distanceAttenuationModel = mCurveAttenuationModel;
+ }
+ else
+ {
+ inputs.distanceAttenuationModel.type = DistanceAttenuationModelType.Default;
+ }
+
+ inputs.airAbsorptionModel.type = AirAbsorptionModelType.Default;
+ inputs.directivity.dipoleWeight = dipoleWeight;
+ inputs.directivity.dipolePower = dipolePower;
+ inputs.occlusionType = occlusionType;
+ inputs.occlusionRadius = occlusionRadius;
+ inputs.numOcclusionSamples = occlusionSamples;
+ inputs.numTransmissionRays = maxTransmissionSurfaces;
+ inputs.reverbScaleLow = 1.0f;
+ inputs.reverbScaleMid = 1.0f;
+ inputs.reverbScaleHigh = 1.0f;
+ inputs.hybridReverbTransitionTime = mSettings.hybridReverbTransitionTime;
+ inputs.hybridReverbOverlapPercent = mSettings.hybridReverbOverlapPercent / 100.0f;
+ inputs.baked = (reflectionsType != ReflectionsType.Realtime) ? Bool.True : Bool.False;
+ inputs.pathingProbes = (pathingProbeBatch != null) ? pathingProbeBatch.GetProbeBatch() : IntPtr.Zero;
+ inputs.visRadius = mSettings.bakingVisibilityRadius;
+ inputs.visThreshold = mSettings.bakingVisibilityThreshold;
+ inputs.visRange = mSettings.bakingVisibilityRange;
+ inputs.pathingOrder = mSettings.realTimeAmbisonicOrder;
+ inputs.enableValidation = pathValidation ? Bool.True : Bool.False;
+ inputs.findAlternatePaths = findAlternatePaths ? Bool.True : Bool.False;
+
+ if (reflectionsType == ReflectionsType.BakedStaticSource)
+ {
+ if (currentBakedSource != null)
+ {
+ inputs.bakedDataIdentifier = currentBakedSource.GetBakedDataIdentifier();
+ }
+ }
+ else if (reflectionsType == ReflectionsType.BakedStaticListener)
+ {
+ if (listener != null && listener.currentBakedListener != null)
+ {
+ inputs.bakedDataIdentifier = listener.currentBakedListener.GetBakedDataIdentifier();
+ }
+ }
+
+ inputs.flags = SimulationFlags.Direct;
+ if (reflections)
+ {
+ if ((reflectionsType == ReflectionsType.Realtime) ||
+ (reflectionsType == ReflectionsType.BakedStaticSource && currentBakedSource != null) ||
+ (reflectionsType == ReflectionsType.BakedStaticListener && listener != null && listener.currentBakedListener != null))
+ {
+ inputs.flags = inputs.flags | SimulationFlags.Reflections;
+ }
+ }
+ if (pathing)
+ {
+ if (pathingProbeBatch == null)
+ {
+ pathing = false;
+ Debug.LogWarningFormat("Pathing probe batch not set, disabling pathing for source {0}.", gameObject.name);
+ }
+ else
+ {
+ inputs.flags = inputs.flags | SimulationFlags.Pathing;
+ }
+ }
+
+ inputs.directFlags = 0;
+ if (distanceAttenuation)
+ inputs.directFlags = inputs.directFlags | DirectSimulationFlags.DistanceAttenuation;
+ if (airAbsorption)
+ inputs.directFlags = inputs.directFlags | DirectSimulationFlags.AirAbsorption;
+ if (directivity)
+ inputs.directFlags = inputs.directFlags | DirectSimulationFlags.Directivity;
+ if (occlusion)
+ inputs.directFlags = inputs.directFlags | DirectSimulationFlags.Occlusion;
+ if (transmission)
+ inputs.directFlags = inputs.directFlags | DirectSimulationFlags.Transmission;
+
+ mSource.SetInputs(flags, inputs);
+ }
+
+ public SimulationOutputs GetOutputs(SimulationFlags flags)
+ {
+ return mSource.GetOutputs(flags);
+ }
+
+ public Source GetSource()
+ {
+ return mSource;
+ }
+
+ public void UpdateOutputs(SimulationFlags flags)
+ {
+ var outputs = mSource.GetOutputs(flags);
+
+ if (SteamAudioSettings.Singleton.audioEngine == AudioEngineType.Unity &&
+ ((flags & SimulationFlags.Direct) != 0))
+ {
+ if (distanceAttenuation && distanceAttenuationInput == DistanceAttenuationInput.PhysicsBased)
+ {
+ distanceAttenuationValue = outputs.direct.distanceAttenuation;
+ }
+
+ if (airAbsorption && airAbsorptionInput == AirAbsorptionInput.SimulationDefined)
+ {
+ airAbsorptionLow = outputs.direct.airAbsorptionLow;
+ airAbsorptionMid = outputs.direct.airAbsorptionMid;
+ airAbsorptionHigh = outputs.direct.airAbsorptionHigh;
+ }
+
+ if (directivity && directivityInput == DirectivityInput.SimulationDefined)
+ {
+ directivityValue = outputs.direct.directivity;
+ }
+
+ if (occlusion && occlusionInput == OcclusionInput.SimulationDefined)
+ {
+ occlusionValue = outputs.direct.occlusion;
+ }
+
+ if (transmission && transmissionInput == TransmissionInput.SimulationDefined)
+ {
+ transmissionLow = outputs.direct.transmissionLow;
+ transmissionMid = outputs.direct.transmissionMid;
+ transmissionHigh = outputs.direct.transmissionHigh;
+ }
+ }
+
+ if (pathing && ((flags & SimulationFlags.Pathing) != 0))
+ {
+ outputs.pathing.eqCoeffsLow = Mathf.Max(0.1f, outputs.pathing.eqCoeffsLow);
+ outputs.pathing.eqCoeffsMid = Mathf.Max(0.1f, outputs.pathing.eqCoeffsMid);
+ outputs.pathing.eqCoeffsHigh = Mathf.Max(0.1f, outputs.pathing.eqCoeffsHigh);
+ }
+ }
+
+ void InitializeDeformedSphereMesh(int nPhi, int nTheta)
+ {
+ var dPhi = (2.0f * Mathf.PI) / nPhi;
+ var dTheta = Mathf.PI / nTheta;
+
+ mSphereVertices = new UnityEngine.Vector3[nPhi * nTheta];
+ var index = 0;
+ for (var i = 0; i < nPhi; ++i)
+ {
+ var phi = i * dPhi;
+ for (var j = 0; j < nTheta; ++j)
+ {
+ var theta = (j * dTheta) - (0.5f * Mathf.PI);
+
+ var x = Mathf.Cos(theta) * Mathf.Sin(phi);
+ var y = Mathf.Sin(theta);
+ var z = Mathf.Cos(theta) * -Mathf.Cos(phi);
+
+ var vertex = new UnityEngine.Vector3(x, y, z);
+
+ mSphereVertices[index++] = vertex;
+ }
+ }
+
+ mDeformedSphereVertices = new UnityEngine.Vector3[nPhi * nTheta];
+ Array.Copy(mSphereVertices, mDeformedSphereVertices, mSphereVertices.Length);
+
+ var indices = new int[6 * nPhi * (nTheta - 1)];
+ index = 0;
+ for (var i = 0; i < nPhi; ++i)
+ {
+ for (var j = 0; j < nTheta - 1; ++j)
+ {
+ var i0 = i * nTheta + j;
+ var i1 = i * nTheta + (j + 1);
+ var i2 = ((i + 1) % nPhi) * nTheta + (j + 1);
+ var i3 = ((i + 1) % nPhi) * nTheta + j;
+
+ indices[index++] = i0;
+ indices[index++] = i1;
+ indices[index++] = i2;
+ indices[index++] = i0;
+ indices[index++] = i2;
+ indices[index++] = i3;
+ }
+ }
+
+ mDeformedSphereMesh = new Mesh();
+ mDeformedSphereMesh.vertices = mDeformedSphereVertices;
+ mDeformedSphereMesh.triangles = indices;
+ mDeformedSphereMesh.RecalculateNormals();
+ }
+
+ void DeformSphereMesh()
+ {
+ for (var i = 0; i < mSphereVertices.Length; ++i)
+ {
+ mDeformedSphereVertices[i] = DeformedVertex(mSphereVertices[i]);
+ }
+
+ mDeformedSphereMesh.vertices = mDeformedSphereVertices;
+ }
+
+ UnityEngine.Vector3 DeformedVertex(UnityEngine.Vector3 vertex)
+ {
+ var cosine = vertex.z;
+ var r = Mathf.Pow(Mathf.Abs((1.0f - dipoleWeight) + dipoleWeight * cosine), dipolePower);
+ var deformedVertex = vertex;
+ deformedVertex.Scale(new UnityEngine.Vector3(r, r, r));
+ return deformedVertex;
+ }
+
+ [MonoPInvokeCallback(typeof(DistanceAttenuationCallback))]
+ public static float EvaluateDistanceCurve(float distance, IntPtr userData)
+ {
+ var target = (SteamAudioSource) GCHandle.FromIntPtr(userData).Target;
+
+ var rMin = target.mAttenuationData.minDistance;
+ var rMax = target.mAttenuationData.maxDistance;
+
+ switch (target.mAttenuationData.rolloffMode)
+ {
+ case AudioRolloffMode.Logarithmic:
+ if (distance < rMin)
+ return 1.0f;
+ else if (distance > rMax)
+ return 0.0f;
+ else
+ return rMin / distance;
+
+ case AudioRolloffMode.Linear:
+ if (distance < rMin)
+ return 1.0f;
+ else if (distance > rMax)
+ return 0.0f;
+ else
+ return (rMax - distance) / (rMax - rMin);
+
+ case AudioRolloffMode.Custom:
+#if UNITY_2018_1_OR_NEWER
+ return target.mAttenuationData.curve.Evaluate(distance / rMax);
+#else
+ if (distance < rMin)
+ return 1.0f;
+ else if (distance > rMax)
+ return 0.0f;
+ else
+ return rMin / distance;
+#endif
+
+ default:
+ return 0.0f;
+ }
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSource.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSource.cs.meta
new file mode 100644
index 00000000..a3663cc4
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioSource.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 59c3684b22f00604a97bb68037fcf4cd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioStaticMesh.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioStaticMesh.cs
new file mode 100644
index 00000000..17862344
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioStaticMesh.cs
@@ -0,0 +1,94 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System.Threading.Tasks;
+
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public class SteamAudioStaticMesh : MonoBehaviour
+ {
+ [Header("Export Settings")]
+ public SerializedData asset = null;
+ public string sceneNameWhenExported = "";
+
+#if STEAMAUDIO_ENABLED
+ StaticMesh mStaticMesh = null;
+ Task mTask = null;
+
+ void Start()
+ {
+ if (asset == null)
+ {
+ Debug.LogWarningFormat("No asset set for Steam Audio Static Mesh in scene {0}. Export the scene before clicking Play.",
+ gameObject.scene.name);
+ }
+ }
+
+ void OnDestroy()
+ {
+ if (mStaticMesh != null)
+ {
+ mStaticMesh.Release();
+ }
+ else if (mTask != null)
+ {
+ mTask.ContinueWith(static e => e.Result.Release());
+ }
+ }
+
+ void OnEnable()
+ {
+ if (mStaticMesh != null)
+ {
+ mStaticMesh.AddToScene(SteamAudioManager.CurrentScene);
+ SteamAudioManager.ScheduleCommitScene();
+ }
+ }
+
+ void OnDisable()
+ {
+ if (mStaticMesh != null && SteamAudioManager.CurrentScene != null)
+ {
+ mStaticMesh.RemoveFromScene(SteamAudioManager.CurrentScene);
+ SteamAudioManager.ScheduleCommitScene();
+ }
+ }
+
+ void Update()
+ {
+ if (mStaticMesh == null && asset != null)
+ {
+ if (mTask == null)
+ {
+ mTask = Task.Run(() => new StaticMesh(SteamAudioManager.Context, SteamAudioManager.CurrentScene, asset));
+ }
+ else if (mTask.IsCompleted)
+ {
+ mStaticMesh = mTask.Result;
+ mTask = null;
+ if (enabled)
+ {
+ mStaticMesh.AddToScene(SteamAudioManager.CurrentScene);
+ SteamAudioManager.ScheduleCommitScene();
+ }
+ }
+ }
+ }
+#endif
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioStaticMesh.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioStaticMesh.cs.meta
new file mode 100644
index 00000000..34cc7f74
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/SteamAudioStaticMesh.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8173b2a8dbe2d2d48995bb2ba9a49ff1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/TrueAudioNextDevice.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/TrueAudioNextDevice.cs
new file mode 100644
index 00000000..ede43d54
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/TrueAudioNextDevice.cs
@@ -0,0 +1,58 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+
+namespace SteamAudio
+{
+ public class TrueAudioNextDevice
+ {
+ IntPtr mTrueAudioNextDevice = IntPtr.Zero;
+
+ public TrueAudioNextDevice(OpenCLDevice openCLDevice, int frameSize, int irSize, int order, int maxSources)
+ {
+ var deviceSettings = new TrueAudioNextDeviceSettings { };
+ deviceSettings.frameSize = frameSize;
+ deviceSettings.irSize = irSize;
+ deviceSettings.order = order;
+ deviceSettings.maxSources = maxSources;
+
+ var status = API.iplTrueAudioNextDeviceCreate(openCLDevice.Get(), ref deviceSettings, out mTrueAudioNextDevice);
+ if (status != Error.Success)
+ throw new Exception(string.Format("Unable to create TrueAudio Next device. [{0}]", status));
+ }
+
+ public TrueAudioNextDevice(TrueAudioNextDevice device)
+ {
+ mTrueAudioNextDevice = API.iplTrueAudioNextDeviceRetain(device.mTrueAudioNextDevice);
+ }
+
+ ~TrueAudioNextDevice()
+ {
+ Release();
+ }
+
+ public void Release()
+ {
+ API.iplTrueAudioNextDeviceRelease(ref mTrueAudioNextDevice);
+ }
+
+ public IntPtr Get()
+ {
+ return mTrueAudioNextDevice;
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/TrueAudioNextDevice.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/TrueAudioNextDevice.cs.meta
new file mode 100644
index 00000000..5e82d3d1
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/TrueAudioNextDevice.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fdd785831c5dd8c43ab06d5c23bb56c6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineAmbisonicSource.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineAmbisonicSource.cs
new file mode 100644
index 00000000..c1ad6e3c
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineAmbisonicSource.cs
@@ -0,0 +1,40 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public sealed class UnityAudioEngineAmbisonicSource : AudioEngineAmbisonicSource
+ {
+ AudioSource mAudioSource = null;
+
+ public override void Initialize(GameObject gameObject)
+ {
+ mAudioSource = gameObject.GetComponent();
+ }
+
+ public override void UpdateParameters(SteamAudioAmbisonicSource ambisonicSource)
+ {
+ if (!mAudioSource)
+ return;
+
+ var index = 0;
+ mAudioSource.SetAmbisonicDecoderFloat(index++, (ambisonicSource.applyHRTF) ? 1.0f : 0.0f);
+ }
+ }
+}
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineAmbisonicSource.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineAmbisonicSource.cs.meta
new file mode 100644
index 00000000..9a3f5f28
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineAmbisonicSource.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c6e7b360f01d93347b477af15e75be7f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineSource.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineSource.cs
new file mode 100644
index 00000000..963f5ee0
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineSource.cs
@@ -0,0 +1,99 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public sealed class UnityAudioEngineSource : AudioEngineSource
+ {
+ AudioSource mAudioSource = null;
+ SteamAudioSource mSteamAudioSource = null;
+ int mHandle = -1;
+
+ public override void Initialize(GameObject gameObject)
+ {
+ mAudioSource = gameObject.GetComponent();
+
+ mSteamAudioSource = gameObject.GetComponent();
+ if (mSteamAudioSource)
+ {
+ mHandle = API.iplUnityAddSource(mSteamAudioSource.GetSource().Get());
+ }
+ }
+
+ public override void Destroy()
+ {
+ var index = 28;
+
+ if (mAudioSource != null)
+ {
+ mAudioSource.SetSpatializerFloat(index, -1);
+ }
+
+ if (mSteamAudioSource)
+ {
+ API.iplUnityRemoveSource(mHandle);
+ }
+ }
+
+ public override void UpdateParameters(SteamAudioSource source)
+ {
+ if (!mAudioSource)
+ return;
+
+ var index = 0;
+ mAudioSource.SetSpatializerFloat(index++, (source.distanceAttenuation) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, (source.airAbsorption) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, (source.directivity) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, (source.occlusion) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, (source.transmission) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, (source.reflections) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, (source.pathing) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, (float) source.interpolation);
+ mAudioSource.SetSpatializerFloat(index++, source.distanceAttenuationValue);
+ mAudioSource.SetSpatializerFloat(index++, (source.distanceAttenuationInput == DistanceAttenuationInput.CurveDriven) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, source.airAbsorptionLow);
+ mAudioSource.SetSpatializerFloat(index++, source.airAbsorptionMid);
+ mAudioSource.SetSpatializerFloat(index++, source.airAbsorptionHigh);
+ mAudioSource.SetSpatializerFloat(index++, (source.airAbsorptionInput == AirAbsorptionInput.UserDefined) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, source.directivityValue);
+ mAudioSource.SetSpatializerFloat(index++, source.dipoleWeight);
+ mAudioSource.SetSpatializerFloat(index++, source.dipolePower);
+ mAudioSource.SetSpatializerFloat(index++, (source.directivityInput == DirectivityInput.UserDefined) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, source.occlusionValue);
+ mAudioSource.SetSpatializerFloat(index++, (float) source.transmissionType);
+ mAudioSource.SetSpatializerFloat(index++, source.transmissionLow);
+ mAudioSource.SetSpatializerFloat(index++, source.transmissionMid);
+ mAudioSource.SetSpatializerFloat(index++, source.transmissionHigh);
+ mAudioSource.SetSpatializerFloat(index++, source.directMixLevel);
+ mAudioSource.SetSpatializerFloat(index++, (source.applyHRTFToReflections) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, source.reflectionsMixLevel);
+ mAudioSource.SetSpatializerFloat(index++, (source.applyHRTFToPathing) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, source.pathingMixLevel);
+ index++; // Skip 2 deprecated params.
+ index++;
+ mAudioSource.SetSpatializerFloat(index++, (source.directBinaural) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, mHandle);
+ mAudioSource.SetSpatializerFloat(index++, (source.perspectiveCorrection) ? 1.0f : 0.0f);
+ mAudioSource.SetSpatializerFloat(index++, (source.normalizePathingEQ) ? 1.0f : 0.0f);
+ }
+ }
+}
+
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineSource.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineSource.cs.meta
new file mode 100644
index 00000000..198e36ed
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineSource.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 92cc150395b3d034aa2e8fc975634251
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineState.cs b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineState.cs
new file mode 100644
index 00000000..7cfee921
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineState.cs
@@ -0,0 +1,87 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#if STEAMAUDIO_ENABLED
+
+using System;
+using UnityEngine;
+
+namespace SteamAudio
+{
+ public sealed class UnityAudioEngineState : AudioEngineState
+ {
+ public override void Initialize(IntPtr context, IntPtr defaultHRTF, SimulationSettings simulationSettings, PerspectiveCorrection correction)
+ {
+ API.iplUnityInitialize(context);
+ API.iplUnitySetHRTF(defaultHRTF);
+ API.iplUnitySetSimulationSettings(simulationSettings);
+ API.iplUnitySetPerspectiveCorrection(correction);
+ }
+
+ public override void Destroy()
+ {
+ API.iplUnityTerminate();
+ }
+
+ public override void SetHRTF(IntPtr hrtf)
+ {
+ API.iplUnitySetHRTF(hrtf);
+ }
+
+ public override void SetPerspectiveCorrection(PerspectiveCorrection correction)
+ {
+ API.iplUnitySetPerspectiveCorrection(correction);
+ }
+
+ public override void SetReverbSource(Source reverbSource)
+ {
+ API.iplUnitySetReverbSource(reverbSource.Get());
+ }
+
+ public override void SetHRTFDisabled(bool disabled)
+ {
+ base.SetHRTFDisabled(disabled);
+
+ API.iplUnitySetHRTFDisabled(disabled);
+ }
+ }
+
+ public sealed class UnityAudioEngineStateHelpers : AudioEngineStateHelpers
+ {
+ public override Transform GetListenerTransform()
+ {
+#if UNITY_2023_3_OR_NEWER
+ var audioListener = GameObject.FindFirstObjectByType();
+#else
+ var audioListener = GameObject.FindObjectOfType();
+#endif
+ return (audioListener != null) ? audioListener.transform : null;
+ }
+
+ public override AudioSettings GetAudioSettings()
+ {
+ var audioSettings = new AudioSettings { };
+
+ audioSettings.samplingRate = UnityEngine.AudioSettings.outputSampleRate;
+
+ var numBuffers = 0;
+ UnityEngine.AudioSettings.GetDSPBufferSize(out audioSettings.frameSize, out numBuffers);
+
+ return audioSettings;
+ }
+ }
+}
+
+#endif
diff --git a/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineState.cs.meta b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineState.cs.meta
new file mode 100644
index 00000000..6bcd9dd3
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/Scripts/Runtime/UnityAudioEngineState.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a1c6ea05d9a254e4eb65412b568878b5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/SteamAudio/SteamAudioUnity.asmdef b/Assets/Plugins/SteamAudio/SteamAudioUnity.asmdef
new file mode 100644
index 00000000..241b5799
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/SteamAudioUnity.asmdef
@@ -0,0 +1,14 @@
+{
+ "name": "SteamAudioUnity",
+ "rootNamespace": "",
+ "references": [],
+ "includePlatforms": [],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": true,
+ "defineConstraints": [],
+ "versionDefines": [],
+ "noEngineReferences": false
+}
\ No newline at end of file
diff --git a/Assets/Plugins/SteamAudio/SteamAudioUnity.asmdef.meta b/Assets/Plugins/SteamAudio/SteamAudioUnity.asmdef.meta
new file mode 100644
index 00000000..fd8cc5f3
--- /dev/null
+++ b/Assets/Plugins/SteamAudio/SteamAudioUnity.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 558d81aa619cc114fbdab8165212bc9d
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/_PROJECT/Components/NewHandPresence/Prefabs/XR Origin.prefab b/Assets/_PROJECT/Components/NewHandPresence/Prefabs/XR Origin.prefab
index 1707db12..ebed2193 100644
--- a/Assets/_PROJECT/Components/NewHandPresence/Prefabs/XR Origin.prefab
+++ b/Assets/_PROJECT/Components/NewHandPresence/Prefabs/XR Origin.prefab
@@ -2626,6 +2626,7 @@ GameObject:
- component: {fileID: 6982718084823378580}
- component: {fileID: 7143839380141204878}
- component: {fileID: 4420552791209831543}
+ - component: {fileID: 2875548118707696675}
m_Layer: 0
m_Name: XR Origin
m_TagString: Player
@@ -2757,6 +2758,35 @@ MonoBehaviour:
m_EditorClassIdentifier:
nonRigidbodyVelocity: 0
attenuationObject: {fileID: 3865165877314776266}
+--- !u!114 &2875548118707696675
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 3865165877314776266}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 6fd9ebf1401392e4bbd47fea32f47642, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ currentBakedListener: {fileID: 0}
+ applyReverb: 0
+ reverbType: 0
+ useAllProbeBatches: 0
+ probeBatches: []
+ mTotalDataSize: 0
+ mProbeDataSizes:
+ mIdentifier:
+ type: 0
+ variation: 0
+ endpointInfluence:
+ center:
+ x: 0
+ y: 0
+ z: 0
+ radius: 0
+ mProbeBatchesUsed: []
--- !u!1 &3920485686434598800
GameObject:
m_ObjectHideFlags: 0
diff --git a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity
index a460f0f6..c14c52e2 100644
--- a/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity
+++ b/Assets/_PROJECT/Scenes/DeltaBuilding_base.unity
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d7afcb7e4ea4ce2202fddb9e795185870f02af3f8979b3ce9e6bc103431f9d17
-size 63664267
+oid sha256:acbbdeb25a0ce3b31af8aa9265f49d606d4031bc1057a4ef0f2fd8a872cf85ca
+size 63665529
diff --git a/DeltaVRFMOD/.cache/buildrecords/Desktop/Ambience.br b/DeltaVRFMOD/.cache/buildrecords/Desktop/Ambience.br
index 8c3db878..98032f23 100644
Binary files a/DeltaVRFMOD/.cache/buildrecords/Desktop/Ambience.br and b/DeltaVRFMOD/.cache/buildrecords/Desktop/Ambience.br differ
diff --git a/DeltaVRFMOD/.cache/buildrecords/Desktop/Master.br b/DeltaVRFMOD/.cache/buildrecords/Desktop/Master.br
index 476b22e3..4aef6ba8 100644
Binary files a/DeltaVRFMOD/.cache/buildrecords/Desktop/Master.br and b/DeltaVRFMOD/.cache/buildrecords/Desktop/Master.br differ
diff --git a/DeltaVRFMOD/Build/Desktop/Desktop/Ambience.bank b/DeltaVRFMOD/Build/Desktop/Desktop/Ambience.bank
index ca205532..f62c292d 100644
Binary files a/DeltaVRFMOD/Build/Desktop/Desktop/Ambience.bank and b/DeltaVRFMOD/Build/Desktop/Desktop/Ambience.bank differ
diff --git a/DeltaVRFMOD/Build/Desktop/Desktop/Master.bank b/DeltaVRFMOD/Build/Desktop/Desktop/Master.bank
index 9f4b8737..96ddcb3e 100644
Binary files a/DeltaVRFMOD/Build/Desktop/Desktop/Master.bank and b/DeltaVRFMOD/Build/Desktop/Desktop/Master.bank differ
diff --git a/DeltaVRFMOD/Build/Desktop/Desktop/Master.strings.bank b/DeltaVRFMOD/Build/Desktop/Desktop/Master.strings.bank
index c543fb91..6c1544e7 100644
Binary files a/DeltaVRFMOD/Build/Desktop/Desktop/Master.strings.bank and b/DeltaVRFMOD/Build/Desktop/Desktop/Master.strings.bank differ
diff --git a/DeltaVRFMOD/Metadata/Event/{0cc3b481-962c-43bc-a963-058a71c1632b}.xml b/DeltaVRFMOD/Metadata/Event/{0cc3b481-962c-43bc-a963-058a71c1632b}.xml
index df53f6d0..14d63c11 100644
--- a/DeltaVRFMOD/Metadata/Event/{0cc3b481-962c-43bc-a963-058a71c1632b}.xml
+++ b/DeltaVRFMOD/Metadata/Event/{0cc3b481-962c-43bc-a963-058a71c1632b}.xml
@@ -5,7 +5,7 @@
PortalSpacial
- 2
+ 5
{e5bf65ee-d6e7-4aa2-8f58-f527d31905fa}
@@ -207,9 +207,9 @@
@@ -263,6 +263,7 @@
{50c8ed2a-a7f5-474d-bb5e-242ed4771c16}
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
0
@@ -219,6 +218,11 @@
{13c29f0f-d7ad-4af2-bf22-c5468f594b34}
+
+
+ {942b2238-e463-4e25-ab5c-513f4933529d}
+
+
@@ -268,6 +272,49 @@
{65c8f93e-5edb-40cf-a416-4132ff5dd997}
+
+
+ Steam Audio Spatializer
+
+
+ {293624d7-97c8-42d7-82a7-f1cd18c6e62b}
+ {ea31bd33-0ef9-4b90-abd8-107fafec35d1}
+ {277f9588-f6bb-41b4-a152-2fe3ba92ea2d}
+ {a4974dcd-9749-4a6d-8fac-3a69c833d433}
+ {19673356-b019-4321-8e89-a3e50a5e447f}
+ {ac90a2f0-118e-43af-9ceb-8160d2d4896e}
+ {0cf9e3c6-24ed-4431-94f1-af3831da9ae2}
+ {d803597f-2344-432f-906a-92f47999a7c4}
+ {fb8fa939-121f-41e0-9228-e6819389dafe}
+ {a50965a4-1ff6-4e06-894c-68ad90096ded}
+ {de9f7fa9-fbc2-4b64-ac6e-fed09dc51e53}
+ {38ba093b-fc01-4b44-ba23-84326a6ed40c}
+ {9e5686d5-9808-4e81-bcd9-4a76608aef4a}
+ {d43eaf37-1ae1-4bdc-96b3-f133d12b723f}
+ {62584e2e-2f8b-411a-97d9-d39451eadd87}
+ {b4ae4a15-95e3-4ede-99b1-16c4d3615a60}
+ {44174e6a-f2c3-4290-a8f6-fd475c250fda}
+ {a6e8670a-da4a-4309-87bf-f7f6f523e234}
+ {236659f7-b57f-4b7f-be73-5c9dc75a95a5}
+ {5f87fa16-9552-47e8-883d-34c7dd29e388}
+ {80e518f3-f63d-4cca-aceb-f9edf835ecf5}
+ {9c102233-6623-42ca-80e6-d03f09ae9744}
+ {cb411241-ee2f-4133-8ad3-34aacafbcc2f}
+ {ade8734a-9bfc-4f6c-be4f-234115c8f0cb}
+ {43c448bb-a73b-4cf3-bc1b-38d3d0f9a1da}
+ {6d95c24b-a459-4e94-a66d-e1eb8ae5427d}
+ {3911a214-6ebc-40ee-82fc-9f1b4b34a284}
+ {0c5650f9-1614-47ef-8494-0f6ba6258e7d}
+ {7ac7f9db-787d-4126-9016-5dbe4ec73e5f}
+ {fec34ed7-13dc-4f3b-809a-3cbc3fb14a89}
+ {29f69b91-3a3f-46ad-8ac0-38ed851390ba}
+ {8ce1e288-7d98-4221-990b-aa0031151d49}
+ {d17fd89a-d489-4f3b-b9ef-ab60b80644b7}
+ {8e894fcd-9f55-4e36-b380-1d0676247f96}
+ {08c4480c-f911-44cf-a969-3f3518811d9b}
+ {5411aa48-234a-4856-92ec-3bab6c16474d}
+
+
{fb894807-eb7f-48db-b3de-e2f5dd3322a2}
@@ -280,6 +327,406 @@
{39a64079-574e-4732-8782-0ffc044cbf8b}
+
+
+ SourcePos
+
+
+
+ -2
+
+
+
+
+ OverallGain
+
+
+
+ -1
+
+
+
+
+ ApplyDA
+
+
+ 2
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyAA
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyDir
+
+
+ 2
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyOccl
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyTrans
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyRefl
+
+
+ false
+
+
+
+
+ ApplyPath
+
+
+ false
+
+
+
+
+ Interpolation
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+
+
+ DistAtt
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DAType
+
+
+ 3
+
+
+ 0
+
+
+ 4
+
+
+
+
+ DAMinDist
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10000.000000)}
+
+
+
+
+ DAMaxDist
+
+
+ 20
+
+
+ {(0.000000,0.000000)(1.000000,10000.000000)}
+
+
+
+
+ AirAbsLow
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ AirAbsMid
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ AirAbsHigh
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ Directivity
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DipoleWeight
+
+
+ 0
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DipolePower
+
+
+ 1
+
+
+ {(0.000000,1.000000)(1.000000,4.000000)}
+
+
+
+
+ Occlusion
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransType
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+
+
+ TransLow
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransMid
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransHigh
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DirMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ ReflBinaural
+
+
+ false
+
+
+
+
+ ReflMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10.000000)}
+
+
+
+
+ PathBinaural
+
+
+ false
+
+
+
+
+ PathMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10.000000)}
+
+
+
+
+ SimOutputs
+
+
+
+ 0
+
+
+
+
+ DirectBinaural
+
+
+ true
+
+
+
+
+ DistRange
+
+
+
+ -6
+
+
+
+
+ SimOutHandle
+
+
+ -1
+
+
+ -1
+
+
+ 10000
+
+
+
+
+ OutputFormat
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ PathNormEQ
+
+
+ false
+
+
0
diff --git a/DeltaVRFMOD/Metadata/Event/{11bf17f9-9c7d-44f2-b105-627916d832e6}.xml b/DeltaVRFMOD/Metadata/Event/{11bf17f9-9c7d-44f2-b105-627916d832e6}.xml
index 2f206e4f..4a9b94f4 100644
--- a/DeltaVRFMOD/Metadata/Event/{11bf17f9-9c7d-44f2-b105-627916d832e6}.xml
+++ b/DeltaVRFMOD/Metadata/Event/{11bf17f9-9c7d-44f2-b105-627916d832e6}.xml
@@ -5,7 +5,7 @@
Cafe
- 2
+ 5
{e5bf65ee-d6e7-4aa2-8f58-f527d31905fa}
@@ -68,11 +68,8 @@
-
- 0.200000003
-
- 45
+ 65
@@ -208,7 +205,7 @@
{c0ec98cf-5478-4926-8cbe-53725111fa06}
- {dde61758-0fda-4236-b9eb-cbb8ca7d58e1}
+ {b8a30782-ccf8-49f2-a792-761ba82ee67a}
{c2bf834d-7ae6-4de6-8ef9-5bf74b851a31}
@@ -264,7 +261,11 @@
-
+
+
+ {faae6a60-5b2c-4ce0-afcf-00524d7868ff}
+
+
22000
@@ -336,6 +337,49 @@
-6
+
+
+ Steam Audio Spatializer
+
+
+ {db34e265-1fea-4d3b-a0b8-c9c5728c5447}
+ {9d55c8d3-0446-441a-8e7b-391604958e82}
+ {4b652e6d-cf41-48a1-9861-fabe7bd1e705}
+ {c42bb6c4-c0ed-43ec-9270-d94877f6f53a}
+ {6bbd850a-f2bd-4cd9-a9f2-a89b13fa201e}
+ {e2024f5a-0cc9-42de-9f39-4f72a3ae95f6}
+ {be1b58a8-6146-4027-92be-3b8850e582da}
+ {d4c52767-07c3-4b1a-afa5-cbfbb2f8e4bc}
+ {1a8bc619-5e62-4aa4-a62f-9dd1162b4e6c}
+ {59d2d217-d1a0-492f-8fa9-058a4ae6cbe2}
+ {6478d5e6-d68f-4b0b-96c4-a7a0d63a2fa0}
+ {4b18d757-5751-4993-9ca4-d2ae325671bd}
+ {e4245c7b-7ae8-4e77-8a73-4de1bf7bb91b}
+ {8a563a29-a97c-49e7-835d-7dfaf9ffb8ec}
+ {8829b2a6-ec4e-4abc-8430-123c0eef5ba8}
+ {67b5b817-26ec-4de1-b0b1-b73f07b7170b}
+ {bafc43a7-6cd0-4258-abde-be6107d3f277}
+ {3901fb08-5d1d-4e1d-8d4a-3c789a7f97b3}
+ {63f1839b-e2f4-4777-b794-42459807727f}
+ {cbb896df-47e2-4a3b-942d-2e9cf82cfe83}
+ {ecd1c593-b9af-4369-9476-ee7c504fd5e0}
+ {5cb7fb00-ef3e-4c48-94c6-4ee8bf5086a3}
+ {af629706-310e-49cd-ac52-ee68f0c819fd}
+ {c8d1f4ab-1580-460e-965c-eb4fc31e8362}
+ {92be1ba2-6cfb-4430-8111-4b123eee46b5}
+ {ab66ee80-a868-4aec-90a6-81651db575c6}
+ {75767ed5-9779-4a61-8e5c-ff5f5e76a28e}
+ {908012c4-cc6a-4a9f-8290-b5ecb1c93993}
+ {3e219b68-77d0-4863-909d-74739332f837}
+ {c5fd7a8c-eaac-4289-9f22-ce9493f0d5ef}
+ {963493de-bf25-4d2f-97ce-7a922a64bee8}
+ {4b39e1f0-254b-4246-a3a1-2fe7ab42d88c}
+ {c9f82f8f-8d13-4af8-8342-9f3c30e2cb14}
+ {cc028ece-0979-48bd-a0a4-74d9ed5047fe}
+ {f31490c9-14fa-46ae-a4eb-82cbb54ef97c}
+ {1f0a920f-242c-4a5b-9931-8d3a7a2bbe33}
+
+
frequencyA
@@ -344,6 +388,402 @@
{8993fd31-834a-45b3-8914-99364275c99d}
+
+
+ SourcePos
+
+
+ -2
+
+
+
+
+ OverallGain
+
+
+ -1
+
+
+
+
+ ApplyDA
+
+
+ 2
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyAA
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyDir
+
+
+ 1
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyOccl
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyTrans
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyRefl
+
+
+ false
+
+
+
+
+ ApplyPath
+
+
+ false
+
+
+
+
+ Interpolation
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+
+
+ DistAtt
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DAType
+
+
+ 1
+
+
+ 0
+
+
+ 4
+
+
+
+
+ DAMinDist
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10000.000000)}
+
+
+
+
+ DAMaxDist
+
+
+ 65
+
+
+ {(0.000000,0.000000)(1.000000,10000.000000)}
+
+
+
+
+ AirAbsLow
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ AirAbsMid
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ AirAbsHigh
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ Directivity
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DipoleWeight
+
+
+ 0.839999974
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DipolePower
+
+
+ 1.91999996
+
+
+ {(0.000000,1.000000)(1.000000,4.000000)}
+
+
+
+
+ Occlusion
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransType
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+
+
+ TransLow
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransMid
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransHigh
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DirMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ ReflBinaural
+
+
+ false
+
+
+
+
+ ReflMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10.000000)}
+
+
+
+
+ PathBinaural
+
+
+ false
+
+
+
+
+ PathMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10.000000)}
+
+
+
+
+ SimOutputs
+
+
+ 0
+
+
+
+
+ DirectBinaural
+
+
+ true
+
+
+
+
+ DistRange
+
+
+ -6
+
+
+
+
+ SimOutHandle
+
+
+ -1
+
+
+ -1
+
+
+ 10000
+
+
+
+
+ OutputFormat
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ PathNormEQ
+
+
+ false
+
+
{fb894807-eb7f-48db-b3de-e2f5dd3322a2}
diff --git a/DeltaVRFMOD/Metadata/Event/{6fe27f03-35f6-4e00-ba0d-60648a3d1e3d}.xml b/DeltaVRFMOD/Metadata/Event/{6fe27f03-35f6-4e00-ba0d-60648a3d1e3d}.xml
index a6c9980f..25a76031 100644
--- a/DeltaVRFMOD/Metadata/Event/{6fe27f03-35f6-4e00-ba0d-60648a3d1e3d}.xml
+++ b/DeltaVRFMOD/Metadata/Event/{6fe27f03-35f6-4e00-ba0d-60648a3d1e3d}.xml
@@ -5,7 +5,7 @@
ComputerNoise1
- 2
+ 5
{99009895-3de4-4e9e-a5fe-af629bed4d51}
@@ -144,7 +144,7 @@
{24ddcf0f-b660-400b-9b8a-8c033a627f6e}
{46ea035a-5885-4b78-b9a0-fdc436e160f9}
- {80df5fb6-3003-485a-8a7b-42bdb2f71434}
+ {a638b8d1-a675-46bb-9d40-69f7d05c3f29}
@@ -167,6 +167,453 @@
-
+
+
+ {1fcad231-89bc-4362-a0fa-482565dd94f1}
+
+
+
+
+ Steam Audio Spatializer
+
+
+ {500e1ee3-dae7-4101-b369-20b6adb556d8}
+ {7e024af4-4df7-4d29-94c8-17d814cb824c}
+ {7fe8fd66-2ffd-4037-a330-89e4332a522f}
+ {1b9b1380-11aa-49a4-8f8e-89ce4e87dafc}
+ {d528d438-bca8-4b8a-b67d-8538a2fecddc}
+ {4edbb63b-5039-4be0-8c08-0284b60cb2ea}
+ {8b0cc793-5a3c-4128-963c-38c775f9bec6}
+ {9d6daa49-f83f-4f51-bf67-e182f97d2900}
+ {c3514cd3-87e1-4c82-815d-db25af588132}
+ {c99fb1fe-44c8-48f4-b5a9-937e683350e8}
+ {2c74feae-0491-4a28-ae9e-804dbadfff47}
+ {64bfe217-ce5c-4d86-9af7-e0aea658bc5d}
+ {3eaf9108-f22a-404e-b4f9-7596c1e7184e}
+ {2f6928a0-66b1-46c1-b1d5-a03ccf567534}
+ {1ed0cccc-b4a3-4b2c-9e58-faf661d7716d}
+ {58fb8086-7761-4c28-ba36-e1295fb5ee81}
+ {5df0ecb3-275a-4888-85c1-cc5bd66b88e8}
+ {05d1038f-b192-4a36-a689-f429104470f9}
+ {dc68b3ef-8771-4bea-82ff-f193d3725302}
+ {16eb9d37-18bc-4839-a030-7e5bb76c9bb5}
+ {0e47d029-f7d8-45ba-b075-40b4826cd019}
+ {fad02b3d-4ce3-4f82-94c0-1ee6deb72439}
+ {c4c5e1f1-35c3-427e-81e1-d16bd7da5e62}
+ {eb5d3f6f-252a-4114-9c2c-55d8aee18f14}
+ {6d258469-9a29-46b7-b964-dc5345b6cdf1}
+ {9495c787-5974-4a4d-91e1-463e01d3158d}
+ {e8ac320b-0fb1-4d80-be03-64212f81e3e1}
+ {29a4fe05-96a4-434b-9d92-ce63b0a73277}
+ {21921971-7e44-4879-a78e-34de22bf9571}
+ {569836b2-2cc2-48ca-8181-0da6f49475ef}
+ {babb67ba-0e47-4a57-b7f7-50c4d4418509}
+ {8a3d17d8-5358-4ab4-a8cf-4816d300ebd2}
+ {c2f5e0a0-c72f-489c-ac42-29fc8f1493fd}
+ {dfbdf6f8-9e3f-4345-8537-71397b6e0a09}
+ {714ff4b8-fd5d-4414-8344-b0c6f73c3edd}
+ {1c1476cd-c80f-449e-ae23-f9ce69a00841}
+
+
+
+
+ SourcePos
+
+
+
+ -2
+
+
+
+
+ OverallGain
+
+
+
+ -1
+
+
+
+
+ ApplyDA
+
+
+ 2
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyAA
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyDir
+
+
+ 1
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyOccl
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyTrans
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyRefl
+
+
+ false
+
+
+
+
+ ApplyPath
+
+
+ false
+
+
+
+
+ Interpolation
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+
+
+ DistAtt
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DAType
+
+
+ 3
+
+
+ 0
+
+
+ 4
+
+
+
+
+ DAMinDist
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10000.000000)}
+
+
+
+
+ DAMaxDist
+
+
+ 4
+
+
+ {(0.000000,0.000000)(1.000000,10000.000000)}
+
+
+
+
+ AirAbsLow
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ AirAbsMid
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ AirAbsHigh
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ Directivity
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DipoleWeight
+
+
+ 0
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DipolePower
+
+
+ 1
+
+
+ {(0.000000,1.000000)(1.000000,4.000000)}
+
+
+
+
+ Occlusion
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransType
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+
+
+ TransLow
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransMid
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransHigh
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DirMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ ReflBinaural
+
+
+ false
+
+
+
+
+ ReflMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10.000000)}
+
+
+
+
+ PathBinaural
+
+
+ false
+
+
+
+
+ PathMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10.000000)}
+
+
+
+
+ SimOutputs
+
+
+
+ 0
+
+
+
+
+ DirectBinaural
+
+
+ true
+
+
+
+
+ DistRange
+
+
+
+ -6
+
+
+
+
+ SimOutHandle
+
+
+ -1
+
+
+ -1
+
+
+ 10000
+
+
+
+
+ OutputFormat
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ PathNormEQ
+
+
+ false
+
+
diff --git a/DeltaVRFMOD/Metadata/Event/{edb8b086-c8c2-4f9b-a6c9-c324aa020ad3}.xml b/DeltaVRFMOD/Metadata/Event/{edb8b086-c8c2-4f9b-a6c9-c324aa020ad3}.xml
index 8249f84d..70cc5924 100644
--- a/DeltaVRFMOD/Metadata/Event/{edb8b086-c8c2-4f9b-a6c9-c324aa020ad3}.xml
+++ b/DeltaVRFMOD/Metadata/Event/{edb8b086-c8c2-4f9b-a6c9-c324aa020ad3}.xml
@@ -5,7 +5,7 @@
ufo_passing
- 2
+ 5
{e5bf65ee-d6e7-4aa2-8f58-f527d31905fa}
@@ -41,6 +41,10 @@
+
+ {77a617b6-06b7-4c84-b805-027633ce4fca}
+ {175a8c49-361b-4aa4-b70d-37d9ae326b4b}
+
{e433b2c3-c785-4a1c-b442-a3852a45dd69}
@@ -65,6 +69,8 @@
{33fba5d3-5139-4f9f-8f91-19e9ab9c3e32}
+ {918d10fb-31d6-4c18-9e9a-6d005ebfc3b3}
+ {6ea2f4f1-2548-495b-a748-200fc5760a75}
{a720d672-e628-459a-9738-c8f9bbee55c1}
@@ -74,6 +80,9 @@
{33fba5d3-5139-4f9f-8f91-19e9ab9c3e32}
+
+ {0217752f-dab4-4a84-853a-ece06310d8d8}
+
@@ -86,6 +95,19 @@
{48a24df6-748f-42db-a481-5e508e32716d}
+
+
+ 0
+
+
+
+
+ 5
+
+
+ 0
+
+
{fc972962-6f64-4e27-b7db-cbc334f98447}
@@ -100,6 +122,22 @@
{daaab064-7023-4210-8707-b33201a917ee}
+
+
+ 5
+
+
+ {82c92c32-fd91-43d6-9dd1-2e4d1d9de9ac}
+
+
+
+
+ 5
+
+
+ {a6acbe3b-0e37-46bd-bb89-00b09cf72053}
+
+
3.5
@@ -117,21 +155,556 @@
{e433b2c3-c785-4a1c-b442-a3852a45dd69}
+
+
+ 1
+
+
+ 156
+
+
+ {a7cc6b83-be5b-44c9-a665-3d4478702675}
+
+
+ {ecba1195-df31-4d27-8002-548a57a90149}
+
+
+ {ee24d837-2c41-462f-a668-4f348d9b6db2}
+
+
+ {83606469-f987-404a-be9a-2152d25d7bfd}
{d21b3e78-cdee-4351-9bd7-08926907b4fb}
- {9df5a77c-4560-44c7-aaaa-14a7aa237cc3}
+
+
+ {186a8cd1-5202-4a18-9e96-fd272b11041f}
+
+
+ {50548a09-4915-4411-8de7-8b36f2cafd28}
+
+
+ {6ea2f4f1-2548-495b-a748-200fc5760a75}
+
+
+
+
+ {4fbbadb5-e421-454c-bb5b-d9036b04347e}
+
+
+ {2e15987e-427c-44bd-a51c-dfbd0a784b90}
+
+
+ {918d10fb-31d6-4c18-9e9a-6d005ebfc3b3}
+
+
{aab4b67b-78fa-4053-829d-522b1e90cd2a}
+
+
+ 5
+
+
+ {918d10fb-31d6-4c18-9e9a-6d005ebfc3b3}
+ {6ea2f4f1-2548-495b-a748-200fc5760a75}
+ {77a617b6-06b7-4c84-b805-027633ce4fca}
+ {175a8c49-361b-4aa4-b70d-37d9ae326b4b}
+
+
+
+
+ {8840532f-e12c-4df2-93fb-05a14246eb2c}
+
+
-
+
+
+ 0
+
+
+ 1
+
+
+ 0.25471893
+
+
+
+
+ 5
+
+
+ 0
+
+
+
+
+ 0
+
+
+ 0
+
+
+ -0.2547189
+
+
+
+
+ 5
+
+
+ 1
+
+
+
+
+ Steam Audio Spatializer
+
+
+ {574f17f0-b578-4518-be3b-e4df29cd6f01}
+ {db6f336d-7dce-4a5e-a0d3-dd1ae6b57002}
+ {604655e5-d7a8-4862-bc27-c10f03364848}
+ {f230557c-76c6-4245-bd4d-9a0136230f6c}
+ {90586f5a-2bf1-4e21-b27c-c6cea1f5f050}
+ {03bc95cb-4caa-4bec-9446-1584bcfcd86f}
+ {8ec46bb8-a07b-4295-8998-2bd5c83338bf}
+ {2efb7097-271f-4562-98f9-809e54b78cce}
+ {7f21dd68-ce63-4f7d-8bfb-e535bed23a4d}
+ {b3ce7d8c-edd5-40b2-8af6-c722523081d5}
+ {f97a4fcc-7f4d-41bf-aa84-c9417e68ea8b}
+ {e1d5a384-5920-4cab-a0ac-34d60caec82b}
+ {459ea0fe-fe0e-4ce8-a086-6395c4ed0e74}
+ {05907664-64c9-43ae-80ce-7f0d3588c8a7}
+ {f2bb5402-1d22-4679-b1a4-0a21ec163c5f}
+ {42944f65-5177-4d95-91d5-292ae9f58cee}
+ {6fee9faf-9177-4ff5-9d47-b09a89cd975c}
+ {f7710400-47ce-47d5-8066-3d8d31818fd0}
+ {a5656ef8-c4cc-4286-9efb-ff69c1bce14c}
+ {1edcd357-08e3-4dcf-9b5a-29dff6289403}
+ {d2c51de0-d267-4b6f-a469-7a22e77215a8}
+ {8251c25f-1815-4115-a9ea-8c4e71a6b2d6}
+ {bf9b93c7-ade0-4659-b784-e26929af372a}
+ {10ebdc30-017f-400a-b496-75256de5199f}
+ {a51e22aa-c5c8-4877-b38e-74eab1ff9ea6}
+ {39eec88e-4d2c-44c5-b688-2634802dbf5f}
+ {cbae8cad-eacf-442b-a3b0-f6d1f12dbb0a}
+ {c863982e-655c-4133-9f56-22cf8b596682}
+ {05ecaa6f-6f08-49e6-a695-e4154699adc0}
+ {0231ccb6-91c8-4a2b-b6c4-a3408d1a8fa6}
+ {22f2f136-6aa5-4842-a369-be26dedffabc}
+ {36e920f6-d0db-4c9a-92be-9550194dbabf}
+ {cdba6bdb-4e80-4ac2-a647-a4a23ade0eb7}
+ {591a28cc-71a6-4db2-ae19-c8d5b3522406}
+ {8ca1ac31-dfce-4c6f-88a4-15bc2297ef69}
+ {ccc822cf-9954-4fda-a666-c3e71a8584d8}
+
+
+
+
+ SourcePos
+
+
+
+ -2
+
+
+
+
+ OverallGain
+
+
+
+ -1
+
+
+
+
+ ApplyDA
+
+
+ 2
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyAA
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyDir
+
+
+ 2
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyOccl
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyTrans
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ ApplyRefl
+
+
+ false
+
+
+
+
+ ApplyPath
+
+
+ false
+
+
+
+
+ Interpolation
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+
+
+ DistAtt
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DAType
+
+
+ 1
+
+
+ 0
+
+
+ 4
+
+
+
+
+ DAMinDist
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10000.000000)}
+
+
+
+
+ DAMaxDist
+
+
+ 100
+
+
+ {(0.000000,0.000000)(1.000000,10000.000000)}
+
+
+
+
+ AirAbsLow
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ AirAbsMid
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ AirAbsHigh
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ Directivity
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DipoleWeight
+
+
+ 0.769999981
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DipolePower
+
+
+ 1
+
+
+ {(0.000000,1.000000)(1.000000,4.000000)}
+
+
+
+
+ Occlusion
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransType
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+
+
+ TransLow
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransMid
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ TransHigh
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ DirMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,1.000000)}
+
+
+
+
+ ReflBinaural
+
+
+ false
+
+
+
+
+ ReflMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10.000000)}
+
+
+
+
+ PathBinaural
+
+
+ false
+
+
+
+
+ PathMixLevel
+
+
+ 1
+
+
+ {(0.000000,0.000000)(1.000000,10.000000)}
+
+
+
+
+ SimOutputs
+
+
+
+ 0
+
+
+
+
+ DirectBinaural
+
+
+ true
+
+
+
+
+ DistRange
+
+
+
+ -6
+
+
+
+
+ SimOutHandle
+
+
+ -1
+
+
+ -1
+
+
+ 10000
+
+
+
+
+ OutputFormat
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+
+
+ PathNormEQ
+
+
+ false
+
+
diff --git a/DeltaVRFMOD/Metadata/Master.xml b/DeltaVRFMOD/Metadata/Master.xml
index a7b2883d..17af1744 100644
--- a/DeltaVRFMOD/Metadata/Master.xml
+++ b/DeltaVRFMOD/Metadata/Master.xml
@@ -20,6 +20,9 @@
+
+ 180
+
2
diff --git a/DeltaVRFMOD/Metadata/Return/{453c12ff-bc21-4b80-88bc-2737cc792242}.xml b/DeltaVRFMOD/Metadata/Return/{453c12ff-bc21-4b80-88bc-2737cc792242}.xml
deleted file mode 100644
index ac0132ad..00000000
--- a/DeltaVRFMOD/Metadata/Return/{453c12ff-bc21-4b80-88bc-2737cc792242}.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
- 2
-
-
- Reverb
-
-
- {db3f4d6d-013d-4823-9314-7e2bd0ac6882}
-
-
- {f95e1782-2d20-4dd3-9fc8-24768374cde0}
-
-
- {c751273e-6b77-46b1-8c19-a99f6f08e61e}
-
-
-
-
- {ff9d2cd2-c223-4a4a-8b32-923207ee71e3}
- {7162df66-abae-4c85-9696-567c618bb202}
-
-
-
-
-
- 0
-
-
- -80
-
-
-
-
diff --git a/DeltaVRFMOD/Plugins/phonon.dll b/DeltaVRFMOD/Plugins/phonon.dll
new file mode 100644
index 00000000..df809dad
--- /dev/null
+++ b/DeltaVRFMOD/Plugins/phonon.dll
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0d9d1b7fdabc0377b49af64ad121bc1f854a91329bc9c1e115767314d5a61817
+size 52937728
diff --git a/DeltaVRFMOD/Plugins/phonon_fmod.dll b/DeltaVRFMOD/Plugins/phonon_fmod.dll
new file mode 100644
index 00000000..59e03400
--- /dev/null
+++ b/DeltaVRFMOD/Plugins/phonon_fmod.dll
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:78fd0461b7131811d2e111a10eeeffe645b1a369f2ac0114debfb76f886dba80
+size 177664
diff --git a/DeltaVRFMOD/Plugins/phonon_fmod.plugin.js b/DeltaVRFMOD/Plugins/phonon_fmod.plugin.js
new file mode 100644
index 00000000..5a9d821e
--- /dev/null
+++ b/DeltaVRFMOD/Plugins/phonon_fmod.plugin.js
@@ -0,0 +1,393 @@
+//
+// Copyright 2017-2023 Valve Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+studio.plugins.registerPluginDescription("Steam Audio Spatializer", {
+ companyName: "Valve",
+ productName: "Steam Audio Spatializer",
+ parameters: {
+ "DirectBinaural": {displayName: "Apply HRTF To Direct"},
+ "ApplyDA": {displayName: "Distance Attenuation"},
+ "ApplyAA": {displayName: "Air Absorption"},
+ "ApplyDir": {displayName: "Directivity"},
+ "ApplyOccl": {displayName: "Occlusion"},
+ "ApplyTrans": {displayName: "Transmission"},
+ "ApplyRefl": {displayName: "Reflections"},
+ "ApplyPath": {displayName: "Pathing"},
+ "Interpolation": {displayName: "HRTF Interpolation"},
+ "DistAtt": {displayName: "Value"},
+ "AirAbsLow": {displayName: "AA Low"},
+ "AirAbsMid": {displayName: "AA Mid"},
+ "AirAbsHigh": {displayName: "AA High"},
+ "Directivity": {displayName: "Dir. Value"},
+ "DipoleWeight": {displayName: "Weight"},
+ "DipolePower": {displayName: "Power"},
+ "Occlusion": {displayName: "Occl. Value"},
+ "TransType": {displayName: "Transmission Type"},
+ "TransLow": {displayName: "Trans. Low"},
+ "TransMid": {displayName: "Trans. Mid"},
+ "TransHigh": {displayName: "Trans. High"},
+ "DirMixLevel": {displayName: "Direct Mix Level"},
+ "ReflBinaural": {displayName: "Apply HRTF To Reflections"},
+ "ReflMixLevel": {displayName: "Reflections Mix Level"},
+ "PathBinaural": {displayName: "Apply HRTF To Pathing"},
+ "PathMixLevel": {displayName: "Pathing Mix Level"},
+ "OutputFormat": {displayName: "Output Format"},
+ "PathNormEQ": {displayName: "Normalize Pathing EQ"},
+ },
+ deckUi: {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.HBoxLayout,
+ spacing: 8,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.InputMeter
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.VBoxLayout,
+ minimumWidth: 128,
+ maximumWidth: 150,
+ spacing: 8,
+ contentsMargins: {left: 4, right: 4},
+ alignment: studio.ui.alignment.AlignTop,
+ isFramed: true,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dropdown,
+ binding: "Interpolation"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dropdown,
+ binding: "ApplyDA"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dropdown,
+ binding: "ApplyAA"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dropdown,
+ binding: "ApplyDir"
+ },
+ ]
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.VBoxLayout,
+ minimumWidth: 128,
+ maximumWidth: 250,
+ spacing: 8,
+ contentsMargins: {left: 4, right: 4},
+ alignment: studio.ui.alignment.AlignTop,
+ isFramed: true,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.DistanceRolloffGraph,
+ rolloffTypeBinding: "DAType",
+ minimumDistanceBinding: "DAMinDist",
+ maximumDistanceBinding: "DAMaxDist",
+ rolloffTypes: {
+ 0: studio.project.distanceRolloffType.LinearSquared,
+ 1: studio.project.distanceRolloffType.Linear,
+ 2: studio.project.distanceRolloffType.Inverse,
+ 3: studio.project.distanceRolloffType.InverseSquared,
+ 4: studio.project.distanceRolloffType.Custom,
+ }
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.MinMaxFader,
+ text: "Min & Max Distances",
+ minimumBinding: "DAMinDist",
+ maximumBinding: "DAMaxDist"
+ }
+ ]
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.VBoxLayout,
+ minimumWidth: 128,
+ maximumWidth: 150,
+ spacing: 8,
+ contentsMargins: {left: 4, right: 4},
+ alignment: studio.ui.alignment.AlignTop,
+ isFramed: true,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Label,
+ text: "Directivity"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.PolarDirectivityGraph,
+ directivityBinding: "DipoleWeight",
+ sharpnessBinding: "DipolePower"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.HBoxLayout,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "DipoleWeight"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "DipolePower"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.VBoxLayout,
+ minimumWidth: 128,
+ maximumWidth: 150,
+ spacing: 8,
+ contentsMargins: {left: 4, right: 4},
+ alignment: studio.ui.alignment.AlignTop,
+ isFramed: true,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dropdown,
+ binding: "ApplyOccl"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dropdown,
+ binding: "ApplyTrans"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dropdown,
+ binding: "TransType"
+ }
+ ]
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.VBoxLayout,
+ minimumWidth: 128,
+ maximumWidth: 250,
+ spacing: 8,
+ contentsMargins: {left: 4, right: 4},
+ alignment: studio.ui.alignment.AlignTop,
+ isFramed: true,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.HBoxLayout,
+ spacing: 8,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "AirAbsLow"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "AirAbsMid"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "AirAbsHigh"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "Directivity"
+ }
+ ]
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.HBoxLayout,
+ spacing: 8,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "Occlusion"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "TransLow"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "TransMid"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "TransHigh"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.VBoxLayout,
+ minimumWidth: 128,
+ maximumWidth: 150,
+ spacing: 8,
+ contentsMargins: {left: 4, right: 4},
+ alignment: studio.ui.alignment.AlignTop,
+ isFramed: true,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Button,
+ binding: "DirectBinaural",
+ text: "On"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Button,
+ binding: "ApplyRefl",
+ text: "On"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Button,
+ binding: "ReflBinaural",
+ text: "On"
+ },
+ ]
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.VBoxLayout,
+ minimumWidth: 128,
+ maximumWidth: 150,
+ spacing: 8,
+ contentsMargins: {left: 4, right: 4},
+ alignment: studio.ui.alignment.AlignTop,
+ isFramed: true,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Button,
+ binding: "ApplyPath",
+ text: "On"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Button,
+ binding: "PathBinaural",
+ text: "On"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Button,
+ binding: "PathNormEQ",
+ text: "On"
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dropdown,
+ binding: "OutputFormat"
+ },
+ ]
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.VBoxLayout,
+ minimumWidth: 225,
+ maximumWidth: 350,
+ spacing: 8,
+ contentsMargins: {left: 4, right: 4},
+ alignment: studio.ui.alignment.AlignTop,
+ isFramed: true,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "DirMixLevel",
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.HBoxLayout,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "ReflMixLevel",
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dial,
+ binding: "PathMixLevel",
+ }
+ ]
+ }
+ ]
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.OutputMeter
+ }
+ ]
+ }
+});
+
+studio.plugins.registerPluginDescription("Steam Audio Mixer Return", {
+ companyName: "Valve",
+ productName: "Steam Audio Mixer Return",
+ parameters: {
+ "Binaural": {displayName: "Apply HRTF"}
+ },
+ deckUi: {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.HBoxLayout,
+ minimumWidth: 256,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.VBoxLayout,
+ spacing: 6,
+ contentsMargins: {left: 4, right: 4},
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Button,
+ binding: "Binaural",
+ text: "On",
+ buttonWidth: 64
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dropdown,
+ binding: "OutputFormat"
+ },
+ ]
+ }
+ ]
+ }
+});
+
+studio.plugins.registerPluginDescription("Steam Audio Reverb", {
+ companyName: "Valve",
+ productName: "Steam Audio Reverb",
+ parameters: {
+ "Binaural": {displayName: "Apply HRTF"},
+ },
+ deckUi: {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.HBoxLayout,
+ minimumWidth: 256,
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Layout,
+ layout: studio.ui.layoutType.VBoxLayout,
+ spacing: 6,
+ contentsMargins: {left: 4, right: 4},
+ items: [
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Button,
+ binding: "Binaural",
+ text: "Enable",
+ buttonWidth: 64
+ },
+ {
+ deckWidgetType: studio.ui.deckWidgetType.Dropdown,
+ binding: "OutputFormat"
+ },
+ ]
+ }
+ ]
+ }
+});
diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset
index 896d8bb2..b4226025 100644
--- a/ProjectSettings/ProjectSettings.asset
+++ b/ProjectSettings/ProjectSettings.asset
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:58745c9321381389f20738b32b3dc4544842f32ad2e3992ddd439651246906a2
-size 26323
+oid sha256:fc5837b7d78adf751b2a4c72e0dd92059a0ca287b175b10c8b287e9d66e77095
+size 26399
diff --git a/highscores.json b/highscores.json
index f31a80e0..7f492971 100644
--- a/highscores.json
+++ b/highscores.json
@@ -55,6 +55,10 @@
{
"name": "fdgdggdd",
"score": 148.0
+ },
+ {
+ "name": "aa",
+ "score": 147.0
}
]
}
\ No newline at end of file