Files
2026-03-23 14:28:21 +01:00

181 lines
18 KiB
C#

#if !(UNITY_QNX) // Disable under unsupported platforms.
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (https://www.swig.org).
// Version 4.4.0
//
// Do not make changes to this file unless you know what you are doing - modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
/// Initialization settings of the spatial audio module.
public class AkSpatialAudioInitSettings : global::System.IDisposable {
private global::System.IntPtr swigCPtr;
protected bool swigCMemOwn;
internal AkSpatialAudioInitSettings(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
internal static global::System.IntPtr getCPtr(AkSpatialAudioInitSettings obj) {
return (obj == null) ? global::System.IntPtr.Zero : obj.swigCPtr;
}
internal virtual void setCPtr(global::System.IntPtr cPtr) {
Dispose();
swigCPtr = cPtr;
}
~AkSpatialAudioInitSettings() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
AkUnitySoundEnginePINVOKE.CSharp_delete_AkSpatialAudioInitSettings(swigCPtr);
}
swigCPtr = global::System.IntPtr.Zero;
}
global::System.GC.SuppressFinalize(this);
}
}
public AkSpatialAudioInitSettings() : this(AkUnitySoundEnginePINVOKE.CSharp_new_AkSpatialAudioInitSettings(), true) {
}
/// Maximum number of rooms that sound can propagate through; must be less than or equal to AK_MAX_SOUND_PROPAGATION_DEPTH. Values below 2 will not propagate sound past the listener's own room.
public uint uMaxSoundPropagationDepth { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxSoundPropagationDepth_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxSoundPropagationDepth_get(swigCPtr); }
}
/// Amount that an emitter or listener has to move to trigger a validation of reflections/diffraction. Larger values can reduce the CPU load at the cost of reduced accuracy. Note that the ray tracing itself is not affected by this value. Rays are cast each time a Spatial Audio update is executed.
public float fMovementThreshold { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fMovementThreshold_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fMovementThreshold_get(swigCPtr); }
}
/// The number of primary rays used in the ray tracing engine. A larger number of rays will increase the chances of finding reflection and diffraction paths, but will result in higher CPU usage.
public uint uNumberOfPrimaryRays { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uNumberOfPrimaryRays_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uNumberOfPrimaryRays_get(swigCPtr); }
}
/// Maximum reflection order [1, 4] - the number of 'bounces' in a reflection path. A high reflection order renders more details at the expense of higher CPU usage.
public uint uMaxReflectionOrder { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxReflectionOrder_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxReflectionOrder_get(swigCPtr); }
}
/// Maximum diffraction order [1, 8] - the number of 'bends' in a diffraction path. A high diffraction order accommodates more complex geometry at the expense of higher CPU usage.
/// Diffraction must be enabled on the geometry to find diffraction paths (see ``AkGeometryParams)``. Set to 0 to disable diffraction on all geometry.
/// This parameter limits the recursion depth of diffraction rays cast from the listener to scan the environment, and also the depth of the diffraction search to find paths between emitter and listener.
/// To optimize CPU usage, set it to the maximum number of edges you expect the obstructing geometry to traverse.
/// For example, if box-shaped geometry is used exclusively, and only a single box is expected between an emitter and then listener, limiting ``uMaxDiffractionOrder`` to 2 may be sufficient.
/// A diffraction path search starts from the listener, so when the maximum diffraction order is exceeded, the remaining geometry between the end of the path and the emitter is ignored.
/// In such case, where the search is terminated before reaching the emitter, the diffraction coefficient will be underestimated. It is calculated from a partial path, ignoring any remaining geometry.
public uint uMaxDiffractionOrder { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxDiffractionOrder_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxDiffractionOrder_get(swigCPtr); }
}
/// Limit the maximum number of diffraction paths computed per emitter, excluding the direct/transmission path. The acoustics engine searches for up to uMaxDiffractionPaths paths and stops searching when this limit is reached.
/// Setting a low number for uMaxDiffractionPaths (1-4) uses fewer CPU resources, but is more likely to cause discontinuities in the resulting audio. This can occur, for example, when a more prominent path is discovered, displacing a less prominent one.
/// Conversely, a larger number (8 or more) produces higher quality output but requires more CPU resources. The recommended range is 2-8.
public uint uMaxDiffractionPaths { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxDiffractionPaths_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxDiffractionPaths_get(swigCPtr); }
}
/// [\ref Experimental] Set a global reflection path limit among all sound emitters with early reflections enabled. Potential reflection paths, discovered by raycasting, are first sorted according to a heuristic to determine which paths are the most prominent.
/// Afterwards, the full reflection path calculation is performed on only the uMaxGlobalReflectionPaths, most prominent paths. Limiting the total number of reflection path calculations can significantly reduce CPU usage. Recommended range: 10-50.
/// Set to 0 to disable the limit. In this case, the number of paths computed is unbounded and depends on how many are discovered by raycasting.
public uint uMaxGlobalReflectionPaths { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxGlobalReflectionPaths_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxGlobalReflectionPaths_get(swigCPtr); }
}
/// The maximum number of game-defined auxiliary sends that can originate from a single emitter. An emitter can send to its own room, and to all adjacent rooms if the emitter and listener are in the same room. If a limit is set, the most prominent sends are kept, based on spread to the adjacent portal from the emitters perspective.
/// Set to 1 to only allow emitters to send directly to their current room, and to the room a listener is transitioning to if inside a portal. Set to 0 to disable the limit.
public uint uMaxEmitterRoomAuxSends { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxEmitterRoomAuxSends_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uMaxEmitterRoomAuxSends_get(swigCPtr); }
}
/// The maximum possible number of diffraction points at each end of a reflection path. Diffraction on reflection allows reflections to fade in and out smoothly as the listener or emitter moves in and out of the reflection's shadow zone.
/// When greater than zero, diffraction rays are sent from the listener to search for reflections around one or more corners from the listener.
/// Diffraction must be enabled on the geometry to find diffracted reflections (see ``AkGeometryParams)``. Set to 0 to disable diffraction on reflections.
/// To allow reflections to propagate through portals without being cut off, set ``uDiffractionOnReflectionsOrder`` to 2 or greater.
public uint uDiffractionOnReflectionsOrder { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uDiffractionOnReflectionsOrder_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uDiffractionOnReflectionsOrder_get(swigCPtr); }
}
/// The largest possible diffraction value, in degrees, beyond which paths are not computed and are inaudible. Must be greater than zero. Default value: 180 degrees.
/// A large value (for example, 360 degrees) allows paths to propagate further around corners and obstacles, but takes more CPU time to compute.
/// A gain is applied to each diffraction path to taper the volume of the path to zero as the diffraction angle approaches fMaxDiffractionAngleDegrees,
/// and appears in the Voice Inspector as "Diffraction Tapering". This tapering gain is applied in addition to the diffraction curves, and prevents paths from popping in or out suddenly when the maximum diffraction angle is exceeded.
/// In Wwise Authoring, the horizontal axis of a diffraction curve in the attenuation editor is defined over the range 0-100%, corresponding to angles 0-180 degrees.
/// If fMaxDiffractionAngleDegrees is greater than 180 degrees, diffraction coefficients over 100% are clamped and the curve is evaluated at the rightmost point.
public float fMaxDiffractionAngleDegrees { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fMaxDiffractionAngleDegrees_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fMaxDiffractionAngleDegrees_get(swigCPtr); }
}
/// The total length of a path composed of a sequence of segments (or rays) cannot exceed the defined maximum path length. High values compute longer paths but increase the CPU cost.
/// Each individual sound is also affected by its maximum attenuation distance, specified in the Authoring tool. Reflection or diffraction paths, calculated inside Spatial Audio, will never exceed a sound's maximum attenuation distance.
/// Note, however, that attenuation is considered infinite if the furthest point is above the audibility threshold.
public float fMaxPathLength { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fMaxPathLength_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fMaxPathLength_get(swigCPtr); }
}
/// Defines the targeted max computation time allocated for spatial audio. Defined as a percentage [0, 100] of the current audio frame. When the value is different from 0, Spatial Audio adapts dynamically the load balancing spread value between 1 and the specified AkSpatialAudioInitSettings::uLoadBalancingSpread according to current CPU usage and the specified CPU limit. Set to 0 to disable the dynamic load balancing spread computation.
public float fCPULimitPercentage { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fCPULimitPercentage_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fCPULimitPercentage_get(swigCPtr); }
}
/// Spread the computation of paths on uLoadBalancingSpread frames [1..[. When uLoadBalancingSpread is set to 1, no load balancing is done. Values greater than 1 indicate the computation of paths will be spread on this number of frames. When CPU limit is active (see AkSpatialAudioInitSettings::fCPULimitPercentage), this setting represents the upper bound spread used by the dynamic load balancing instead of a fixed value.
public uint uLoadBalancingSpread { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uLoadBalancingSpread_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uLoadBalancingSpread_get(swigCPtr); }
}
/// [\ref Experimental] Enable parameter smoothing on the diffraction paths output from the Acoustics Engine. Set fSmoothingConstantMs to a value greater than 0 to define the time constant (in milliseconds) for parameter smoothing.
/// The time constant of an exponential moving average is the amount of time for the smoothed response of a unit step function to reach 1 - 1/e ~= 63.2% of the original signal.
/// A large value (eg. 500-1000 ms) results in less variance but introduces lag, which is a good choice when using conservative values for uNumberOfPrimaryRays (eg. 5-10), uMaxDiffractionPaths (eg. 1-3) or fMovementThreshold ( &gt; 1m ), in order to reduce overall CPU cost.
/// A small value (eg. 10-100 ms) results in greater accuracy and faster convergence of rendering parameters. Set to 0 to disable path smoothing.
public float fSmoothingConstantMs { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fSmoothingConstantMs_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fSmoothingConstantMs_get(swigCPtr); }
}
/// Set a global scaling factor that manipulates reverb send values. AkSpatialAudioInitSettings::fAdjacentRoomBleed affects the proportion of audio sent to adjacent rooms
/// and to the emitter's current room.
/// This value is multiplied by AkPortalParams::AdjacentRoomBleed, which is used to scale reverb bleed for individual portals.
/// When calculating reverb send amounts, each portal's aperture is multiplied by fAdjacentRoomBleed, which alters its perceived size:
/// - 1.0 (default): Maintains portals at their true geometric sizes (no scaling).
/// - &gt; 1.0: Increases the perceived size of all portals, which increases bleed into adjacent rooms.
/// - &lt; 1.0: Decreases the perceived size of all portals, which reduces bleed into adjacent rooms.
/// Valid range: (0.0 - infinity)
/// Note: Values close to 0 might cause abrupt portal transitions.
public float fAdjacentRoomBleed { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fAdjacentRoomBleed_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fAdjacentRoomBleed_get(swigCPtr); }
}
/// Enable computation of geometric diffraction and transmission paths for all sources that have the **Enable Diffraction and Transmission** box checked in the Positioning tab of the Wwise Property Editor.
/// This flag enables sound paths around (diffraction) and through (transmission) geometry (see ``AK::SpatialAudio::SetGeometry)``.
/// Setting ``bEnableGeometricDiffractionAndTransmission`` to false implies that geometry is only to be used for reflection calculation.
/// Diffraction edges must be enabled on geometry for diffraction calculation (see ``AkGeometryParams)``.
/// If ``bEnableGeometricDiffractionAndTransmission`` is false but a sound has **Enable Diffraction and Transmission** selected in the Positioning tab of the authoring tool, the sound will diffract through portals but will pass through geometry as if it is not there.
/// One would typically disable this setting in the case that the game intends to perform its own obstruction calculation, but geometry is still passed to spatial audio for reflection calculation.
public bool bEnableGeometricDiffractionAndTransmission { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_bEnableGeometricDiffractionAndTransmission_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_bEnableGeometricDiffractionAndTransmission_get(swigCPtr); }
}
/// An emitter that is diffracted through a portal or around geometry will have its apparent or virtual position calculated by Wwise Spatial Audio and passed on to the sound engine.
public bool bCalcEmitterVirtualPosition { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_bCalcEmitterVirtualPosition_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_bCalcEmitterVirtualPosition_get(swigCPtr); }
}
/// The operation used to determine transmission loss on direct paths.
public AkTransmissionOperation eTransmissionOperation { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_eTransmissionOperation_set(swigCPtr, (int)value); } get { return (AkTransmissionOperation)AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_eTransmissionOperation_get(swigCPtr); }
}
/// [\ref Experimental] Minimum number of emitters in a cluster. Default value is 0. Values less than 2 disable the clustering.
/// Note: Emitters with multi-positions are not clustered and are treated as independant emitters.
/// Note: Changing an emitter from single to multi-positions with load balancing enabled (see \ref AkSpatialAudioInitSettings::uLoadBalancingSpread) might lead to unknown behaviors for a few frames.
public uint uClusteringMinPoints { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uClusteringMinPoints_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_uClusteringMinPoints_get(swigCPtr); }
}
/// Max distance between emitters to be considered as neighbors. This distance is specified for the reference distance defined by fClusteringDeadZoneDistance. Default value is 5.0.
public float fClusteringMaxDistance { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fClusteringMaxDistance_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fClusteringMaxDistance_get(swigCPtr); }
}
/// Defines a dead zone around the listener where no emitters are clusters. Default value is 10.0.
public float fClusteringDeadZoneDistance { set { AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fClusteringDeadZoneDistance_set(swigCPtr, value); } get { return AkUnitySoundEnginePINVOKE.CSharp_AkSpatialAudioInitSettings_fClusteringDeadZoneDistance_get(swigCPtr); }
}
}
#endif // #if !(UNITY_QNX) // Disable under unsupported platforms.