|
JPL Spatial
Sound spatialization and propagation library
|
#include <JPLSpatial/SpatialManager.h>
Public Types | |
| template<class Key , class T > | |
| using | FlatMapType = FlatMapWithAllocator< Key, T, std::pmr::polymorphic_allocator > |
| template<class Key > | |
| using | SetType = std::pmr::unordered_set< Key, std::hash< Key >, std::equal_to< Key > > |
Static Public Member Functions | |
| static JPL_INLINE float | GetSpreadFromSourceSize (float sourceSize, float distance) |
High level interface to manage spatialized sources. It holds an instance of each spatialization service.
| using JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::FlatMapType = FlatMapWithAllocator<Key, T, std::pmr::polymorphic_allocator> |
| using JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::SetType = std::pmr::unordered_set<Key, std::hash<Key>, std::equal_to<Key> > |
|
default |
|
default |
|
delete |
| JPL_INLINE void JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::AdvanceSimulation | ( | ) |
Process all the parameters of the modified sources. E.g. this can be called at the end of an update frame to process changed positions of all the sources.
TBD
| JPL_INLINE ListenerId JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::CreateListener | ( | ) |
| JPL_INLINE SourceId JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::CreateSource | ( | const SourceInitParameters & | options | ) |
| JPL_INLINE bool JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::DeleteListener | ( | ListenerId | listener | ) |
| JPL_INLINE bool JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::DeleteSource | ( | SourceId | source | ) |
| JPL_INLINE std::span< const float > JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::GetChannelGains | ( | SourceId | source, |
| ChannelMap | targetChannelMap | ||
| ) | const |
Get channel gains of the source for the ChannelMap based on the number of values/channels in outGains The returned channel gains are based on the data computed during the last call to AdvanceSimulation()
targetChannelMap was initialized for that source, empty span otherwise | JPL_INLINE float JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::GetConeAttenuation | ( | SourceId | source | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
| JPL_INLINE float JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::GetDistanceAttenuation | ( | SourceId | source, |
| const AttenuationCurveRef & | curve | ||
| ) | const |
| JPL_INLINE std::span< const SourceId > JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::GetLastUpdatedSource | ( | ) | const |
| JPL_INLINE std::optional< Position< Vec3Type > > JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::GetListenerPosition | ( | ListenerId | listener | ) | const |
|
inline |
|
inline |
|
inline |
|
static |
|
delete |
| JPL_INLINE bool JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::SetListener | ( | SourceId | source, |
| ListenerId | listener | ||
| ) |
| JPL_INLINE bool JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::SetListenerPosition | ( | ListenerId | listener, |
| const Position< Vec3Type > & | newPosition | ||
| ) |
Set new position for the listener. This will flag all sources associated with this listener for update if the position is different than the current one.
| JPL_INLINE bool JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::SetSourceFocusAndSpread | ( | SourceId | source, |
| PanEffectParameters | focusAndSpread | ||
| ) |
Set focus and spread parameters for the source.
| JPL_INLINE bool JPL::Spatial::SpatialManager< Vec3Type, VBAPTraits >::SetSourcePosition | ( | SourceId | source, |
| const Position< Vec3Type > & | newPosition | ||
| ) |
Updating any data for sources can be done many times, the data is only processed when calling AdvanceSimulation()