Wwise SDK
_ak_spatial_audio_8h_source
バージョン
menu
|
Wwise SDK 2024.1.10
|
AkSpatialAudio.h
[詳解]
36 /// Determines the operation used to calculate the transmission loss value for a transmission path.
37 /// A ray is cast from listener to emitter, and this operation is applied to combine the current surface with the previous.
39 /// If a geometry instance is solid, transmission loss is applied for each pair of hit surfaces, representing an entrance and exit through the geometry.
40 /// The transmission loss from a pair of hits through a solid geometry instance will be the max of both hits.
112 bool bEnableGeometricDiffractionAndTransmission;///Enable Diffraction and Transmission box checked in the Positioning tab of the Wwise Property Editor.
116 ///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.
129 AkImageSourceSettings(AkVector64 in_sourcePosition, AkReal32 in_fDistanceScalingFactor, AkReal32 in_fLevel)
146 /// \akwarning Note that changing acoustic textures across frames for a given image source, identified by in_srcID, may result in a discontinuity in the audio signal.
165 /// AkExtent describes an extent with width, height and depth. halfWidth, halfHeight and halfDepth should form a vector from the centre of the volume to the positive corner.
166 /// Used in \c AkPortalParams, negative values in the extent will cause an error. For rooms, negative values can be used to opt out of room transmission.
200 /// Index into the vertex table passed into \c AkGeometryParams that describes the first vertex of the triangle. Triangles are double-sided, so vertex order in not important.
203 /// Index into the vertex table passed into \c AkGeometryParams that describes the second vertex of the triangle. Triangles are double-sided, so vertex order in not important.
206 /// Index into the vertex table passed into \c AkGeometryParams that describes the third vertex of the triangle. Triangles are double-sided, so vertex order in not important.
209 /// Index into the surface table passed into \c AkGeometryParams that describes the surface properties of the triangle.
210 /// If this field is left as \c AK_INVALID_SURFACE, then a default-constructed \c AkAcousticSurface is used.
215 /// An single acoustic surface may describe any number of triangles, depending on the granularity desired. For example, if desired for debugging, one could create a unique
216 /// \c AkAcousticSurface struct for each triangle, and define a unique name for each. Alternatively, a single \c AkAcousticSurface could be used to describe all triangles.
217 /// In fact it is not necessary to define any acoustic surfaces at all. If the \c AkTriangle::surface field is left as \c AK_INVALID_SURFACE, then a default-constructed \c AkAcousticSurface is used.
226 /// Acoustic texture ShareSet ID for the surface. The acoustic texture is authored in Wwise, and the shareset ID may be obtained by calling \c AK::SoundEngine::GetIDFromString
230 /// Transmission loss value to apply when simulating sound transmission through this geometric surface.
231 /// Transmission is only simulated on a sound when the sound has Enable Diffraction and Transmission box
234 /// If more than one surface is intersected between the emitter and the listener, the result depends on \c AkSpatialAudioInitSettings::eTransmissionOperation. The default behavior is to use the maximum of all surfaces' transmission loss values.
236 /// Transmission loss is applied on the mix connection between the emitter and the listener for the dry path, and between the emitter and the room for the wet path.
237 /// The transmission loss value is converted to volume attenuation, low-pass and/or high-pass filtering, using the transmission loss curves defined on the sound in Wwise Authoring.
240 /// - Setting a transmission loss value of 0 effectively disables a surface for ray intersection. It is ignored for all diffraction and reflection calculations.
241 /// - When geometry is used to define the shape of a Reverb Zone, surfaces with a transmission loss of 0 define the center of the transition between the Reverb Zone and its parent Room.
242 /// Only surfaces with transmission loss of 0 define the transition region, allowing the user to have transitions around parts of the geometry (certain walls, for example), and not others.
252 /// Structure for retrieving information about the indirect paths of a sound that have been calculated via the geometric reflections API. Useful for debug draw applications.
259 /// pathPoint[0] is closest to the emitter, pathPoint[numPathPoints-1] is closest to the listener.
263 /// textureIDs[0] is closest to the emitter, textureIDs[numPathPoints-1] is closest to the listener.
269 /// Number of reflections in the \c pathPoint[] array. Shadow zone diffraction does not count as a reflection. If there is no shadow zone diffraction, \c numReflections is equal to \c numPathPoints.
283 /// The diffraction paths represent indirect sound paths from the emitter to the listener, whether they go through portals
284 /// (via the rooms and portals API) or are diffracted around edges (via the geometric diffraction API).
285 /// The direct path is included here and can be identified by checking \c nodeCount == 0. The direct path may have a non-zero transmission loss
289 /// Defines the maximum number of nodes that a user can retrieve information about. Longer paths will be truncated.
292 /// Diffraction points along the path. nodes[0] is the point closest to the listener; nodes[numNodes-1] is the point closest to the emitter.
296 /// Emitter position. This is the source position for an emitter. In all cases, except for radial emitters, it is the same position as the game object position.
303 /// ID of the portals that the path passes through. For a given node at position i (in the nodes array), if the path diffracts on a geometric edge, then portals[i] will be an invalid portal ID (ie. portals[i].IsValid() will return false).
304 /// Otherwise, if the path diffracts through a portal at position i, then portals[i] will be the ID of that portal.
305 /// portal[0] represents the node closest to the listener; portal[numNodes-1] represents the node closest to the emitter.
308 /// ID's of the rooms that the path passes through. For a given node at position i, room[i] is the room on the listener's side of the node. If node i diffracts through a portal,
309 /// then rooms[i] is on the listener's side of the portal, and rooms[i+1] is on the emitters side of the portal.
310 /// There is always one extra slot for a room so that the emitters room is always returned in slot room[numNodes] (assuming the path has not been truncated).
313 /// Virtual emitter position. This is the position that is passed to the sound engine to render the audio using multi-positioning, for this particular path.
316 /// Total number of nodes in the path. Defines the number of valid entries in the \c nodes, \c angles, and \c portals arrays. The \c rooms array has one extra slot to fit the emitter's room.
320 /// The diffraction amount is calculated from the sum of the deviation angles from a straight line, of all angles at each nodePoint.
321 // Can be thought of as how far into the 'shadow region' the sound has to 'bend' to reach the listener.
322 /// This value is applied internally, by spatial audio, as the Diffraction value and built-in parameter of the emitter game object.
328 /// This field will be 0 for diffraction paths where \c nodeCount > 0. It may be non-zero for the direct path where \c nodeCount == 0.
329 /// The path's transmission loss value might be geometric transmission loss, if geometry was intersected in the path,
331 /// The geometric transmission loss is calculated from the transmission loss values assigned to the geometry that this path transmits through.
332 /// If a path transmits through multiple geometries with different transmission loss values, the largest value is taken.
333 /// The room transmission loss is taken from the emitter and listener rooms' transmission loss values, and likewise,
334 /// if the listener's room and the emitter's room have different transmission loss values, the greater of the two is used.
335 /// This value is applied internally, by spatial audio, as the Transmission Loss value and built-in parameter of the emitter game object.
343 /// Represents the sum of the length of the individual segments between nodes, with a correction factor applied for diffraction.
344 /// The correction factor simulates the phenomenon where by diffracted sound waves decay faster than incident sound waves and can be customized in the spatial audio init settings.
358 /// Includes volume tapering gain to ensure that diffraction paths do not cut in or out when the maximum diffraction angle is exceeded.
372 /// OrientationFront vector must be unit-length and point along the normal of the portal, and must be orthogonal to Up. It defines the local positive-Z dimension (depth/transition axis) of the portal, used by Extent.
373 /// OrientationTop vector must be unit-length and point along the top of the portal (tangent to the wall), must be orthogonal to Front. It defines the local positive-Y direction (height) of the portal, used by Extent.
376 /// Portal extent. Defines the dimensions of the portal relative to its center; all components must be positive numbers.
377 /// The shape described by these extents is used to "cut out" the opening shape of room geometry. Geometry that overlaps the portal extent is effectively ignored.
378 /// The depth dimension is used to perform transitions between connected rooms by manipulating game-defined auxiliary sends.
379 /// The depth dimension is also used to place game objects into rooms while they are inside the portals.
384 /// Whether or not the portal is active/enabled. For example, this parameter may be used to simulate open/closed doors.
385 /// Portal diffraction is simulated when at least one portal exists and is active between an emitter and the listener.
386 /// To simulate a door that opens or closes gradually, use \c AK::SpatialAudio::SetPortalObstructionAndOcclusion to apply occlusion to a portal, according to the door's opening amount.
391 /// ID of the room to which the portal connects, in the direction of the Front vector. If a room with this ID has not been added via AK::SpatialAudio::SetRoom,
392 /// a room will be created with this ID and with default AkRoomParams. If you would later like to update the AkRoomParams, simply call AK::SpatialAudio::SetRoom again with this same ID.
398 /// ID of the room to which the portal connects, in the direction opposite to the Front vector. If a room with this ID has not been added via AK::SpatialAudio::SetRoom,
399 /// a room will be created with this ID and with default AkRoomParams. If you would later like to update the AkRoomParams, simply call AK::SpatialAudio::SetRoom again with this same ID.
427 /// Room orientation has an effect when the associated aux bus (see ReverbAuxBus) is set with 3D Spatialization in Wwise, as 3D Spatialization implements relative rotation of the emitter (room) and listener.
431 /// Room orientation has an effect when the associated aux bus (see ReverbAuxBus) is set with 3D Spatialization in Wwise, as 3D Spatialization implements relative rotation of the emitter (room) and listener.
435 /// When Spatial Audio is told that a game object is in a particular room via SetGameObjectInRoom, a send to this aux bus will be created to model the reverb of the room.
436 /// Using a combination of Rooms and Portals, Spatial Audio manages which game object the aux bus is spawned on, and what control gain is sent to the bus.
437 /// When a game object is inside a connected portal, as defined by the portal's orientation and extent vectors, both this aux send and the aux send of the adjacent room are active.
438 /// Spatial audio modulates the control value for each send based on the game object's position, in relation to the portal's z-azis and extent, to crossfade the reverb between the two rooms.
439 /// If more advanced control of reverb is desired, SetGameObjectAuxSendValues can be used to add additional sends on to a game object.
445 /// Can be used to implement multiple rooms that share the same aux bus, but have different reverb levels.
448 /// Characteristic transmission loss value for the Room, describing the average amount of sound energy dissipated by the walls of the room.
451 /// 1) If a room tone is playing on the Room Game Object, in a different room than that of the listener.
453 /// It is taken as the maximum between the emitter's room's transmission loss value and the listener's room's transmission loss value.
454 /// 2) If, for both the emitter and listener's Rooms, geometry is not assigned with \c AkRoomParams::GeometryInstanceID, or the Geometry Instance that is assigned
455 /// has \c AkGeometryInstanceParams::UseForReflectionAndDiffraction set to false. In this case, room transmission loss is applied
457 /// When geometry is available, the transmission loss value is calculated instead by intersecting a ray with the geometry between the emitter and listener.
458 /// Transmission loss on geometry overrides room transmission loss, allowing a room to have varying degrees of transmission loss (for example, some transparent walls and some opaque walls).
459 /// 3) To spatialize the output of the Room Game Object. A low transmission loss value emphasizes panning the room
460 /// towards the room's center (the center of the room bounding box) and a higher value emphasizes panning towards the room's portals.
462 /// When room transmission is applied directly to either a room tone (situation 1) or a point source emitter (situation 2), it is applied on the mix connection between the sound and the room.
463 /// The transmission loss value is converted to volume attenuation, low-pass and/or high-pass filtering, using the transmission loss curves defined on the sound in Wwise Authoring.
465 /// \aknote Even when relying on geometry for detailed transmission loss values (per triangle), it is still necessary to set \c AkSoundParams::TransmissionLoss to a representitive value so that
472 /// Send level for sounds that are posted on the room game object; adds reverb to ambience and room tones. Valid range: (0.f-1.f). Set to a value greater than 0 to have spatial audio create a send on the room game object,
473 /// where the room game object itself is specified as the listener and ReverbAuxBus is specified as the aux bus. A value of 0 disables the aux send. This should not be confused with ReverbLevel, which is the send level
475 /// \aknote The room game object can be accessed though the ID that is passed to \c SetRoom() and the \c AkRoomID::AsGameObjectID() method. Posting an event on the room game object leverages automatic room game object placement
476 /// by spatial audio so that when the listener is inside the room, the sound comes from all around the listener, and when the listener is outside the room, the sound comes from the portal(s). Typically, this would be used for
477 /// surround ambiance beds or room tones. Point source sounds should use separate game objects that are registered as spatial audio emitters.
483 /// If set to true, the room game object is registered on calling \c SetRoom(), and not released until the room is deleted or removed with \c RemoveRoom(). If set to false, Spatial Audio registers
484 /// the room object only when it is needed by the sound propagation system for the purposes of reverb, and unregisters the game object when all reverb tails are finished.
485 /// We recommend that you set RoomGameObj_KeepRegistered to true if you use RTPCs on the room game object, if you call \c SetScalingFactor(), or call \c PostEvent() for the purpose of ambience or room tones.
486 /// \aknote The room game object can be accessed through the ID that is passed to \c SetRoom() and the \c AkRoomID::AsGameObjectID() method. Posting an event on the room game object uses automatic room game object placement
487 /// by Spatial Audio so that when the listener is inside the room, the sound comes from all around the listener, and when the listener is outside the room, the sound comes from the portal(s). Typically, this would be used for
488 /// surround ambience beds or room tones. For point source sounds, use separate game objects that are registered as Spatial Audio emitters.
494 /// Assign a Geometry Instance \c GeometryInstanceID, which describes the size and shape of the Room.
495 /// Assigning a Geometry Instance to a Room serves several purposes: the shape and surface properties of the geometry are used to calculate the transmission of reverb and room tones through walls,
496 /// it allows Spatial Audio to automatically determine which Game Objects are in which Room, and it allows for visualization of the room inside the Game Object 3D Viewer.
497 /// To create Room geometry, a Geometry Set must be created using AK::SpatialAudio::SetGeometry, and then a Geometry Instance must be created using AK::SpatialAudio::SetGeometryInstance.
499 /// \aknote If the geometry instance is only used for room containment and not for reflection, diffraction, or transmission, then set \c AkGeometryInstanceParams::UseForReflectionAndDiffraction to false.
506 /// Associate a priority with this room. Room priority is used by the room containment system to disambiguate cases where an object is inside several rooms at the same time. In this case, the room with the higher priority is selected.
518 AkGeometryParams() : Triangles(NULL), NumTriangles(0), Vertices(NULL), NumVertices(0), Surfaces(NULL), NumSurfaces(0), EnableDiffraction(false), EnableDiffractionOnBoundaryEdges(false) {}
521 /// This array will be copied into spatial audio memory and will not be accessed after \c SetGeometry returns.
531 /// This array will be copied into spatial audio memory and will not be accessed after \c SetGeometry returns.
541 /// This array will be copied into spatial audio memory and will not be accessed after \c SetGeometry returns.
547 /// Number of of AkTriangleInfo structures in in_pTriangleInfo and number of AkTriIdx's in in_infoMap.
553 /// Switch to enable or disable geometric diffraction on boundary edges for this Geometry. Boundary edges are edges that are connected to only one triangle.
572 /// \akwarning A default-constructed AkGeometryInstanceParams assumes the default floor plane is passed to AkInitSettings::eFloorPlane.
586 /// AkWorldTransform uses one vector to define the position of the geometry instance, and two more to define the orientation; a forward vector and an up vector.
587 /// To ensure that a geometry instance has the correct rotation with respect to the game, AkInitSettings::eFloorPlane must be initialized with the correct value.
608 /// When enabled, the geometry instance is indexed for ray computation and used to compute reflection, diffraction, and transmission.
615 /// [\ref spatial_audio_experimental "Experimental"] When set to false (default), the intersection of the geometry instance with any portal bounding box is subtracted from the geometry. In effect, an opening is created at the portal location through which sound can pass.
616 /// When set to true, portals cannot create openings in the geometry instance. Enable this to allow the geometry instance to be an obstacle to paths going into or through portal bounds.
621 /// A solid geometry instance applies transmission loss once for each time a transmission path enters and exits its volume, using the max transmission loss between each hit surface. A non-solid geometry instance is one where each surface is infinitely thin, applying transmission loss at each surface. This option has no effect if the Transmission Operation is set to Max.
634 /// In order to use SpatialAudio, you need to initialize it using Init, and register the listeners that you plan on using with any of the services offered by SpatialAudio, using
635 /// RegisterListener respectively, _after_ having registered their corresponding game object to the sound engine.
636 /// \akwarning At the moment, there can be only one Spatial Audio listener registered at any given time.
642 /// Assign a game object as the Spatial Audio listener. There can be only one Spatial Audio listener registered at any given time; in_gameObjectID will replace any previously set Spatial Audio listener.
643 /// The game object passed in must be registered by the client, at some point, for sound to be heard. It is not necessary to be registered at the time of calling this function.
644 /// If no listener is explicitly registered to spatial audio, then a default listener (set via \c AK::SoundEngine::SetDefaultListeners()) is selected. If the are no default listeners, or there are more than one
645 /// default listeners, then it is necessary to call RegisterListener() to specify which listener to use with Spatial Audio.
650 /// Unregister a game object as a listener in the SpatialAudio API; clean up Spatial Audio listener data associated with in_gameObjectID.
651 /// If in_gameObjectID is the current registered listener, calling this function will clear the Spatial Audio listener and
653 /// This function is optional - listener are automatically unregistered when their game object is deleted in the sound engine.
661 /// If the radii are set to 0, the game object is a point source. Non-zero radii create a Radial Emitter.
662 /// The radii are used in spread and distance calculations that simulates sound emitting from a spherical volume of space.
663 /// When applying attenuation curves, the distance between the listener and the inner sphere (defined by the sound position and \c in_innerRadius) is used.
665 /// - If the listener is outside the outer radius, the spread is defined by the area that the sphere occupies in the listener field of view. Specifically, this angle is calculated as 2.0*asinf( \c in_outerRadius / distance ), where distance is the distance between the listener and the sound position.
666 /// - When the listener intersects the outer radius (the listener is exactly \c in_outerRadius units away from the sound position), the spread is exactly 50%.
667 /// - When the listener is between the inner and outer radii, the spread interpolates linearly from 50% to 100% as the listener transitions from the outer radius towards the inner radius.
669 /// \aknote Transmission and diffraction calculations in Spatial Audio always use the center of the sphere (the position(s) passed into \c AK::SoundEngine::SetPosition or \c AK::SoundEngine::SetMultiplePositions) for raycasting.
670 /// To obtain accurate diffraction and transmission calculations for radial sources, where different parts of the volume may take different paths through or around geometry,
671 /// it is necessary to pass multiple sound positions into \c AK::SoundEngine::SetMultiplePositions to allow the engine to 'sample' the area at different points.
685 /// \aknote These functions are low-level and useful when your game engine already implements a geometrical approach to sound propagation such as an image-source or a ray tracing algorithm.
689 /// Add or update an individual image source for processing via the AkReflect plug-in. Use this API for detailed placement of
690 /// reflection image sources, whose positions have been determined by the client, such as from the results of a ray cast, computation or by manual placement. One possible
691 /// use case is generating reflections that originate far enough away that they can be modeled as a static point source, for example, off of a distant mountain.
692 /// The SpatialAudio API manages image sources added via SetImageSource() and sends them to the AkReflect plug-in that is on the aux bus with ID \c in_AuxBusID.
693 /// The image source applies all game objects that have a reflections aux send defined in the authoring tool, or only to a specific game object if \c in_gameObjectID is used.
694 /// \aknote The \c AkImageSourceSettings struct passed in \c in_info must contain a unique image source ID to be able to identify this image source across frames and when updating and/or removing it later.
695 /// Each instance of AkReflect has its own set of data, so you may reuse ID, if desired, as long as \c in_gameObjectID and \c in_AuxBusID are different.
696 /// \aknote It is possible for the AkReflect plugin to process reflections from both \c SetImageSource and the geometric reflections API on the same aux bus and game object, but be aware that image source ID collisions are possible.
697 /// The image source IDs used by the geometric reflections API are generated from hashed data that uniquely identifies the reflecting surfaces. If a collision occurs, one of the reflections will not be heard.
698 /// While collision are rare, to ensure that it never occurs use an aux bus for \c SetImageSource that is unique from the aux bus(es) defined in the authoring tool, and from those passed to \c SetEarlyReflectionsAuxSend.
700 /// \aknote For proper operation with AkReflect and the SpatialAudio API, any aux bus using AkReflect should have 'Listener Relative Routing' checked and the 3D Spatialization set to None in the Wwise authoring tool. See \ref spatial_audio_wwiseprojectsetup_businstances for more details. \endaknote
716 /// Remove an individual reflection image source that was previously added via \c SetImageSource.
726 /// Remove all image sources matching \c in_AuxBusID and \c in_gameObjectID that were previously added via \c SetImageSource.
727 /// Both \c in_AuxBusID and \c in_gameObjectID can be treated as wild cards matching all aux buses and/or all game object, by passing \c AK_INVALID_AUX_ID and/or \c AK_INVALID_GAME_OBJECT, respectively.
743 /// Add or update a set of geometry from the \c SpatialAudio module for geometric reflection and diffraction processing. A geometry set is a logical set of vertices, triangles, and acoustic surfaces,
744 /// which are referenced by the same \c AkGeometrySetID. The ID (\c in_GeomSetID) must be unique and is also chosen by the client in a manner similar to \c AkGameObjectID's.
745 /// It is necessary to create at least one geometry instance for each geometry set that is to be used for diffraction and reflection simulation.
756 /// Calling \c AK::SpatialAudio::RemoveGeometry will remove all instances of the geometry from the scene.
763 /// Add or update a geometry instance from the \c SpatialAudio module for geometric reflection and diffraction processing.
764 /// A geometry instance is a unique instance of a geometry set with a specified transform (position, rotation and scale).
765 /// It is necessary to create at least one geometry instance for each geometry set that is to be used for diffraction and reflection simulation.
766 /// The ID (\c in_GeomSetInstanceID) must be unique amongst all geometry instances, including geometry instances referencing different geometry sets. The ID is chosen by the client in a manner similar to \c AkGameObjectID's.
767 /// To update the transform of an existing geometry instance, call SetGeometryInstance again, passing the same \c AkGeometryInstanceID, with the updated transform.
783 /// Query information about the reflection paths that have been calculated via geometric reflection processing in the SpatialAudio API. This function can be used for debugging purposes.
784 /// This function must acquire the global sound engine lock and therefore, may block waiting for the lock.
803 /// Add or update a room. Rooms are used to connect portals and define an orientation for oriented reverbs. This function may be called multiple times with the same ID to update the parameters of the room.
804 /// \akwarning The ID (\c in_RoomID) must be chosen in the same manner as \c AkGameObjectID's, as they are in the same ID-space. The spatial audio lib manages the
805 /// registration/unregistration of internal game objects for rooms that use these IDs and, therefore, must not collide.
806 /// Also, the room ID must not be in the reserved range (AkUInt64)(-32) to (AkUInt64)(-2) inclusively. You may, however, explicitly add the default room ID AK::SpatialAudio::kOutdoorRoomID (-1)
807 /// in order to customize its AkRoomParams, to provide a valid auxiliary bus, for example.\endakwarning
826 /// Add or update an acoustic portal. A portal is an opening that connects two or more rooms to simulate the transmission of reverberated (indirect) sound between the rooms.
827 /// This function may be called multiple times with the same ID to update the parameters of the portal. The ID (\c in_PortalID) must be chosen in the same manner as \c AkGameObjectID's,
828 /// as they are in the same ID-space. The spatial audio lib manages the registration/unregistration of internal game objects for portals that use these IDs, and therefore must not collide.
848 /// AK::SpatialAudio::SetReverbZone establishes a parent-child relationship between two Rooms and allows for sound propagation between them
849 /// as if they were the same Room, without the need for a connecting Portal. Setting a Room as a Reverb Zone
850 /// is useful in situations where two or more acoustic environments are not easily modeled as closed rooms connected by portals.
851 /// Possible uses for Reverb Zones include: a covered area with no walls, a forested area within an outdoor space, or any situation
852 /// where multiple reverb effects are desired within a common space. Reverb Zones have many advantages compared to standard Game-Defined
853 /// Auxiliary Sends. They are part of the wet path, and form reverb chains with other Rooms; they are spatialized according to their 3D extent;
854 /// they are also subject to other acoustic phenomena simulated in Wwise Spatial Audio, such as diffraction and transmission.
855 /// A parent Room may have multiple Reverb Zones, but a Reverb Zone can only have a single Parent. If a Room is already assigned
856 /// to a parent Room, it will first be removed from the old parent (exactly as if AK::SpatialAudio::RemoveReverbZone were called)
858 /// The Reverb Zone and its parent are both Rooms, and as such, must be specified using AK::SpatialAudio::SetRoom.
859 /// If AK::SpatialAudio::SetReverbZone is called before AK::SpatialAudio::SetRoom, and either of the two rooms do not yet exist,
860 /// placeholder Rooms with default parameters are created. They should be subsequently parameteized with AK::SpatialAudio::SetRoom.
862 /// To set which Reverb Zone a Game Object is in, use the AK::SpatialAudio::SetGameObjectInRoom API, and pass the Reverb Zone's Room ID.
863 /// In Wwise Spatial Audio, a Game Object can only ever be inside a single room, and Reverb Zones are no different in this regard.
865 /// The automatically created 'outdoors' Room is commonly used as a parent Room for Reverb Zones, since they often model open spaces.
866 /// To attach a Reverb zone to outdoors, pass AK::SpatialAudio::kOutdoorRoomID as the \c in_ParentRoom argument. Like all Rooms, the 'outdoors' Room
867 /// can be parameterized (for example, to assign a reverb bus) by passing AK::SpatialAudio::kOutdoorRoomID to AK::SpatialAudio::SetRoom.
881 /// It will no longer be possible for sound to propagate between the two rooms, unless they are explicitly connected with a Portal.
890 /// Set the room that the game object is currently located in - usually the result of a containment test performed by the client. The room must have been registered with \c SetRoom.
891 /// Setting the room for a game object provides the basis for the sound propagation service, and also sets which room's reverb aux bus to send to. The sound propagation service traces the path
892 /// of the sound from the emitter to the listener, and calculates the diffraction as the sound passes through each portal. The portals are used to define the spatial location of the diffracted and reverberated
903 /// When a game object has not been explicitly assigned to a room with \ref AK::SpatialAudio::SetGameObjectInRoom, the room is automatically computed.
911 /// Set the early reflections order for reflection calculation. The reflections order indicates the number of times sound can bounce off of a surface.
912 /// A higher number requires more CPU resources but results in denser early reflections. Set to 0 to globally disable reflections processing.
918 /// Set the diffraction order for geometric path calculation. The diffraction order indicates the number of edges a sound can diffract around.
919 /// A higher number requires more CPU resources but results in paths found around more complex geometry. Set to 0 to globally disable geometric diffraction processing.
934 /// Pass a valid Game Object ID to to \c in_gameObjectID to affect a specific game object and override the value set in AkSpatialAudioInitSettings::uMaxDiffractionPaths.
935 /// Pass \c AK_INVALID_GAME_OBJECT to apply the same limit to all Game Objects (that have not previously been passed to SetMaxDiffractionPaths),
945 /// Set the maximum number of game-defined auxiliary sends that can originate from a single emitter.
946 /// Set to 1 to only allow emitters to send directly to their current room. Set to 0 to disable the limit.
954 /// A higher number requires more CPU resources but provides more accurate results. Default value (35) should be good for most applications.
960 /// Set the number of frames on which the path validation phase will be spread. Value between [1..[
967 /// [\ref spatial_audio_experimental "Experimental"] Enable parameter smoothing on the diffraction paths output from the Acoustics Engine, either globally or for a specific game object. Set fSmoothingConstantMs to a value greater than 0 to define the time constant (in milliseconds) for parameter smoothing.
976 /// Geometrical reflection calculation inside spatial audio is enabled for a game object if any sound playing on the game object has a valid early reflections aux bus specified in the authoring tool,
978 /// The \c in_auxBusID parameter of SetEarlyReflectionsAuxSend applies to sounds playing on the game object \c in_gameObjectID which have not specified an early reflection bus in the authoring tool -
979 /// the parameter specified on individual sounds' reflection bus takes priority over the value passed in to \c SetEarlyReflectionsAuxSend.
981 /// Users may apply this function to avoid duplicating sounds in the actor-mixer hierarchy solely for the sake of specifying a unique early reflection bus, or in any situation where the same
982 /// sound should be played on different game objects with different early reflection aux buses (the early reflection bus must be left blank in the authoring tool if the user intends to specify it through the API). \endaknote
989 /// The \c in_fSendVolume parameter is used to control the volume of the early reflections send. It is combined with the early reflections volume specified in the authoring tool, and is applied to all sounds
991 /// Setting \c in_fSendVolume to 0.f will disable all reflection processing for this game object.
997 /// Set the obstruction and occlusion value for a portal that has been registered with Spatial Audio.
998 /// Portal obstruction simulates objects that block the direct sound path between the portal and the listener, but
1001 /// Portal obstruction is applied to the connection between the emitter and the listener, and only affects the dry signal path.
1002 /// Portal occlusion simulates a complete blockage of both the direct and indirect sound through a portal. For example, use portal occlusion for
1004 /// Portal occlusion is applied to the connection between the emitter and the first room in the chain, as well as the connection between the emitter and listener.
1006 /// If you are using built-in game parameters to drive RTPCs, the obstruction and occlusion values set here
1007 /// do not affect the RTPC values. This behavior is intentional and occurs because RTPCs only provide one
1008 /// value per game object, but a single game object can have multiple paths through different Portals,
1010 /// To apply detailed obstruction to specific sound paths but not others, use \c AK::SpatialAudio::SetGameObjectToPortalObstruction and \c AK::SpatialAudio::SetPortalToPortalObstruction.
1011 /// To apply occlusion and obstruction to the direct line of sight between the emitter and listener use \c AK::SoundEngine::SetObjectObstructionAndOcclusion.
1022 /// Set the obstruction value of the path between a game object and a portal that has been created by Spatial Audio.
1023 /// The obstruction value is applied on one of the path segments of the sound between the emitter and the listener.
1025 /// Also, there should not be any portals between the provided game object and portal ID parameters.
1026 /// The obstruction value is used to simulate objects between the portal and the game object that are obstructing the sound.
1027 /// Send an obstruction value of 0 to ensure the value is removed from the internal data structure.
1036 /// Set the obstruction value of the path between two portals that has been created by Spatial Audio.
1037 /// The obstruction value is applied on one of the path segments of the sound between the emitter and the listener.
1040 /// The obstruction value is used to simulate objects between the portals that are obstructing the sound.
1041 /// Send an obstruction value of 0 to ensure the value is removed from the internal data structure.
1050 /// Query information about the wet diffraction amount for the portal \c in_portal, returned as a normalized value \c out_wetDiffraction in the range [0,1].
1051 /// The wet diffraction is calculated from how far into the 'shadow region' the listener is from the portal. Unlike dry diffraction, the
1053 /// This value is applied by spatial audio, to the Diffraction value and built-in game parameter of the room game object that is
1055 /// This function must acquire the global sound engine lock and therefore, may block waiting for the lock.
1063 /// Query information about the diffraction state for a particular listener and emitter, which has been calculated using the data provided via the spatial audio emitter API. This function can be used for debugging purposes.
1064 /// Returned in \c out_aPaths, this array contains the sound paths calculated from diffraction around a geometric edge and/or diffraction through portals connecting rooms.
1065 /// No paths will be returned in any of the following conditions: (1) the emitter game object has a direct line of sight to the listener game object, (2) the emitter and listener are in the same room, and the listener is completely outside the radius of the emitter,
1066 /// or (3) The emitter and listener are in different rooms, but there are no paths found via portals between the emitter and the listener.
1067 /// A single path with zero diffraction nodes is returned when all of the following conditions are met: (1) the emitter and listener are in the same room, (2) there is no direct line of sight, and (3) either the Voice's Attenuation's curve max distance is exceeded or the accumulated diffraction coefficient exceeds 1.0.
1068 /// This function must acquire the global sound engine lock and, therefore, may block waiting for the lock.
bool RoomGameObj_KeepRegistered
Definition: AkSpatialAudio.h:492
AKSOUNDENGINE_API AKRESULT QueryWetDiffraction(AkPortalID in_portal, AkReal32 &out_wetDiffraction)
AKSOUNDENGINE_API AKRESULT UnregisterListener(AkGameObjectID in_gameObjectID)
bool BypassPortalSubtraction
Definition: AkSpatialAudio.h:619
AkUInt32 numPathPoints
Number of valid elements in the pathPoint[], surfaces[], and diffraction[] arrays.
Definition: AkSpatialAudio.h:267
AkUInt32 textureIDs[AK_MAX_REFLECTION_PATH_LENGTH]
Definition: AkSpatialAudio.h:264
@ AkTransmissionOperation_Max
The highest transmission loss of all hit surfaces is used.
Definition: AkSpatialAudio.h:45
AKSOUNDENGINE_API AKRESULT RemovePortal(AkPortalID in_PortalID)
bool bEnableGeometricDiffractionAndTransmission
Definition: AkSpatialAudio.h:112
void Set(const AkVector64 &in_position, const AkVector &in_orientationFront, const AkVector &in_orientationTop)
Set position and orientation. Orientation front and top should be orthogonal and normalized.
Definition: AkTypes.h:458
Definition: AkSpatialAudio.h:219
AkTransmissionOperation eTransmissionOperation
The operation used to determine transmission loss on direct paths.
Definition: AkSpatialAudio.h:119
AkVertIdx point2
Index into the vertex table passed into AkGeometryParams that describes the third vertex of the trian...
Definition: AkSpatialAudio.h:207
AkReal32 RoomGameObj_AuxSendLevelToSelf
Definition: AkSpatialAudio.h:481
AKSOUNDENGINE_API AKRESULT SetGameObjectInRoom(AkGameObjectID in_gameObjectID, AkRoomID in_CurrentRoomID)
AKSOUNDENGINE_API AKRESULT SetMaxEmitterRoomAuxSends(AkUInt32 in_uMaxEmitterRoomAuxSends)
AkTriangle(AkVertIdx in_pt0, AkVertIdx in_pt1, AkVertIdx in_pt2, AkSurfIdx in_surfaceInfo)
Constructor
Definition: AkSpatialAudio.h:193
AKSOUNDENGINE_API AKRESULT Init(const AkSpatialAudioInitSettings &in_initSettings)
Initialize the SpatialAudio API.
#define AK_DEFAULT_GEOMETRY_POSITION_Z
Definition: AkSpatialAudio.h:559
AkSpatialAudioInitSettings()
Definition: AkSpatialAudio.h:52
AKSOUNDENGINE_API AKRESULT SetReverbZone(AkRoomID in_ReverbZone, AkRoomID in_ParentRoom, AkReal32 in_transitionRegionWidth)
AKSOUNDENGINE_API AKRESULT SetMaxDiffractionPaths(AkUInt32 in_uMaxDiffractionPaths, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT)
AKSOUNDENGINE_API AKRESULT SetTransmissionOperation(AkTransmissionOperation in_eOperation)
AkUInt32 uLoadBalancingSpread
Spread the computation of paths on uLoadBalancingSpread frames [1..[. When uLoadBalancingSpread is se...
Definition: AkSpatialAudio.h:111
AKSOUNDENGINE_API AKRESULT QueryDiffractionPaths(AkGameObjectID in_gameObjectID, AkUInt32 in_positionIndex, AkVector64 &out_listenerPos, AkVector64 &out_emitterPos, AkDiffractionPathInfo *out_aPaths, AkUInt32 &io_uArraySize)
AkUInt32 nodeCount
Total number of nodes in the path. Defines the number of valid entries in the nodes,...
Definition: AkSpatialAudio.h:317
AKSOUNDENGINE_API AKRESULT SetSmoothingConstant(AkReal32 in_fSmoothingConstantMs, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT)
AKSOUNDENGINE_API AKRESULT SetEarlyReflectionsAuxSend(AkGameObjectID in_gameObjectID, AkAuxBusID in_auxBusID)
AkUInt32 uNumTexture
Number of valid textures in the texture array.
Definition: AkReflectGameData.h:68
AkReal32 fMaxDiffractionAngleDegrees
Definition: AkSpatialAudio.h:96
AkUInt32 uDiffractionOnReflectionsOrder
Definition: AkSpatialAudio.h:92
AkVector64 pathPoint[AK_MAX_REFLECTION_PATH_LENGTH]
Definition: AkSpatialAudio.h:260
bool UseForReflectionAndDiffraction
Definition: AkSpatialAudio.h:613
AkReal32 fCPULimitPercentage
Definition: AkSpatialAudio.h:105
AKSOUNDENGINE_API AKRESULT QueryReflectionPaths(AkGameObjectID in_gameObjectID, AkUInt32 in_positionIndex, AkVector64 &out_listenerPos, AkVector64 &out_emitterPos, AkReflectionPathInfo *out_aPaths, AkUInt32 &io_uArraySize)
AKSOUNDENGINE_API AKRESULT RemoveGeometryInstance(AkGeometryInstanceID in_GeometryInstanceID)
Definition: AkReflectGameData.h:73
Position and orientation of game objects in the world (i.e. supports 64-bit-precision position)
Definition: AkTypes.h:429
AKSOUNDENGINE_API AKRESULT SetImageSource(AkImageSourceID in_srcID, const AkImageSourceSettings &in_info, const char *in_name, AkUniqueID in_AuxBusID=AK_INVALID_AUX_ID, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT)
AKSOUNDENGINE_API AKRESULT SetGeometry(AkGeometrySetID in_GeomSetID, const AkGeometryParams &in_params)
Structure for retrieving information about the indirect paths of a sound that have been calculated vi...
Definition: AkSpatialAudio.h:254
AKSOUNDENGINE_API AKRESULT SetPortalToPortalObstruction(AkPortalID in_PortalID0, AkPortalID in_PortalID1, AkReal32 in_fObstruction)
AKSOUNDENGINE_API AKRESULT RemoveReverbZone(AkRoomID in_ReverbZone)
AkUInt32 uMaxEmitterRoomAuxSends
Definition: AkSpatialAudio.h:90
AKSOUNDENGINE_API AKRESULT SetMaxGlobalReflectionPaths(AkUInt32 in_uMaxGlobalReflectionPaths)
bool isOccluded
Deprecated - always false. Occluded paths are not generated.
Definition: AkSpatialAudio.h:279
AKSOUNDENGINE_API AKRESULT SetDiffractionOrder(AkUInt32 in_uDiffractionOrder, bool in_bUpdatePaths)
bool bCalcEmitterVirtualPosition
An emitter that is diffracted through a portal or around geometry will have its apparent or virtual p...
Definition: AkSpatialAudio.h:118
void SetOneTexture(AkUniqueID in_texture)
Helper function to set a single acoustic texture.
Definition: AkSpatialAudio.h:136
AkUInt32 uMaxDiffractionOrder
Definition: AkSpatialAudio.h:77
AkReal32 angles[kMaxNodes]
Raw diffraction angles at each point, in radians.
Definition: AkSpatialAudio.h:301
AKSOUNDENGINE_API AKRESULT ClearImageSources(AkUniqueID in_AuxBusID=AK_INVALID_AUX_ID, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT)
Definition: AkSpatialAudio.h:168
AKSOUNDENGINE_API AKRESULT SetLoadBalancingSpread(AkUInt32 in_uNbFrames)
AkVector64 imageSource
Apparent source of the reflected sound that follows this path.
Definition: AkSpatialAudio.h:256
AKSOUNDENGINE_API AKRESULT SetGeometryInstance(AkGeometryInstanceID in_GeometryInstanceID, const AkGeometryInstanceParams &in_params)
@ AkTransmissionOperation_Multiply
The inverse of transmission loss (1 - TL) is multiplied in succession, and the result inverted....
Definition: AkSpatialAudio.h:44
AkUInt32 uMaxDiffractionPaths
Definition: AkSpatialAudio.h:84
#define AK_DEFAULT_GEOMETRY_POSITION_X
Definition: AkSpatialAudio.h:557
AkUInt32 uNumberOfPrimaryRays
The number of primary rays used in the ray tracing engine. A larger number of rays will increase the ...
Definition: AkSpatialAudio.h:75
AkUInt32 uMaxReflectionOrder
Maximum reflection order [1, 4] - the number of 'bounces' in a reflection path. A high reflection ord...
Definition: AkSpatialAudio.h:76
AKSOUNDENGINE_API AKRESULT RemoveImageSource(AkImageSourceID in_srcID, AkUniqueID in_AuxBusID=AK_INVALID_AUX_ID, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT)
Initialization settings of the spatial audio module.
Definition: AkSpatialAudio.h:51
AKSOUNDENGINE_API AKRESULT UnsetGameObjectInRoom(AkGameObjectID in_gameObjectID)
AkReal32 diffraction[AK_MAX_REFLECTION_PATH_LENGTH]
Diffraction amount, normalized to the range [0,1]
Definition: AkSpatialAudio.h:273
#define AK_MAX_REFLECTION_PATH_LENGTH
Definition: AkSpatialAudioTypes.h:42
AKSOUNDENGINE_API AKRESULT RemoveRoom(AkRoomID in_RoomID)
AKSOUNDENGINE_API AKRESULT SetReflectionsOrder(AkUInt32 in_uReflectionsOrder, bool in_bUpdatePaths)
AkVertIdx point0
Index into the vertex table passed into AkGeometryParams that describes the first vertex of the trian...
Definition: AkSpatialAudio.h:201
AkUInt32 numReflections
Number of reflections in the pathPoint[] array. Shadow zone diffraction does not count as a reflectio...
Definition: AkSpatialAudio.h:270
AKSOUNDENGINE_API AKRESULT SetPortal(AkPortalID in_PortalID, const AkPortalParams &in_Params, const char *in_PortalName=nullptr)
AKSOUNDENGINE_API AKRESULT ResetStochasticEngine()
bool EnableDiffraction
Switch to enable or disable geometric diffraction for this Geometry.
Definition: AkSpatialAudio.h:551
AkSurfIdx NumSurfaces
Number of of AkTriangleInfo structures in in_pTriangleInfo and number of AkTriIdx's in in_infoMap.
Definition: AkSpatialAudio.h:548
AkWorldTransform virtualPos
Virtual emitter position. This is the position that is passed to the sound engine to render the audio...
Definition: AkSpatialAudio.h:314
static const AkUInt32 kMaxNodes
Defines the maximum number of nodes that a user can retrieve information about. Longer paths will be ...
Definition: AkSpatialAudio.h:290
AkReal32 fSmoothingConstantMs
Definition: AkSpatialAudio.h:107
#define AK_DEFAULT_GEOMETRY_POSITION_Y
Definition: AkSpatialAudio.h:558
AKSOUNDENGINE_API AKRESULT SetGameObjectToPortalObstruction(AkGameObjectID in_gameObjectID, AkPortalID in_PortalID, AkReal32 in_fObstruction)
AkReal32 fMovementThreshold
Amount that an emitter or listener has to move to trigger a validation of reflections/diffraction....
Definition: AkSpatialAudio.h:74
bool EnableDiffractionOnBoundaryEdges
Switch to enable or disable geometric diffraction on boundary edges for this Geometry....
Definition: AkSpatialAudio.h:554
static const AkGameObjectID AK_INVALID_GAME_OBJECT
Invalid game object (may also mean all game objects)
Definition: AkTypes.h:96
3D 64-bit vector. Intended as storage for world positions of sounds and objects, benefiting from 64-b...
Definition: AkTypes.h:334
AkExtent(AkReal32 in_halfWidth, AkReal32 in_halfHeight, AkReal32 in_halfDepth)
Definition: AkSpatialAudio.h:171
AkImageSourceSettings(AkVector64 in_sourcePosition, AkReal32 in_fDistanceScalingFactor, AkReal32 in_fLevel)
Constructor with parameters
Definition: AkSpatialAudio.h:129
static const AkAuxBusID AK_INVALID_AUX_ID
Invalid auxiliary bus ID (or no Aux bus ID)
Definition: AkTypes.h:103
Definition: AkSpatialAudioTypes.h:134
AkUInt32 uMaxSoundPropagationDepth
Maximum number of rooms that sound can propagate through; must be less than or equal to AK_MAX_SOUND_...
Definition: AkSpatialAudio.h:73
3D vector for some operations in 3D space. Typically intended only for localized calculations due to ...
Definition: AkTypes.h:369
AkUInt32 uMaxGlobalReflectionPaths
Definition: AkSpatialAudio.h:87
AkGeometrySetID GeometrySetID
Definition: AkSpatialAudio.h:606
AKSOUNDENGINE_API AKRESULT SetEarlyReflectionsVolume(AkGameObjectID in_gameObjectID, AkReal32 in_fSendVolume)
Definition: AkSpatialAudio.h:288
AKSOUNDENGINE_API AKRESULT SetPortalObstructionAndOcclusion(AkPortalID in_PortalID, AkReal32 in_fObstruction, AkReal32 in_fOcclusion)
AkGeometryInstanceParams()
Definition: AkSpatialAudio.h:573
@ AkTransmissionOperation_Add
Transmission loss of each hit surface is summed until it reaches 100%.
Definition: AkSpatialAudio.h:43
AKSOUNDENGINE_API AKRESULT RemoveGeometry(AkGeometrySetID in_SetID)
AkUniqueID arTextureID[AK_MAX_NUM_TEXTURE]
Unique IDs of the Acoustics Texture ShareSets used to filter this image source.
Definition: AkReflectGameData.h:69
#define AK_MAX_SOUND_PROPAGATION_DEPTH
Definition: AkSpatialAudioTypes.h:44
AkVertIdx point1
Index into the vertex table passed into AkGeometryParams that describes the second vertex of the tria...
Definition: AkSpatialAudio.h:204
AkWorldTransform PositionAndOrientation
Definition: AkSpatialAudio.h:592
AKSOUNDENGINE_API AKRESULT RegisterListener(AkGameObjectID in_gameObjectID)
Definition: AkReflectGameData.h:61
AKSOUNDENGINE_API AKRESULT SetRoom(AkRoomID in_RoomID, const AkRoomParams &in_Params, const char *in_RoomName=nullptr)
AKSOUNDENGINE_API AKRESULT SetGameObjectRadius(AkGameObjectID in_gameObjectID, AkReal32 in_outerRadius, AkReal32 in_innerRadius)
AKSOUNDENGINE_API AKRESULT SetNumberOfPrimaryRays(AkUInt32 in_uNbPrimaryRays)