This commit is contained in:
2025-03-11 16:42:49 +01:00
parent d2c9941a75
commit ea2d65ad14
29 changed files with 239 additions and 644 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-9
View File
@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 0b0df2bea2345aa4f9e86bcacbc9608c
folderAsset: yes
timeCreated: 1500590827
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -1,121 +0,0 @@
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:
Binary file not shown.
-121
View File
@@ -1,121 +0,0 @@
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:
Binary file not shown.
Binary file not shown.
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: b350a431a2f520b4b9d3e7227b7ec517
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
@@ -1,121 +0,0 @@
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:
Binary file not shown.
-121
View File
@@ -1,121 +0,0 @@
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:
Binary file not shown.
Binary file not shown.
+49 -3
View File
@@ -30,18 +30,63 @@ namespace SteamAudio
public static class Build public static class Build
{ {
public static void BuildSteamAudio() 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 args = Environment.GetCommandLineArgs();
var lastArg = args[args.Length - 1]; var lastArg = args[args.Length - 1];
var fileName = "SteamAudio.unitypackage"; var fileName = name + ".unitypackage";
if (lastArg != "SteamAudio.Build.BuildSteamAudio") if (lastArg != "SteamAudio.Build.BuildSteamAudio")
{ {
fileName = lastArg + "/" + fileName; fileName = lastArg + "/" + fileName;
} }
var assets = new string[] { "Assets/Plugins" };
AssetDatabase.ExportPackage(assets, fileName, ExportPackageOptions.Recurse); AssetDatabase.ExportPackage(assets, fileName, ExportPackageOptions.Recurse);
} }
} }
@@ -59,6 +104,7 @@ namespace SteamAudio
NamedBuildTarget.Standalone, NamedBuildTarget.Standalone,
NamedBuildTarget.Android, NamedBuildTarget.Android,
NamedBuildTarget.iOS, NamedBuildTarget.iOS,
NamedBuildTarget.WebGL,
}; };
foreach (var supportedPlatform in supportedPlatforms) foreach (var supportedPlatform in supportedPlatforms)
@@ -23,6 +23,7 @@ namespace SteamAudio
public class SteamAudioSettingsInspector : Editor public class SteamAudioSettingsInspector : Editor
{ {
SerializedProperty mAudioEngine; SerializedProperty mAudioEngine;
SerializedProperty mHRTFDisabled;
SerializedProperty mPerspectiveCorrection; SerializedProperty mPerspectiveCorrection;
SerializedProperty mPerspectiveCorrectionFactor; SerializedProperty mPerspectiveCorrectionFactor;
SerializedProperty mHRTFVolumeNormalizationType; SerializedProperty mHRTFVolumeNormalizationType;
@@ -77,6 +78,7 @@ namespace SteamAudio
private void OnEnable() private void OnEnable()
{ {
mAudioEngine = serializedObject.FindProperty("audioEngine"); mAudioEngine = serializedObject.FindProperty("audioEngine");
mHRTFDisabled = serializedObject.FindProperty("hrtfDisabled");
mPerspectiveCorrection = serializedObject.FindProperty("perspectiveCorrection"); mPerspectiveCorrection = serializedObject.FindProperty("perspectiveCorrection");
mPerspectiveCorrectionFactor = serializedObject.FindProperty("perspectiveCorrectionFactor"); mPerspectiveCorrectionFactor = serializedObject.FindProperty("perspectiveCorrectionFactor");
mHRTFVolumeGainDB = serializedObject.FindProperty("hrtfVolumeGainDB"); mHRTFVolumeGainDB = serializedObject.FindProperty("hrtfVolumeGainDB");
@@ -126,6 +128,7 @@ namespace SteamAudio
serializedObject.Update(); serializedObject.Update();
EditorGUILayout.PropertyField(mAudioEngine); 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")); EditorGUILayout.PropertyField(mPerspectiveCorrection, new UnityEngine.GUIContent("Enable Perspective Correction"));
if (mPerspectiveCorrection.boolValue) if (mPerspectiveCorrection.boolValue)
+12 -2
View File
@@ -16,7 +16,6 @@
#if STEAMAUDIO_ENABLED #if STEAMAUDIO_ENABLED
using System; using System;
using System.Reflection;
using UnityEngine; using UnityEngine;
namespace SteamAudio namespace SteamAudio
@@ -43,6 +42,8 @@ namespace SteamAudio
return new UnityAudioEngineSource(); return new UnityAudioEngineSource();
case AudioEngineType.FMODStudio: case AudioEngineType.FMODStudio:
return CreateFMODStudioAudioEngineSource(); return CreateFMODStudioAudioEngineSource();
case AudioEngineType.Wwise:
return CreateWwiseAudioEngineSource();
default: default:
return null; return null;
} }
@@ -50,9 +51,18 @@ namespace SteamAudio
private static AudioEngineSource CreateFMODStudioAudioEngineSource() private static AudioEngineSource CreateFMODStudioAudioEngineSource()
{ {
var type = Type.GetType("SteamAudio.FMODStudioAudioEngineSource,SteamAudioUnity"); var type = Type.GetType("SteamAudio.FMODStudioAudioEngineSource,SteamAudioFMODStudio");
return (type != null) ? (AudioEngineSource) Activator.CreateInstance(type) : null; 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);
}
} }
} }
+27 -4
View File
@@ -16,9 +16,7 @@
#if STEAMAUDIO_ENABLED #if STEAMAUDIO_ENABLED
using System; using System;
using System.Reflection;
using UnityEngine; using UnityEngine;
using SteamAudio;
namespace SteamAudio namespace SteamAudio
{ {
@@ -47,6 +45,8 @@ namespace SteamAudio
return new UnityAudioEngineState(); return new UnityAudioEngineState();
case AudioEngineType.FMODStudio: case AudioEngineType.FMODStudio:
return CreateFMODStudioAudioEngineState(); return CreateFMODStudioAudioEngineState();
case AudioEngineType.Wwise:
return CreateWwiseAudioEngineState();
default: default:
return null; return null;
} }
@@ -54,9 +54,21 @@ namespace SteamAudio
private static AudioEngineState CreateFMODStudioAudioEngineState() private static AudioEngineState CreateFMODStudioAudioEngineState()
{ {
var type = Type.GetType("SteamAudio.FMODStudioAudioEngineState,SteamAudioUnity"); var type = Type.GetType("SteamAudio.FMODStudioAudioEngineState,SteamAudioFMODStudio");
return (type != null) ? (AudioEngineState) Activator.CreateInstance(type) : null; 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 class AudioEngineStateHelpers
@@ -73,6 +85,8 @@ namespace SteamAudio
return new UnityAudioEngineStateHelpers(); return new UnityAudioEngineStateHelpers();
case AudioEngineType.FMODStudio: case AudioEngineType.FMODStudio:
return CreateFMODStudioAudioEngineStateHelpers(); return CreateFMODStudioAudioEngineStateHelpers();
case AudioEngineType.Wwise:
return CreateWwiseAudioEngineStateHelpers();
default: default:
return null; return null;
} }
@@ -80,9 +94,18 @@ namespace SteamAudio
private static AudioEngineStateHelpers CreateFMODStudioAudioEngineStateHelpers() private static AudioEngineStateHelpers CreateFMODStudioAudioEngineStateHelpers()
{ {
var type = Type.GetType("SteamAudio.FMODStudioAudioEngineStateHelpers,SteamAudioUnity"); var type = Type.GetType("SteamAudio.FMODStudioAudioEngineStateHelpers,SteamAudioFMODStudio");
return (type != null) ? (AudioEngineStateHelpers) Activator.CreateInstance(type) : null; 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);
}
} }
} }
+106 -99
View File
@@ -25,8 +25,8 @@ namespace SteamAudio
public static class Constants public static class Constants
{ {
public const uint kVersionMajor = 4; public const uint kVersionMajor = 4;
public const uint kVersionMinor = 5; public const uint kVersionMinor = 6;
public const uint kVersionPatch = 1; public const uint kVersionPatch = 0;
public const uint kVersion = (kVersionMajor << 16) | (kVersionMinor << 8) | kVersionPatch; public const uint kVersion = (kVersionMajor << 16) | (kVersionMinor << 8) | kVersionPatch;
} }
@@ -666,21 +666,21 @@ namespace SteamAudio
{ {
// Context // Context
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplContextCreate(ref ContextSettings settings, out IntPtr context); public static extern Error iplContextCreate(ref ContextSettings settings, out IntPtr context);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplContextRetain(IntPtr context); public static extern IntPtr iplContextRetain(IntPtr context);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -689,7 +689,7 @@ namespace SteamAudio
// Geometry // Geometry
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -698,35 +698,35 @@ namespace SteamAudio
// Serialization // Serialization
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplSerializedObjectCreate(IntPtr context, ref SerializedObjectSettings settings, out IntPtr serializedObject); public static extern Error iplSerializedObjectCreate(IntPtr context, ref SerializedObjectSettings settings, out IntPtr serializedObject);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplSerializedObjectRetain(IntPtr serializedObject); public static extern IntPtr iplSerializedObjectRetain(IntPtr serializedObject);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSerializedObjectRelease(ref IntPtr serializedObject); public static extern void iplSerializedObjectRelease(ref IntPtr serializedObject);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern UIntPtr iplSerializedObjectGetSize(IntPtr serializedObject); public static extern UIntPtr iplSerializedObjectGetSize(IntPtr serializedObject);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -735,21 +735,21 @@ namespace SteamAudio
// Embree // Embree
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplEmbreeDeviceCreate(IntPtr context, ref EmbreeDeviceSettings settings, out IntPtr device); public static extern Error iplEmbreeDeviceCreate(IntPtr context, ref EmbreeDeviceSettings settings, out IntPtr device);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplEmbreeDeviceRetain(IntPtr device); public static extern IntPtr iplEmbreeDeviceRetain(IntPtr device);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -758,56 +758,56 @@ namespace SteamAudio
// OpenCL // OpenCL
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplOpenCLDeviceListCreate(IntPtr context, ref OpenCLDeviceSettings settings, out IntPtr deviceList); public static extern Error iplOpenCLDeviceListCreate(IntPtr context, ref OpenCLDeviceSettings settings, out IntPtr deviceList);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplOpenCLDeviceListRetain(IntPtr deviceList); public static extern IntPtr iplOpenCLDeviceListRetain(IntPtr deviceList);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplOpenCLDeviceListRelease(ref IntPtr deviceList); public static extern void iplOpenCLDeviceListRelease(ref IntPtr deviceList);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern int iplOpenCLDeviceListGetNumDevices(IntPtr deviceList); public static extern int iplOpenCLDeviceListGetNumDevices(IntPtr deviceList);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplOpenCLDeviceListGetDeviceDesc(IntPtr deviceList, int index, out OpenCLDeviceDesc deviceDesc); public static extern void iplOpenCLDeviceListGetDeviceDesc(IntPtr deviceList, int index, out OpenCLDeviceDesc deviceDesc);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplOpenCLDeviceCreate(IntPtr context, IntPtr deviceList, int index, out IntPtr device); public static extern Error iplOpenCLDeviceCreate(IntPtr context, IntPtr deviceList, int index, out IntPtr device);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplOpenCLDeviceRetain(IntPtr device); public static extern IntPtr iplOpenCLDeviceRetain(IntPtr device);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -816,21 +816,21 @@ namespace SteamAudio
// Radeon Rays // Radeon Rays
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplRadeonRaysDeviceCreate(IntPtr openCLDevice, ref RadeonRaysDeviceSettings settings, out IntPtr rrDevice); public static extern Error iplRadeonRaysDeviceCreate(IntPtr openCLDevice, ref RadeonRaysDeviceSettings settings, out IntPtr rrDevice);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplRadeonRaysDeviceRetain(IntPtr device); public static extern IntPtr iplRadeonRaysDeviceRetain(IntPtr device);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -839,21 +839,21 @@ namespace SteamAudio
// TrueAudio Next // TrueAudio Next
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplTrueAudioNextDeviceCreate(IntPtr openCLDevice, ref TrueAudioNextDeviceSettings settings, out IntPtr tanDevice); public static extern Error iplTrueAudioNextDeviceCreate(IntPtr openCLDevice, ref TrueAudioNextDeviceSettings settings, out IntPtr tanDevice);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplTrueAudioNextDeviceRetain(IntPtr device); public static extern IntPtr iplTrueAudioNextDeviceRetain(IntPtr device);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -862,140 +862,140 @@ namespace SteamAudio
// Scene // Scene
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplSceneCreate(IntPtr context, ref SceneSettings settings, out IntPtr scene); public static extern Error iplSceneCreate(IntPtr context, ref SceneSettings settings, out IntPtr scene);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplSceneRetain(IntPtr scene); public static extern IntPtr iplSceneRetain(IntPtr scene);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSceneRelease(ref IntPtr scene); public static extern void iplSceneRelease(ref IntPtr scene);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplSceneLoad(IntPtr context, ref SceneSettings settings, IntPtr serializedObject, ProgressCallback progressCallback, IntPtr progressCallbackUserData, out IntPtr scene); public static extern Error iplSceneLoad(IntPtr context, ref SceneSettings settings, IntPtr serializedObject, ProgressCallback progressCallback, IntPtr progressCallbackUserData, out IntPtr scene);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSceneSave(IntPtr scene, IntPtr serializedObject); public static extern void iplSceneSave(IntPtr scene, IntPtr serializedObject);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSceneSaveOBJ(IntPtr scene, string fileBaseName); public static extern void iplSceneSaveOBJ(IntPtr scene, string fileBaseName);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSceneCommit(IntPtr scene); public static extern void iplSceneCommit(IntPtr scene);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplStaticMeshCreate(IntPtr scene, ref StaticMeshSettings settings, out IntPtr staticMesh); public static extern Error iplStaticMeshCreate(IntPtr scene, ref StaticMeshSettings settings, out IntPtr staticMesh);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplStaticMeshRetain(IntPtr staticMesh); public static extern IntPtr iplStaticMeshRetain(IntPtr staticMesh);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplStaticMeshRelease(ref IntPtr staticMesh); public static extern void iplStaticMeshRelease(ref IntPtr staticMesh);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplStaticMeshLoad(IntPtr scene, IntPtr serializedObject, ProgressCallback progressCallback, IntPtr progressCallbackUserData, out IntPtr staticMesh); public static extern Error iplStaticMeshLoad(IntPtr scene, IntPtr serializedObject, ProgressCallback progressCallback, IntPtr progressCallbackUserData, out IntPtr staticMesh);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplStaticMeshSave(IntPtr staticMesh, IntPtr serializedObject); public static extern void iplStaticMeshSave(IntPtr staticMesh, IntPtr serializedObject);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplStaticMeshAdd(IntPtr staticMesh, IntPtr scene); public static extern void iplStaticMeshAdd(IntPtr staticMesh, IntPtr scene);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplStaticMeshRemove(IntPtr staticMesh, IntPtr scene); public static extern void iplStaticMeshRemove(IntPtr staticMesh, IntPtr scene);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplInstancedMeshCreate(IntPtr scene, ref InstancedMeshSettings settings, out IntPtr instancedMesh); public static extern Error iplInstancedMeshCreate(IntPtr scene, ref InstancedMeshSettings settings, out IntPtr instancedMesh);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplInstancedMeshRetain(IntPtr instancedMesh); public static extern IntPtr iplInstancedMeshRetain(IntPtr instancedMesh);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplInstancedMeshRelease(ref IntPtr instancedMesh); public static extern void iplInstancedMeshRelease(ref IntPtr instancedMesh);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplInstancedMeshAdd(IntPtr instancedMesh, IntPtr scene); public static extern void iplInstancedMeshAdd(IntPtr instancedMesh, IntPtr scene);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplInstancedMeshRemove(IntPtr instancedMesh, IntPtr scene); public static extern void iplInstancedMeshRemove(IntPtr instancedMesh, IntPtr scene);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -1004,21 +1004,21 @@ namespace SteamAudio
// HRTF // HRTF
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplHRTFCreate(IntPtr context, ref AudioSettings audioSettings, ref HRTFSettings hrtfSettings, out IntPtr hrtf); public static extern Error iplHRTFCreate(IntPtr context, ref AudioSettings audioSettings, ref HRTFSettings hrtfSettings, out IntPtr hrtf);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplHRTFRetain(IntPtr hrtf); public static extern IntPtr iplHRTFRetain(IntPtr hrtf);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -1027,126 +1027,126 @@ namespace SteamAudio
// Probes // Probes
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplProbeArrayCreate(IntPtr context, out IntPtr probeArray); public static extern Error iplProbeArrayCreate(IntPtr context, out IntPtr probeArray);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplProbeArrayRetain(IntPtr probeArray); public static extern IntPtr iplProbeArrayRetain(IntPtr probeArray);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplProbeArrayRelease(ref IntPtr probeArray); public static extern void iplProbeArrayRelease(ref IntPtr probeArray);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplProbeArrayGenerateProbes(IntPtr probeArray, IntPtr scene, ref ProbeGenerationParams generationParams); public static extern void iplProbeArrayGenerateProbes(IntPtr probeArray, IntPtr scene, ref ProbeGenerationParams generationParams);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern int iplProbeArrayGetNumProbes(IntPtr probeArray); public static extern int iplProbeArrayGetNumProbes(IntPtr probeArray);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Sphere iplProbeArrayGetProbe(IntPtr probeArray, int index); public static extern Sphere iplProbeArrayGetProbe(IntPtr probeArray, int index);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplProbeBatchCreate(IntPtr context, out IntPtr probeBatch); public static extern Error iplProbeBatchCreate(IntPtr context, out IntPtr probeBatch);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplProbeBatchRetain(IntPtr probeBatch); public static extern IntPtr iplProbeBatchRetain(IntPtr probeBatch);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplProbeBatchRelease(ref IntPtr probeBatch); public static extern void iplProbeBatchRelease(ref IntPtr probeBatch);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplProbeBatchLoad(IntPtr context, IntPtr serializedObject, out IntPtr probeBatch); public static extern Error iplProbeBatchLoad(IntPtr context, IntPtr serializedObject, out IntPtr probeBatch);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplProbeBatchSave(IntPtr probeBatch, IntPtr serializedObject); public static extern void iplProbeBatchSave(IntPtr probeBatch, IntPtr serializedObject);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern int iplProbeBatchGetNumProbes(IntPtr probeBatch); public static extern int iplProbeBatchGetNumProbes(IntPtr probeBatch);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplProbeBatchAddProbe(IntPtr probeBatch, Sphere probe); public static extern void iplProbeBatchAddProbe(IntPtr probeBatch, Sphere probe);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplProbeBatchAddProbeArray(IntPtr probeBatch, IntPtr probeArray); public static extern void iplProbeBatchAddProbeArray(IntPtr probeBatch, IntPtr probeArray);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplProbeBatchRemoveProbe(IntPtr probeBatch, int index); public static extern void iplProbeBatchRemoveProbe(IntPtr probeBatch, int index);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplProbeBatchCommit(IntPtr probeBatch); public static extern void iplProbeBatchCommit(IntPtr probeBatch);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplProbeBatchRemoveData(IntPtr probeBatch, ref BakedDataIdentifier identifier); public static extern void iplProbeBatchRemoveData(IntPtr probeBatch, ref BakedDataIdentifier identifier);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -1155,28 +1155,28 @@ namespace SteamAudio
// Baking // Baking
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplReflectionsBakerBake(IntPtr context, ref ReflectionsBakeParams bakeParams, ProgressCallback progressCallback, IntPtr userData); public static extern void iplReflectionsBakerBake(IntPtr context, ref ReflectionsBakeParams bakeParams, ProgressCallback progressCallback, IntPtr userData);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplReflectionsBakerCancelBake(IntPtr context); public static extern void iplReflectionsBakerCancelBake(IntPtr context);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplPathBakerBake(IntPtr context, ref PathBakeParams bakeParams, ProgressCallback progressCallback, IntPtr userData); public static extern void iplPathBakerBake(IntPtr context, ref PathBakeParams bakeParams, ProgressCallback progressCallback, IntPtr userData);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -1185,126 +1185,126 @@ namespace SteamAudio
// Run-Time Simulation // Run-Time Simulation
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplSimulatorCreate(IntPtr context, ref SimulationSettings settings, out IntPtr simulator); public static extern Error iplSimulatorCreate(IntPtr context, ref SimulationSettings settings, out IntPtr simulator);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplSimulatorRetain(IntPtr simulator); public static extern IntPtr iplSimulatorRetain(IntPtr simulator);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSimulatorRelease(ref IntPtr simulator); public static extern void iplSimulatorRelease(ref IntPtr simulator);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSimulatorSetScene(IntPtr simulator, IntPtr scene); public static extern void iplSimulatorSetScene(IntPtr simulator, IntPtr scene);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSimulatorAddProbeBatch(IntPtr simulator, IntPtr probeBatch); public static extern void iplSimulatorAddProbeBatch(IntPtr simulator, IntPtr probeBatch);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSimulatorRemoveProbeBatch(IntPtr simulator, IntPtr probeBatch); public static extern void iplSimulatorRemoveProbeBatch(IntPtr simulator, IntPtr probeBatch);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSimulatorSetSharedInputs(IntPtr simulator, SimulationFlags flags, ref SimulationSharedInputs sharedInputs); public static extern void iplSimulatorSetSharedInputs(IntPtr simulator, SimulationFlags flags, ref SimulationSharedInputs sharedInputs);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSimulatorCommit(IntPtr simulator); public static extern void iplSimulatorCommit(IntPtr simulator);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSimulatorRunDirect(IntPtr simulator); public static extern void iplSimulatorRunDirect(IntPtr simulator);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSimulatorRunReflections(IntPtr simulator); public static extern void iplSimulatorRunReflections(IntPtr simulator);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSimulatorRunPathing(IntPtr simulator); public static extern void iplSimulatorRunPathing(IntPtr simulator);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern Error iplSourceCreate(IntPtr simulator, ref SourceSettings settings, out IntPtr source); public static extern Error iplSourceCreate(IntPtr simulator, ref SourceSettings settings, out IntPtr source);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern IntPtr iplSourceRetain(IntPtr source); public static extern IntPtr iplSourceRetain(IntPtr source);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSourceRelease(ref IntPtr source); public static extern void iplSourceRelease(ref IntPtr source);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSourceAdd(IntPtr source, IntPtr simulator); public static extern void iplSourceAdd(IntPtr source, IntPtr simulator);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSourceRemove(IntPtr source, IntPtr simulator); public static extern void iplSourceRemove(IntPtr source, IntPtr simulator);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
#endif #endif
public static extern void iplSourceSetInputs(IntPtr source, SimulationFlags flags, ref SimulationInputs inputs); public static extern void iplSourceSetInputs(IntPtr source, SimulationFlags flags, ref SimulationInputs inputs);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("phonon")] [DllImport("phonon")]
@@ -1313,60 +1313,67 @@ namespace SteamAudio
// UNITY PLUGIN // UNITY PLUGIN
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("audioplugin_phonon")] [DllImport("audioplugin_phonon")]
#endif #endif
public static extern void iplUnityInitialize(IntPtr context); public static extern void iplUnityInitialize(IntPtr context);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("audioplugin_phonon")] [DllImport("audioplugin_phonon")]
#endif #endif
public static extern void iplUnitySetPerspectiveCorrection(PerspectiveCorrection correction); public static extern void iplUnitySetPerspectiveCorrection(PerspectiveCorrection correction);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("audioplugin_phonon")] [DllImport("audioplugin_phonon")]
#endif #endif
public static extern void iplUnitySetHRTF(IntPtr hrtf); public static extern void iplUnitySetHRTF(IntPtr hrtf);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("audioplugin_phonon")] [DllImport("audioplugin_phonon")]
#endif #endif
public static extern void iplUnitySetSimulationSettings(SimulationSettings simulationSettings); public static extern void iplUnitySetSimulationSettings(SimulationSettings simulationSettings);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("audioplugin_phonon")] [DllImport("audioplugin_phonon")]
#endif #endif
public static extern void iplUnitySetReverbSource(IntPtr reverbSource); public static extern void iplUnitySetReverbSource(IntPtr reverbSource);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("audioplugin_phonon")] [DllImport("audioplugin_phonon")]
#endif #endif
public static extern int iplUnityAddSource(IntPtr source); public static extern int iplUnityAddSource(IntPtr source);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("audioplugin_phonon")] [DllImport("audioplugin_phonon")]
#endif #endif
public static extern void iplUnityRemoveSource(int handle); public static extern void iplUnityRemoveSource(int handle);
#if UNITY_IOS && !UNITY_EDITOR #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
[DllImport("__Internal")] [DllImport("__Internal")]
#else #else
[DllImport("audioplugin_phonon")] [DllImport("audioplugin_phonon")]
#endif #endif
public static extern void iplUnityTerminate(); 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);
} }
} }
+7
View File
@@ -506,6 +506,7 @@ namespace SteamAudio
if (mAudioEngineState == null) if (mAudioEngineState == null)
return; return;
mAudioEngineState.SetHRTFDisabled(SteamAudioSettings.Singleton.hrtfDisabled);
var perspectiveCorrection = GetPerspectiveCorrection(); var perspectiveCorrection = GetPerspectiveCorrection();
mAudioEngineState.SetPerspectiveCorrection(perspectiveCorrection); mAudioEngineState.SetPerspectiveCorrection(perspectiveCorrection);
@@ -1260,6 +1261,12 @@ namespace SteamAudio
var dataAsset = (!exportOBJ) ? GetDataAsset(dynamicObject) : null; var dataAsset = (!exportOBJ) ? GetDataAsset(dynamicObject) : null;
var objFileName = (exportOBJ) ? GetOBJFileName(dynamicObject) : ""; 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); Export(objects, dynamicObject.name, dataAsset, objFileName, true, exportOBJ);
} }
+3 -1
View File
@@ -24,7 +24,8 @@ namespace SteamAudio
public enum AudioEngineType public enum AudioEngineType
{ {
Unity, Unity,
FMODStudio FMODStudio,
Wwise
} }
[CreateAssetMenu(menuName = "Steam Audio/Steam Audio Settings")] [CreateAssetMenu(menuName = "Steam Audio/Steam Audio Settings")]
@@ -34,6 +35,7 @@ namespace SteamAudio
public AudioEngineType audioEngine = AudioEngineType.Unity; public AudioEngineType audioEngine = AudioEngineType.Unity;
[Header("HRTF Settings")] [Header("HRTF Settings")]
public bool hrtfDisabled = false;
public bool perspectiveCorrection = false; public bool perspectiveCorrection = false;
[Range(.25f, 4.0f)] [Range(.25f, 4.0f)]
public float perspectiveCorrectionFactor = 1.0f; public float perspectiveCorrectionFactor = 1.0f;
+4 -1
View File
@@ -226,9 +226,12 @@ namespace SteamAudio
} }
~SteamAudioSource() ~SteamAudioSource()
{
if (mThis.IsAllocated)
{ {
mThis.Free(); mThis.Free();
} }
}
private void OnEnable() private void OnEnable()
{ {
@@ -510,7 +513,7 @@ namespace SteamAudio
case AudioRolloffMode.Logarithmic: case AudioRolloffMode.Logarithmic:
if (distance < rMin) if (distance < rMin)
return 1.0f; return 1.0f;
else if (distance < rMax) else if (distance > rMax)
return 0.0f; return 0.0f;
else else
return rMin / distance; return rMin / distance;
+7
View File
@@ -49,6 +49,13 @@ namespace SteamAudio
{ {
API.iplUnitySetReverbSource(reverbSource.Get()); API.iplUnitySetReverbSource(reverbSource.Get());
} }
public override void SetHRTFDisabled(bool disabled)
{
base.SetHRTFDisabled(disabled);
API.iplUnitySetHRTFDisabled(disabled);
}
} }
public sealed class UnityAudioEngineStateHelpers : AudioEngineStateHelpers public sealed class UnityAudioEngineStateHelpers : AudioEngineStateHelpers