JPL Spatial
Sound spatialization and propagation library
Loading...
Searching...
No Matches
JPL Namespace Reference

Namespaces

namespace  Algo
 
namespace  arctangent2
 
namespace  asinacos
 
namespace  cephes
 Log constants.
 
namespace  ChannelMask
 Common channel masks.
 
namespace  constant
 Log10 constants.
 
namespace  Curve
 
namespace  Detail
 
namespace  detail
 
namespace  exponent
 
namespace  Impl
 
namespace  Internal
 
namespace  logarithm
 
namespace  Math
 
namespace  Matrix
 
namespace  Octahedron
 Type traits and utilities for octahedron encoder.
 
namespace  power
 
namespace  RingImpl
 
namespace  sincos
 
namespace  Spatial
 
namespace  SpeakerTriangulation
 
namespace  tangent
 
namespace  Triangulation
 
namespace  Type
 
namespace  UnitTests
 
namespace  VBAP
 Forward declaration.
 

Classes

class  AbstractRingIndex
 Forward declaration. More...
 
class  AbstractRingIndex< MaxWindow, WriteDirection, OperationMode >
 Special case for 0-1 MaxWindow doesn't require mirror index. More...
 
struct  AcousticMaterial
 Acoustical properties of a material. More...
 
class  AirAbsorption
 
struct  AirAbsorptionCache
 
struct  AirAbsorptionParams
 
struct  AllocatorDeleter
 
struct  arrow_proxy
 
struct  AttenuationBaseModel
 
struct  AttenuationCone
 
struct  AttenuationCurve
 
struct  AttenuationFunction
 
struct  Basis
 Orthonormal basis (column-major) More...
 
class  ChannelConversionWeights
 Utility helper to access 2D array kind of weights. More...
 
class  ChannelMap
 
struct  ConeAttenuationCache
 
class  ConvexHullBuilder
 
class  CountingResource
 
struct  CurveAttenuationCache
 
class  DelayLine
 Forward declaration. More...
 
struct  DelayTap
 
struct  DelayTapXFade
 
struct  DiffuserBase
 
struct  DiffuserEqualLengths
 
struct  DiffuserHalfLengths
 
struct  DiffusionStep
 
struct  DirectEffectInitParameters
 
struct  DirectPathResult
 
class  DirectPathService
 
struct  DirectPathServiceIDTag
 
class  DirectSoundEffect
 
class  ERBus
 
struct  Feedback
 
class  FlatMap
 
struct  FloatNubmer
 
struct  FloatNubmer< double >
 
struct  FloatNubmer< float >
 
struct  FourBandCrossover
 4th order Linkwitz-Riley 4-band crossover More...
 
struct  Gain16Bit
 
struct  Gain24Bit
 
struct  Hash
 
struct  IDType
 
class  LinearInterpolator
 Linear fractional interpolator. More...
 
struct  LR4Split
 4th order Linkwitz-Riley crossover More...
 
struct  LR4Split2Lanes
 
class  Mallocator
 
struct  MinimalVec3
 
class  MultiChannelFeedback
 
struct  MultiChannelFeedbackBase
 
class  MultiChannelMixedFeedback
 
struct  NamedChannelMask
 Utility to hold some channel mask with a name. More...
 
class  NearestInterpolator
 Nearest fractional interpolator. More...
 
class  OctahedronEncoding
 Forward declaration. More...
 
struct  OrientationData
 Minimum data required to do our orientation math. More...
 
struct  pair_ref
 Zip iterator for the FlatMap. More...
 
struct  PanEffectInitParameters
 
struct  PanEffectParameters
 
struct  PanningCacheKey
 
class  PanningService
 
struct  PanningServiceIDTag
 
class  PmrDeleter
 
class  PmrMallocResource
 
struct  Position
 Location and orientation in one place. More...
 
struct  Quat
 Minimal quaternion (w + xi + yj + zk) More...
 
class  RealtimeObject
 
class  ReverbBus
 
class  SceneInterface
 A very experimental scene interface for specular ray tracing. More...
 
class  ScopedGlobalMemoryResource
 RAII override library-wide default memory resource. More...
 
class  ScratchHashSet32
 
struct  simd
 Minimal 4-wide 32-bit float vector implementation for SIMD. More...
 
struct  simd_mask
 
struct  SmoothedValue
 
struct  SourceLayoutKey
 
class  SpecularPathCache
 A very experimental specular path cache. More...
 
struct  SpecularPathData
 
struct  SpecularPathId
 A very experimental specular path definition. More...
 
class  SpecularRayTracing
 
class  SpeedOfSound
 Speed of sound utility. More...
 
struct  SplitFrequencies
 Split frequencies points for crossover. More...
 
struct  SplitMix64
 
struct  StateVariableFilterTPT
 State Variable Filter with Topology-Preserving Transform structure. More...
 
class  StaticArray
 
class  Thiran1stInterpolator
 First-order Thiran fractional–delay all-pass interpolator. More...
 
struct  TPTSVFAllpass
 
struct  TPTSVFAllpassSIMD
 
struct  TPTSVFStageSIMD
 
struct  TracedPath
 Sequence of traced path intersections. More...
 
struct  TraceNode
 Node of a traced paths. More...
 
struct  TraceParameters
 Generic parameters used in different kinds of traces. More...
 
struct  TraceResults
 Result of tracing paths. More...
 
class  Variance
 Variance estimation utility. More...
 
class  VBAPannerBase
 
struct  VBAPBaseTraits
 Forward declaration. More...
 
struct  Vec2
 
struct  Vec3Access
 
struct  Vec3Access< MinimalVec3 >
 
struct  Vec3Buffer
 
struct  Vec3BufferView
 
struct  Vec3MaskPack
 Structure to pass around per axis mask parameters. More...
 
struct  Vec3Pack
 Minimal Vec3 class for SIMD operations on 4 Vec3 at a time. More...
 
struct  WyRand
 
class  zip_iter
 
struct  zip_range
 

Concepts

concept  CFloatOrSIMD
 
concept  CVec3
 

Typedefs

using FrequencyBands = simd
 
using Rand = WyRand
 
template<class KeyType , class T , template< class > class AllocatorType>
using FlatMapWithAllocator = FlatMap< KeyType, T, std::equal_to< KeyType >, std::vector< KeyType, AllocatorType< KeyType > >, std::vector< T, AllocatorType< T > > >
 
using ScratchHashSetIdentity = ScratchHashSet32< uint32, std::identity >
 
using uint = unsigned int
 
using uint8 = std::uint8_t
 
using uint16 = std::uint16_t
 
using uint32 = std::uint32_t
 
using uint64 = std::uint64_t
 
using int8 = std::int8_t
 
using int16 = std::int16_t
 
using int32 = std::int32_t
 
using int64 = std::int64_t
 
using TraceFunction = void(*)(const char *message)
 Trace function, needs to be overridden by application. This should output a line of text to the log / TTY.
 
using AssertFailedFunction = bool(*)(const char *inExpression, const char *inMessage, const std::source_location)
 Function called when an assertion fails. This function should return true if a breakpoint needs to be triggered.
 
using AbsorptionCoeffs = simd
 
using FreqBandCenters = simd
 
using EnergyBands = simd
 
using Octahedron8Bit = OctahedronEncoding< Octahedron::Precision4bits >
 Encoder aliases for available encoding precisions.
 
using Octahedron16Bit = OctahedronEncoding< Octahedron::Precision8bits >
 
using Octahedron32Bit = OctahedronEncoding< Octahedron::Precision16bits >
 
using Octahedron64Bit = OctahedronEncoding< Octahedron::Precision32bits >
 
template<std::size_t N>
using Vec3SIMDBuffer = Vec3Buffer< simd, N >
 Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as floats.
 
template<std::size_t N>
using Vec3FloatBuffer = Vec3Buffer< float, N >
 Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as simd.
 
using Vec3SIMDBufferView = Vec3BufferView< simd >
 View into a Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as floats.
 
using Vec3FloatBufferView = Vec3BufferView< float >
 View into a Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as simd.
 
template<class Vec3Type >
using Vec3FloatType = std::remove_cvref_t< decltype(Vec3Access< Vec3Type >::GetX(std::declval< Vec3Type >()))>
 
template<class T >
using PmrAllocator = std::pmr::polymorphic_allocator< T >
 Just a shorter alias.
 
template<class T >
using pmr_unique_ptr = std::unique_ptr< T, PmrDeleter< T > >
 Alias for unique ptr using pmr allocator and deleter.
 
using VBAPStandartTraits = VBAPBaseTraits< MinimalVec3 >
 
template<class Traits = VBAPStandartTraits>
using VBAPanner2D = VBAPannerBase< VBAP::Panning2D< Traits >, Traits >
 
template<class Traits = VBAPStandartTraits, auto cLUTType = VBAP::ELUTSize::KB_983>
using VBAPanner3D = VBAPannerBase< VBAP::Panning3D< Traits, cLUTType >, Traits >
 
using AttenuationCurveRef = std::shared_ptr< AttenuationFunction >
 
using DirectEffectHandle = IDType< DirectPathServiceIDTag >
 
using StandartPanner = VBAPanner2D< VBAPStandartTraits >
 
using StandartSourceLayout = typename StandartPanner::SourceLayoutType
 
using StandartPanData = typename StandartPanner::PanUpdateData
 
using StandartPanDataWithOrientation = typename StandartPanner::PanUpdateDataWithOrientation
 
using PanEffectHandle = IDType< PanningServiceIDTag >
 
template<uint32_t MaxWindow>
using RingIndexForwardFast = AbstractRingIndex< MaxWindow, RingImpl::EWriteDirection::Forward, RingImpl::EOperationMode::Pow2BitManip >
 
template<uint32_t MaxWindow>
using RingIndexBackwardFast = AbstractRingIndex< MaxWindow, RingImpl::EWriteDirection::Backward, RingImpl::EOperationMode::Pow2BitManip >
 
template<uint32_t MaxWindow>
using RingIndexForward = AbstractRingIndex< MaxWindow, RingImpl::EWriteDirection::Forward, RingImpl::EOperationMode::Modulo >
 
template<uint32_t MaxWindow>
using RingIndexBackward = AbstractRingIndex< MaxWindow, RingImpl::EWriteDirection::Backward, RingImpl::EOperationMode::Modulo >
 
using OnlineVariance = typename Variance< float >::Online
 
using OnlineVarianceSIMD = typename Variance< simd >::Online
 

Enumerations

enum  EChannel : uint32 {
  FrontLeft = JPL_BIT(0) , FrontRight = JPL_BIT(1) , FrontCenter = JPL_BIT(2) , LFE = JPL_BIT(3) ,
  SideLeft = JPL_BIT(4) , SideRight = JPL_BIT(5) , FrontLeftCenter = JPL_BIT(6) , FrontRightCenter = JPL_BIT(7) ,
  BackLeft = JPL_BIT(8) , BackRight = JPL_BIT(9) , BackCenter = JPL_BIT(10) , WideLeft = JPL_BIT(11) ,
  WideRight = JPL_BIT(12) , TopCenter = JPL_BIT(13) , TopFrontLeft = JPL_BIT(14) , TopFrontCenter = JPL_BIT(15) ,
  TopFrontRight = JPL_BIT(16) , TopSideLeft = JPL_BIT(17) , TopSideRight = JPL_BIT(18) , TopBackLeft = JPL_BIT(19) ,
  TopBackCenter = JPL_BIT(20) , TopBackRight = JPL_BIT(21) , NUM_GroundChannels = std::bit_width((uint32)WideRight) , TOP_Channels = TopCenter ,
  NUM_TopChannels = std::bit_width((uint32)TopBackRight) - NUM_GroundChannels , Invalid = 0
}
 
enum  AttenuationModel : int {
  None , Inverse , Linear , Exponential ,
  _Count
}
 
enum class  ETraceDirection { Forward , Backward }
 
enum class  ESpatializationType { None , Position , PositionAndOrientation }
 Determines spatialized source channel oritentation. More...
 
enum class  ThreadType { realtime , nonRealtime }
 
enum class  RealtimeObjectOptions { nonRealtimeMutatable , realtimeMutatable }
 

Functions

template<CFloatOrSIMD T>
JPL_INLINEReflectionLoss_dB (const T &alpha)
 
std::ostream & operator<< (std::ostream &os, const AcousticMaterial &v)
 
void Add (float *dest, const float *source, uint32 destChannel, uint32 sourceChannel, uint32 destNumChannels, uint32 sourceNumChannels, uint32 numFrames)
 
void Add (float *dest, const float *source, uint32 destChannel, uint32 destNumChannels, uint32 numFrames)
 
void ApplyGain (float *dest, uint32 numFrames, float gain)
 
void ApplyGainRamp (float *dest, uint32 numFrames, float gainStart, float gainEnd)
 
void AddAndApplyGainRamp (float *dest, const float *source, uint32 destChannel, uint32 sourceChannel, uint32 destNumChannels, uint32 sourceNumChannels, uint32 numFrames, float gainStart, float gainEnd)
 
void AddAndApplyGainRamp (float *dest, const float *source, uint32 numChannels, uint32 numFrames, float gainStart, float gainEnd)
 
void DownmixToMono (float *dest, const float *source, uint32 numChannels, uint32 numSamples)
 
JPL_INLINE simd EstimateRT60_Sabine (float w, float l, float h, const simd &avgAbsorption)
 
JPL_INLINE simd EstimateRT60_Sabine (float w, float l, float h, const simd &avgAbsorption, const simd &airAttenuation_dB)
 Estimate RT60 using Sabine's equation, taking into account air absorption.
 
JPL_INLINE simd EstimateRT60_Eyring (float w, float l, float h, const simd &avgAbsorption)
 
JPL_INLINE simd EstimateRT60_Eyring (float w, float l, float h, const simd &avgAbsorption, const simd &airAttenuation_dB)
 Estimate RT60 using Eyring-Norris equation, taking into account air absorption.
 
JPL_INLINE constexpr float CalculateChannelPositionRectangularWeight (uint32 channelPositionA, uint32 channelPositionB)
 
JPL_INLINE constexpr int ToChannelPos (EChannel channel) noexcept
 
bool AssertFailedParamHelper (const char *inExpression, const std::source_location location)
 
bool AssertFailedParamHelper (const char *inExpression, const std::source_location location, const char *inMessage)
 
JPL_INLINE FreqBandCenters ComputeBandCenters (const SplitFrequencies &splitFrequenciesHz, float nyquist=22050.0f)
 
JPL_INLINE FreqBandCenters ComputeBandLowerThirdCenters (const SplitFrequencies &splitFrequenciesHz, float nyquist=22050.0f)
 
JPL_INLINE SplitFrequencies SplitFrequenciesFromBandCenters (const FreqBandCenters &bandCenters, float nyquist=22050.0f)
 
JPL_INLINE FreqBandCenters ComputeBandLowerThirdCenters (const FreqBandCenters &bandCenters, float nyquist=22050.0f)
 
template<CVec3 Vec3>
bool GetBaryCentricCoordinates (const Vec3 &inA, const Vec3 &inB, float &outU, float &outV)
 
template<CVec3 Vec3>
Vec3 GetClosestPointOnLine (const Vec3 &inA, const Vec3 &inB, uint32_t &outSet)
 
template<CFloatOrSIMD T>
JPL_INLINEdBToGain (const T &dB) noexcept
 
template<CFloatOrSIMD T>
JPL_INLINEdBToIntencity (const T &dB) noexcept
 
template<CFloatOrSIMD T>
JPL_INLINEGainTodB (const T &gainFactor) noexcept
 
template<CFloatOrSIMD T>
JPL_INLINE constexprIntencityTodB (const T &intencityFactor) noexcept
 
template<CVec3 Vec3>
JPL_INLINE constexpr uint32 ToOctahedron32 (const Vec3 &direction)
 
template<CVec3 Vec3>
JPL_INLINE constexpr Vec3 FromOctahedron32 (uint32 encodedDirection)
 
constexpr float ToDiamond (Vec2 dir) noexcept
 "Diamond Encoding" of a 2D unit vector as per:
 
constexpr Vec2 FromDiamond (float p) noexcept
 Decode scalar [0, 1] to a 2D unit vector.
 
JPL_INLINE simd ToDiamond (simd x, const simd &y) noexcept
 
template<CVec3 Vec3>
std::ostream & operator<< (std::ostream &os, const Quat< Vec3 > &quat)
 
JPL_INLINE constexpr bool operator== (const Vec2 &A, const Vec2 &B) noexcept
 
template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE constexpr Vec2 operator* (T Scale, const JPL::Vec2 &V) noexcept
 
template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE constexpr Vec2 operator/ (T Scale, const JPL::Vec2 &V) noexcept
 
JPL_INLINE constexpr Vec2 operator* (const JPL::Vec2 &A, const JPL::Vec2 &B) noexcept
 
JPL_INLINE constexpr Vec2 operator/ (const JPL::Vec2 &A, const JPL::Vec2 &B) noexcept
 
std::ostream & operator<< (std::ostream &os, const Vec2 &v)
 
JPL_INLINE constexpr bool operator== (const MinimalVec3 &A, const MinimalVec3 &B) noexcept
 
template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE constexpr MinimalVec3 operator* (T Scale, const JPL::MinimalVec3 &V) noexcept
 
template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE constexpr MinimalVec3 operator/ (T Scale, const JPL::MinimalVec3 &V) noexcept
 
JPL_INLINE constexpr MinimalVec3 operator* (const JPL::MinimalVec3 &A, const JPL::MinimalVec3 &B) noexcept
 
JPL_INLINE constexpr MinimalVec3 operator/ (const JPL::MinimalVec3 &A, const JPL::MinimalVec3 &B) noexcept
 
std::ostream & operator<< (std::ostream &os, const MinimalVec3 &v)
 
template<CVec3 Vec3Type>
JPL_INLINE bool operator== (const OrientationData< Vec3Type > &lhs, const OrientationData< Vec3Type > &rhs) noexcept
 
template<CVec3 Vec3Type>
JPL_INLINE bool operator== (const Position< Vec3Type > &lhs, const Position< Vec3Type > &rhs) noexcept
 
JPL_INLINE simd operator| (const simd &a, const simd &b) noexcept
 Component-wise logical OR.
 
JPL_INLINE simd operator^ (const simd &a, const simd &b) noexcept
 Component-wise logical XOR.
 
JPL_INLINE simd operator& (const simd &a, const simd &b) noexcept
 Component-wise logical AND.
 
JPL_INLINE simd_mask operator== (const simd &a, const simd &b) noexcept
 Component-wise comparison.
 
JPL_INLINE simd_mask operator!= (const simd &a, const simd &b) noexcept
 
JPL_INLINE simd_mask operator< (const simd &a, const simd &b) noexcept
 
JPL_INLINE simd_mask operator<= (const simd &a, const simd &b) noexcept
 
JPL_INLINE simd_mask operator> (const simd &a, const simd &b) noexcept
 
JPL_INLINE simd_mask operator>= (const simd &a, const simd &b) noexcept
 
JPL_INLINE simd_mask operator== (const simd_mask &a, const simd_mask &b) noexcept
 Component-wise comparison.
 
JPL_INLINE simd_mask operator!= (const simd_mask &a, const simd_mask &b) noexcept
 
JPL_INLINE simd_mask operator| (const simd_mask &a, const simd_mask &b) noexcept
 Component-wise logical OR.
 
JPL_INLINE simd_mask operator^ (const simd_mask &a, const simd_mask &b) noexcept
 Component-wise logical XOR.
 
JPL_INLINE simd_mask operator& (const simd_mask &a, const simd_mask &b) noexcept
 Component-wise logical AND.
 
JPL_INLINE simd max (const simd &a, const simd &b) noexcept
 Element-wise max.
 
JPL_INLINE simd min (const simd &a, const simd &b) noexcept
 Element-wise min.
 
JPL_INLINE simd abs (const simd &vec) noexcept
 
JPL_INLINE simd clamp (const simd &value, const simd &minV, const simd &maxV) noexcept
 Element-wise clamp.
 
JPL_INLINE simd fma (const simd &mul1, const simd &mul2, const simd &addV) noexcept
 Element-wise fused multiply-add.
 
JPL_INLINE simd floor (const simd &vec) noexcept
 Element-wise floor.
 
JPL_INLINE simd ceil (const simd &vec) noexcept
 Element-wise ceil.
 
JPL_INLINE simd round (const simd &vec) noexcept
 Element-wise round to nearest integer value.
 
JPL_INLINE simd interleave_lohi (const simd &vec) noexcept
 Interleave two low lanes with the two high lanes (e.g. { 0, 1, 2, 3 } -> { 0, 2, 1, 3 })
 
JPL_INLINE simd combine_lo (const simd &a, const simd &b) noexcept
 Combine two low lanes of input a and b as { a0, a1, b0, b1 }.
 
JPL_INLINE simd combine_hi (const simd &a, const simd &b) noexcept
 Combine two high lanes of input a and b as { a2, a3, b2, b3 }.
 
JPL_INLINE simd combine_lohi (const simd &a, const simd &b) noexcept
 Combine two low lanes of a and two high lanes from b as { a0, a1, b2, b3 }.
 
JPL_INLINE simd reverse (const simd &vec) noexcept
 Reverse the order of the lanes.
 
JPL_INLINE simd_mask max (const simd_mask &a, const simd_mask &b) noexcept
 Element-wise max.
 
JPL_INLINE simd_mask min (const simd_mask &a, const simd_mask &b) noexcept
 Element-wise min.
 
JPL_INLINE simd_mask clamp (const simd_mask &value, const simd_mask &minV, const simd_mask &maxV) noexcept
 Element-wise clamp.
 
JPL_INLINE simd_mask maxs (const simd_mask &a, const simd_mask &b) noexcept
 Element-wise max, signed.
 
JPL_INLINE simd_mask mins (const simd_mask &a, const simd_mask &b) noexcept
 Element-wise min, signed.
 
JPL_INLINE simd_mask clamps (const simd_mask &value, const simd_mask &minV, const simd_mask &maxV) noexcept
 Element-wise clamp, signed.
 
JPL_INLINE simd operator* (float value, const simd &vec) noexcept
 
JPL_INLINE constexpr auto FloorToSIMDSize (std::unsigned_integral auto count) noexcept
 Floor count to 4-wide simd vector.
 
JPL_INLINE constexpr auto FloorToSIMDSizeDouble (std::unsigned_integral auto count) noexcept
 Floor count to 8-wide simd vector.
 
JPL_INLINE constexpr auto GetSIMDTail (std::unsigned_integral auto count) noexcept
 Get the remaining tail from count that won't fill a simd vector.
 
JPL_INLINE constexpr auto GetNumSIMDOps (std::unsigned_integral auto count) noexcept
 Get number of SIMD operations that can fit into the count
 
JPL_INLINE constexpr auto GetNumSIMDOpsDouble (std::unsigned_integral auto count) noexcept
 Get number of 8-wide simd operations that can fit into the count
 
JPL_INLINE constexpr auto GetSIMDTailDouble (std::unsigned_integral auto count) noexcept
 Get the remaining tail from count that won't fill 8-wide simd vector.
 
JPL_INLINE constexpr auto RoundUpToSIMD (std::unsigned_integral auto count) noexcept
 Round count up to the next simd width.
 
JPL_INLINE constexpr auto FloorToDiv2 (std::unsigned_integral auto count) noexcept
 Floor count to divisible by 2.
 
JPL_INLINE constexpr auto GetDiv2Tail (std::unsigned_integral auto count) noexcept
 
JPL_INLINE simd_mask signbit (const simd &vec) noexcept
 Equivalent to std::signbit but for 4-wide 32-bit float vector.
 
JPL_INLINE simd_mask isinf (const simd &vec) noexcept
 Determines if the given floating-point number num is a positive or negative infinity.
 
JPL_INLINE simd_mask isnan (const simd &vec) noexcept
 Determines if the given floating point number vec is a not-a-number(NaN) value.
 
JPL_INLINE simd trunc (const simd &vec) noexcept
 Computes the nearest integer not greater in magnitude than vec.
 
simd log (simd x) noexcept
 
JPL_INLINE simd log10 (const simd &vec) noexcept
 log10 for 4-wide 32-bit float vector
 
JPL_INLINE simd log2 (const simd &vec) noexcept
 log2 for 4-wide 32-bit float vector
 
simd exp (simd x) noexcept
 Exponent for 4-wide 32-bit float vector.
 
JPL_INLINE simd exp2 (simd x) noexcept
 
JPL_INLINE simd ldexp (simd arg, simd_mask exp) noexcept
 Multiplies a floating-point value arg by the number 2 raised to the exp power.
 
simd pow (const simd &x, const simd &y) noexcept
 
simd sin (simd x) noexcept
 
simd cos (simd x) noexcept
 
simd tan (simd x) noexcept
 
simd asin (const simd &in)
 
simd acos (const simd &in)
 
simd atan2 (const simd &y, const simd &x)
 
JPL_INLINE simd_mask operator== (const Vec3Pack &A, const Vec3Pack &B) noexcept
 
template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE Vec3Pack operator* (T Scale, const JPL::Vec3Pack &V) noexcept
 
template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE Vec3Pack operator/ (T Scale, const JPL::Vec3Pack &V) noexcept
 
JPL_INLINE Vec3Pack operator* (simd Scale, const JPL::Vec3Pack &V) noexcept
 
JPL_INLINE Vec3Pack operator/ (simd Scale, const JPL::Vec3Pack &V) noexcept
 
JPL_INLINE Vec3Pack operator* (const JPL::Vec3Pack &A, const JPL::Vec3Pack &B) noexcept
 
JPL_INLINE Vec3Pack operator/ (const JPL::Vec3Pack &A, const JPL::Vec3Pack &B) noexcept
 
std::ostream & operator<< (std::ostream &os, const Vec3Pack &v)
 
template<class Vec3Type >
JPL_INLINE auto GetX (const Vec3Type &v) noexcept
 
template<class Vec3Type >
JPL_INLINE auto GetY (const Vec3Type &v) noexcept
 
template<class Vec3Type >
JPL_INLINE auto GetZ (const Vec3Type &v) noexcept
 
template<class Vec3Type >
JPL_INLINE void SetX (Vec3Type &v, Vec3FloatType< Vec3Type > value) noexcept
 
template<class Vec3Type >
JPL_INLINE void SetY (Vec3Type &v, Vec3FloatType< Vec3Type > value) noexcept
 
template<class Vec3Type >
JPL_INLINE void SetZ (Vec3Type &v, Vec3FloatType< Vec3Type > value) noexcept
 
template<std::integral T>
constexprByteswap (T value) noexcept
 
template<class T >
requires (std::unsigned_integral<T>)
constexpr int MSBIndex (T n) noexcept
 
template<std::integral T>
constexprRoundUpBy4 (T n) noexcept
 
template<std::integral T>
constexpr std::size_t BitWidthOf () noexcept
 
std::pmr::memory_resource * GetDefaultMemoryResource () noexcept
 
template<class T , class Allocator , class... Args>
auto allocate_unique (const Allocator &allocator, Args &&... args)
 
template<class T = std::byte>
JPL_INLINE PmrAllocator< T > GetDefaultPmrAllocator ()
 
template<class T , class ... Args>
JPL_INLINE T * DefaultNew (Args &&...args)
 Allocate new object from deafult global memory resource used in JPLSpatial.
 
template<class T >
JPL_INLINE void DefaultDelete (T *object)
 Delete object allcoated from deafult global memory resource. The object must had been allocated by calling DefaultNew
 
template<class T , class... Args>
JPL_INLINE std::shared_ptr< T > make_pmr_shared (Args &&... args)
 std::make_shared wrapper using our global memory resource
 
template<class T >
JPL_INLINE std::shared_ptr< T > make_pmr_shared (T *ptr)
 
template<class T , class Y >
JPL_INLINE void reset_pmr_shared (std::shared_ptr< T > &sharedPtr, Y *ptr)
 
template<class T >
JPL_INLINE void reset_pmr_shared (std::shared_ptr< T > &sharedPtr)
 
template<class T , class... Args>
JPL_INLINE pmr_unique_ptr< T > make_pmr_unique (Args &&... args)
 std::make_unique wrapper using our global memory resource
 
JPL_INLINE float GetSpreadFromSourceSize (float sourceSize, float distance)
 
JPL_INLINE std::optional< const char * > IsValidSourceChannelMap (ChannelMap channelMap)
 
template<CVec3 Vec3Type>
Vec3Type ComputeVBAP (const Vec3Type &sourceDirection, const Vec3Type &triPointA, const Vec3Type &triPointB, const Vec3Type &triPointC)
 
Vec2 ComputeVBAP (const Vec2 &sourceDirection, const Vec2 &speakerADirection, const Vec2 &speakerBDirection)
 
JPL_INLINE constexpr bool operator== (const SourceLayoutKey &lhs, const SourceLayoutKey &rhs)
 
JPL_INLINE constexpr void HashCombine32 (uint32_t &seed, uint32_t id32)
 
JPL_INLINE constexpr void HashCombine32 (uint32_t &seed, uint64_t id64)
 
JPL_INLINE constexpr uint32_t Murmur3Finalize (uint32_t hash)
 
template<std::integral T>
requires (sizeof(T) == 8)
constexpr uint32_t HashIntSequence (std::span< const T > ids)
 
template<std::integral T>
requires (sizeof(T) == 4)
constexpr uint32_t HashIntSequence32 (std::span< const T > ids)
 

Variables

constexpr float JPL_DB_TO_RECIP_M = 0.1151292546497022842f
 
constexpr float JPL_RECIP_M_TO_DB = 8.68588963807f
 
const AirAbsorptionCache cDefaultAirAbsCache = AirAbsorption::CacheParameters(JPL::cBandCenters, AirAbsorptionParams{})
 Default air absorption used in JPL Spatial.
 
constexpr std::array< std::array< float, 6 >, 22 > cChannelPlaneRatios
 Implementation adapted from David Reid's https://github.com/mackron/miniaudio.
 
JPL_EXPORT TraceFunction SpatialTrace
 
JPL_EXPORT AssertFailedFunction AssertFailed
 
constexpr SplitFrequencies cDefaultFrequencySplits { .F1 = 176.0f, .F2 = 775.0f, .F3 = 3408.0f }
 At the moment JPL Spatial uses these frequency sptits for sound propagation.
 
const FreqBandCenters cBandCenters = round(ComputeBandCenters(cDefaultFrequencySplits))
 
std::pmr::memory_resource * gDefaultMemoryResource = std::pmr::get_default_resource()
 

Typedef Documentation

◆ AbsorptionCoeffs

◆ AssertFailedFunction

Function called when an assertion fails. This function should return true if a breakpoint needs to be triggered.

◆ AttenuationCurveRef

◆ DirectEffectHandle

◆ EnergyBands

◆ FlatMapWithAllocator

template<class KeyType , class T , template< class > class AllocatorType>
using JPL::FlatMapWithAllocator = typedef FlatMap< KeyType, T, std::equal_to<KeyType>, std::vector<KeyType, AllocatorType<KeyType> >, std::vector<T, AllocatorType<T> > >

◆ FreqBandCenters

◆ FrequencyBands

◆ int16

using JPL::int16 = typedef std::int16_t

◆ int32

using JPL::int32 = typedef std::int32_t

◆ int64

using JPL::int64 = typedef std::int64_t

◆ int8

using JPL::int8 = typedef std::int8_t

◆ Octahedron16Bit

◆ Octahedron32Bit

◆ Octahedron64Bit

◆ Octahedron8Bit

Encoder aliases for available encoding precisions.

◆ OnlineVariance

◆ OnlineVarianceSIMD

◆ PanEffectHandle

◆ pmr_unique_ptr

template<class T >
using JPL::pmr_unique_ptr = typedef std::unique_ptr<T, PmrDeleter<T> >

Alias for unique ptr using pmr allocator and deleter.

◆ PmrAllocator

template<class T >
using JPL::PmrAllocator = typedef std::pmr::polymorphic_allocator<T>

Just a shorter alias.

◆ Rand

◆ RingIndexBackward

◆ RingIndexBackwardFast

◆ RingIndexForward

Ring index writing forward/backward, using modulo operator for wrap around. Less efficient than the Fast versions, but doestn't require ring size power of 2. Index size: 8-12 bytes (MaxWindow <= 1 ? 8 : 12)

◆ RingIndexForwardFast

Ring index writing forward/backward, using bit manipulations for wrap around. Much more efficient than non-Fast versions at a cost of one extra int stored and requirement of having a ring size power of 2. Index size: 12-16 bytes (MaxWindow <= 1 ? 12 : 16)

◆ ScratchHashSetIdentity

◆ StandartPanData

◆ StandartPanDataWithOrientation

◆ StandartPanner

◆ StandartSourceLayout

◆ TraceFunction

Trace function, needs to be overridden by application. This should output a line of text to the log / TTY.

◆ uint

◆ uint16

using JPL::uint16 = typedef std::uint16_t

◆ uint32

using JPL::uint32 = typedef std::uint32_t

◆ uint64

using JPL::uint64 = typedef std::uint64_t

◆ uint8

using JPL::uint8 = typedef std::uint8_t

◆ VBAPanner2D

template<class Traits = VBAPStandartTraits>
using JPL::VBAPanner2D = typedef VBAPannerBase<VBAP::Panning2D<Traits>, Traits>

Alias for VBAP panner for panning to a plane speaker layout (i.e. no top/bottom channels, only floor plane)

◆ VBAPanner3D

template<class Traits = VBAPStandartTraits, auto cLUTType = VBAP::ELUTSize::KB_983>
using JPL::VBAPanner3D = typedef VBAPannerBase<VBAP::Panning3D<Traits, cLUTType>, Traits>

Alias for VBAP panner for panning to a 3D speaker layout (i.e. layout including top/bottom speakers)

◆ VBAPStandartTraits

◆ Vec3FloatBuffer

template<std::size_t N>
using JPL::Vec3FloatBuffer = typedef Vec3Buffer<float, N>

Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as simd.

◆ Vec3FloatBufferView

View into a Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as simd.

◆ Vec3FloatType

template<class Vec3Type >
using JPL::Vec3FloatType = typedef std::remove_cvref_t<decltype(Vec3Access<Vec3Type>::GetX(std::declval<Vec3Type>()))>

◆ Vec3SIMDBuffer

template<std::size_t N>
using JPL::Vec3SIMDBuffer = typedef Vec3Buffer<simd, N>

Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as floats.

◆ Vec3SIMDBufferView

View into a Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as floats.

Enumeration Type Documentation

◆ AttenuationModel

Enumerator
None 
Inverse 
Linear 
Exponential 
_Count 

◆ EChannel

Default speaker/channel masks This should be in the order the channels are laid out in the user's audio processing block. The main difference between wave channel formats and this, is in that the side channels in wave come after back channels

Enumerator
FrontLeft 
FrontRight 
FrontCenter 
LFE 
SideLeft 
SideRight 
FrontLeftCenter 
FrontRightCenter 
BackLeft 
BackRight 
BackCenter 
WideLeft 
WideRight 
TopCenter 
TopFrontLeft 
TopFrontCenter 
TopFrontRight 
TopSideLeft 
TopSideRight 
TopBackLeft 
TopBackCenter 
TopBackRight 
NUM_GroundChannels 
TOP_Channels 
NUM_TopChannels 
Invalid 

◆ ESpatializationType

Determines spatialized source channel oritentation.

Enumerator
None 
Position 
PositionAndOrientation 

◆ ETraceDirection

Enumerator
Forward 
Backward 

◆ RealtimeObjectOptions

Enumerator
nonRealtimeMutatable 
realtimeMutatable 

◆ ThreadType

Enumerator
realtime 
nonRealtime 

Function Documentation

◆ abs()

JPL_INLINE simd JPL::abs ( const simd vec)
noexcept

◆ acos()

simd JPL::acos ( const simd in)
inline

Calculate the arc cosine for each element of this vector (returns value in the range [0, PI]) Note that all input values will be clamped to the range [-1, 1] and this function will not return NaNs like std::acos

◆ Add() [1/2]

void JPL::Add ( float dest,
const float source,
uint32  destChannel,
uint32  destNumChannels,
uint32  numFrames 
)
inline

◆ Add() [2/2]

void JPL::Add ( float dest,
const float source,
uint32  destChannel,
uint32  sourceChannel,
uint32  destNumChannels,
uint32  sourceNumChannels,
uint32  numFrames 
)
inline

Various float vector mixing utilities, with interface to accommodate mixing interleaved channel buffers.

◆ AddAndApplyGainRamp() [1/2]

void JPL::AddAndApplyGainRamp ( float dest,
const float source,
uint32  destChannel,
uint32  sourceChannel,
uint32  destNumChannels,
uint32  sourceNumChannels,
uint32  numFrames,
float  gainStart,
float  gainEnd 
)
inline

◆ AddAndApplyGainRamp() [2/2]

void JPL::AddAndApplyGainRamp ( float dest,
const float source,
uint32  numChannels,
uint32  numFrames,
float  gainStart,
float  gainEnd 
)
inline

◆ allocate_unique()

template<class T , class Allocator , class... Args>
auto JPL::allocate_unique ( const Allocator &  allocator,
Args &&...  args 
)

Utility helper to wrap usage of custom allocator with std::unique_ptr to allocate object and pass AllocatorDeleter<T> as deleter to deallocate using the same allocator.

◆ ApplyGain()

void JPL::ApplyGain ( float dest,
uint32  numFrames,
float  gain 
)
inline

◆ ApplyGainRamp()

void JPL::ApplyGainRamp ( float dest,
uint32  numFrames,
float  gainStart,
float  gainEnd 
)
inline

◆ asin()

simd JPL::asin ( const simd in)
inline

Calculate the arc sine for each element of this vector (returns value in the range [-PI / 2, PI / 2]) Note that all input values will be clamped to the range [-1, 1] and this function will not return NaNs like std::asin

◆ AssertFailedParamHelper() [1/2]

bool JPL::AssertFailedParamHelper ( const char inExpression,
const std::source_location  location 
)
inline

◆ AssertFailedParamHelper() [2/2]

bool JPL::AssertFailedParamHelper ( const char inExpression,
const std::source_location  location,
const char inMessage 
)
inline

◆ atan2()

simd JPL::atan2 ( const simd y,
const simd x 
)
inline

◆ BitWidthOf()

template<std::integral T>
constexpr std::size_t JPL::BitWidthOf ( )
constexprnoexcept

◆ Byteswap()

template<std::integral T>
constexpr T JPL::Byteswap ( value)
constexprnoexcept

◆ CalculateChannelPositionRectangularWeight()

JPL_INLINE constexpr float JPL::CalculateChannelPositionRectangularWeight ( uint32  channelPositionA,
uint32  channelPositionB 
)
constexpr

◆ ceil()

JPL_INLINE simd JPL::ceil ( const simd vec)
noexcept

Element-wise ceil.

◆ clamp() [1/2]

JPL_INLINE simd JPL::clamp ( const simd value,
const simd minV,
const simd maxV 
)
noexcept

Element-wise clamp.

◆ clamp() [2/2]

JPL_INLINE simd_mask JPL::clamp ( const simd_mask value,
const simd_mask minV,
const simd_mask maxV 
)
noexcept

Element-wise clamp.

◆ clamps()

JPL_INLINE simd_mask JPL::clamps ( const simd_mask value,
const simd_mask minV,
const simd_mask maxV 
)
noexcept

Element-wise clamp, signed.

◆ combine_hi()

JPL_INLINE simd JPL::combine_hi ( const simd a,
const simd b 
)
noexcept

Combine two high lanes of input a and b as { a2, a3, b2, b3 }.

◆ combine_lo()

JPL_INLINE simd JPL::combine_lo ( const simd a,
const simd b 
)
noexcept

Combine two low lanes of input a and b as { a0, a1, b0, b1 }.

◆ combine_lohi()

JPL_INLINE simd JPL::combine_lohi ( const simd a,
const simd b 
)
noexcept

Combine two low lanes of a and two high lanes from b as { a0, a1, b2, b3 }.

◆ ComputeBandCenters()

JPL_INLINE FreqBandCenters JPL::ComputeBandCenters ( const SplitFrequencies splitFrequenciesHz,
float  nyquist = 22050.0f 
)

◆ ComputeBandLowerThirdCenters() [1/2]

JPL_INLINE FreqBandCenters JPL::ComputeBandLowerThirdCenters ( const FreqBandCenters bandCenters,
float  nyquist = 22050.0f 
)

◆ ComputeBandLowerThirdCenters() [2/2]

JPL_INLINE FreqBandCenters JPL::ComputeBandLowerThirdCenters ( const SplitFrequencies splitFrequenciesHz,
float  nyquist = 22050.0f 
)

◆ ComputeVBAP() [1/2]

Vec2 JPL::ComputeVBAP ( const Vec2 sourceDirection,
const Vec2 speakerADirection,
const Vec2 speakerBDirection 
)
inline

Compute 2-dimentional VBAP for a source direction within speaker arch defined by two speaker directions. Note: all directions must be normalized.

Parameters
sourceDirection: direction from listener towards the source
speakerADirection: directoin of the first speaker
speakerBDirection: direction of the second speaker
Returns
gain factors for the two speakers, or {0,0} if the speakers are collinear

◆ ComputeVBAP() [2/2]

template<CVec3 Vec3Type>
Vec3Type JPL::ComputeVBAP ( const Vec3Type &  sourceDirection,
const Vec3Type &  triPointA,
const Vec3Type &  triPointB,
const Vec3Type &  triPointC 
)
inline

Compute 3-dimentional VBAP for a point within triangle of speaker directions.

Parameters
sourceDirection: normalized direction from listener towards the source
Returns
: gain factors for the three speakers, not normalized

◆ cos()

simd JPL::cos ( simd  x)
inlinenoexcept

Cos implementation for 4-wide 32-bit flaot vector Note: this function islmost identical to SinCos, where you get Sin almost for free.

◆ dBToGain()

template<CFloatOrSIMD T>
JPL_INLINE T JPL::dBToGain ( const T &  dB)
noexcept

◆ dBToIntencity()

template<CFloatOrSIMD T>
JPL_INLINE T JPL::dBToIntencity ( const T &  dB)
noexcept

◆ DefaultDelete()

template<class T >
JPL_INLINE void JPL::DefaultDelete ( T *  object)

Delete object allcoated from deafult global memory resource. The object must had been allocated by calling DefaultNew

◆ DefaultNew()

template<class T , class ... Args>
JPL_INLINE T * JPL::DefaultNew ( Args &&...  args)

Allocate new object from deafult global memory resource used in JPLSpatial.

◆ DownmixToMono()

void JPL::DownmixToMono ( float dest,
const float source,
uint32  numChannels,
uint32  numSamples 
)
inline

◆ EstimateRT60_Eyring() [1/2]

JPL_INLINE simd JPL::EstimateRT60_Eyring ( float  w,
float  l,
float  h,
const simd avgAbsorption 
)

Estimate RT60 using Eyring-Norris equation, which is more accurate than Sabine for absorptive rooms, but works on the assumption that the room's sound field is perfectly diffused.

◆ EstimateRT60_Eyring() [2/2]

JPL_INLINE simd JPL::EstimateRT60_Eyring ( float  w,
float  l,
float  h,
const simd avgAbsorption,
const simd airAttenuation_dB 
)

Estimate RT60 using Eyring-Norris equation, taking into account air absorption.

◆ EstimateRT60_Sabine() [1/2]

JPL_INLINE simd JPL::EstimateRT60_Sabine ( float  w,
float  l,
float  h,
const simd avgAbsorption 
)

Estimate RT60 using Sabine's equation, which tends to be more accurate for diffuse spaces, evenly distributed absorption and for rooms with low average absorption (< 0.4).

◆ EstimateRT60_Sabine() [2/2]

JPL_INLINE simd JPL::EstimateRT60_Sabine ( float  w,
float  l,
float  h,
const simd avgAbsorption,
const simd airAttenuation_dB 
)

Estimate RT60 using Sabine's equation, taking into account air absorption.

◆ exp()

simd JPL::exp ( simd  x)
inlinenoexcept

Exponent for 4-wide 32-bit float vector.

◆ exp2()

JPL_INLINE simd JPL::exp2 ( simd  x)
noexcept

◆ floor()

JPL_INLINE simd JPL::floor ( const simd vec)
noexcept

Element-wise floor.

◆ FloorToDiv2()

JPL_INLINE constexpr auto JPL::FloorToDiv2 ( std::unsigned_integral auto  count)
constexprnoexcept

Floor count to divisible by 2.

◆ FloorToSIMDSize()

JPL_INLINE constexpr auto JPL::FloorToSIMDSize ( std::unsigned_integral auto  count)
constexprnoexcept

Floor count to 4-wide simd vector.

◆ FloorToSIMDSizeDouble()

JPL_INLINE constexpr auto JPL::FloorToSIMDSizeDouble ( std::unsigned_integral auto  count)
constexprnoexcept

Floor count to 8-wide simd vector.

◆ fma()

JPL_INLINE simd JPL::fma ( const simd mul1,
const simd mul2,
const simd addV 
)
noexcept

Element-wise fused multiply-add.

◆ FromDiamond()

constexpr Vec2 JPL::FromDiamond ( float  p)
inlineconstexprnoexcept

Decode scalar [0, 1] to a 2D unit vector.

◆ FromOctahedron32()

template<CVec3 Vec3>
JPL_INLINE constexpr Vec3 JPL::FromOctahedron32 ( uint32  encodedDirection)
constexpr

Decode octahedron encoded direction back to a vector. This reverses the operation performed by ToOctahedron32.

Parameters
encodedDirection: the octahedron integer to be decoded back to a direction vector.
Returns
: direction vector represented by the input octahedron.

◆ GainTodB()

template<CFloatOrSIMD T>
JPL_INLINE T JPL::GainTodB ( const T &  gainFactor)
noexcept

◆ GetBaryCentricCoordinates()

template<CVec3 Vec3>
bool JPL::GetBaryCentricCoordinates ( const Vec3 &  inA,
const Vec3 &  inB,
float outU,
float outV 
)
inline

Compute barycentric coordinates of closest point to origin for infinite line defined by (inA, inB) Point can then be computed as inA * outU + inB * outV Returns false if the points inA, inB do not form a line (are at the same point)

◆ GetClosestPointOnLine()

template<CVec3 Vec3>
Vec3 JPL::GetClosestPointOnLine ( const Vec3 &  inA,
const Vec3 &  inB,
uint32_t outSet 
)
inline

Get the closest point to the origin of line (inA, inB) outSet describes which features are closest: 1 = a, 2 = b, 3 = line segment ab

◆ GetDefaultMemoryResource()

std::pmr::memory_resource * JPL::GetDefaultMemoryResource ( )
inlinenoexcept

◆ GetDefaultPmrAllocator()

template<class T = std::byte>
JPL_INLINE PmrAllocator< T > JPL::GetDefaultPmrAllocator ( )

◆ GetDiv2Tail()

JPL_INLINE constexpr auto JPL::GetDiv2Tail ( std::unsigned_integral auto  count)
constexprnoexcept
Returns
1 if count is uneven, 0 otherwise

◆ GetNumSIMDOps()

JPL_INLINE constexpr auto JPL::GetNumSIMDOps ( std::unsigned_integral auto  count)
constexprnoexcept

Get number of SIMD operations that can fit into the count

◆ GetNumSIMDOpsDouble()

JPL_INLINE constexpr auto JPL::GetNumSIMDOpsDouble ( std::unsigned_integral auto  count)
constexprnoexcept

Get number of 8-wide simd operations that can fit into the count

◆ GetSIMDTail()

JPL_INLINE constexpr auto JPL::GetSIMDTail ( std::unsigned_integral auto  count)
constexprnoexcept

Get the remaining tail from count that won't fill a simd vector.

◆ GetSIMDTailDouble()

JPL_INLINE constexpr auto JPL::GetSIMDTailDouble ( std::unsigned_integral auto  count)
constexprnoexcept

Get the remaining tail from count that won't fill 8-wide simd vector.

◆ GetSpreadFromSourceSize()

JPL_INLINE float JPL::GetSpreadFromSourceSize ( float  sourceSize,
float  distance 
)

◆ GetX()

template<class Vec3Type >
JPL_INLINE auto JPL::GetX ( const Vec3Type &  v)
noexcept

◆ GetY()

template<class Vec3Type >
JPL_INLINE auto JPL::GetY ( const Vec3Type &  v)
noexcept

◆ GetZ()

template<class Vec3Type >
JPL_INLINE auto JPL::GetZ ( const Vec3Type &  v)
noexcept

◆ HashCombine32() [1/2]

JPL_INLINE constexpr void JPL::HashCombine32 ( uint32_t seed,
uint32_t  id32 
)
constexpr

◆ HashCombine32() [2/2]

JPL_INLINE constexpr void JPL::HashCombine32 ( uint32_t seed,
uint64_t  id64 
)
constexpr

◆ HashIntSequence()

template<std::integral T>
requires (sizeof(T) == 8)
constexpr uint32_t JPL::HashIntSequence ( std::span< const T >  ids)
inlineconstexpr

◆ HashIntSequence32()

template<std::integral T>
requires (sizeof(T) == 4)
constexpr uint32_t JPL::HashIntSequence32 ( std::span< const T >  ids)
inlineconstexpr

◆ IntencityTodB()

template<CFloatOrSIMD T>
JPL_INLINE constexpr T JPL::IntencityTodB ( const T &  intencityFactor)
constexprnoexcept

◆ interleave_lohi()

JPL_INLINE simd JPL::interleave_lohi ( const simd vec)
noexcept

Interleave two low lanes with the two high lanes (e.g. { 0, 1, 2, 3 } -> { 0, 2, 1, 3 })

◆ isinf()

JPL_INLINE simd_mask JPL::isinf ( const simd vec)
noexcept

Determines if the given floating-point number num is a positive or negative infinity.

◆ isnan()

JPL_INLINE simd_mask JPL::isnan ( const simd vec)
noexcept

Determines if the given floating point number vec is a not-a-number(NaN) value.

◆ IsValidSourceChannelMap()

JPL_INLINE std::optional< const char * > JPL::IsValidSourceChannelMap ( ChannelMap  channelMap)
Returns
error message if channelMap is not a valid channel map for a VBAP panning source; nullopt otherwise

◆ ldexp()

JPL_INLINE simd JPL::ldexp ( simd  arg,
simd_mask  exp 
)
noexcept

Multiplies a floating-point value arg by the number 2 raised to the exp power.

◆ log()

simd JPL::log ( simd  x)
inlinenoexcept

Natural logarithm computed for 4-wide 32-bit float vector return NaN for x <= 0

◆ log10()

JPL_INLINE simd JPL::log10 ( const simd vec)
noexcept

log10 for 4-wide 32-bit float vector

◆ log2()

JPL_INLINE simd JPL::log2 ( const simd vec)
noexcept

log2 for 4-wide 32-bit float vector

◆ make_pmr_shared() [1/2]

template<class T , class... Args>
JPL_INLINE std::shared_ptr< T > JPL::make_pmr_shared ( Args &&...  args)

std::make_shared wrapper using our global memory resource

◆ make_pmr_shared() [2/2]

template<class T >
JPL_INLINE std::shared_ptr< T > JPL::make_pmr_shared ( T *  ptr)

std::make_shared wrapper using out global memory resource. This overload takes pointer to object created by DefaultNew<T>() which is then deleted with PmrDeleter from default memory resource.

◆ make_pmr_unique()

template<class T , class... Args>
JPL_INLINE pmr_unique_ptr< T > JPL::make_pmr_unique ( Args &&...  args)

std::make_unique wrapper using our global memory resource

◆ max() [1/2]

JPL_INLINE simd JPL::max ( const simd a,
const simd b 
)
noexcept

Element-wise max.

◆ max() [2/2]

JPL_INLINE simd_mask JPL::max ( const simd_mask a,
const simd_mask b 
)
noexcept

Element-wise max.

◆ maxs()

JPL_INLINE simd_mask JPL::maxs ( const simd_mask a,
const simd_mask b 
)
noexcept

Element-wise max, signed.

◆ min() [1/2]

JPL_INLINE simd JPL::min ( const simd a,
const simd b 
)
noexcept

Element-wise min.

◆ min() [2/2]

JPL_INLINE simd_mask JPL::min ( const simd_mask a,
const simd_mask b 
)
noexcept

Element-wise min.

◆ mins()

JPL_INLINE simd_mask JPL::mins ( const simd_mask a,
const simd_mask b 
)
noexcept

Element-wise min, signed.

◆ MSBIndex()

template<class T >
requires (std::unsigned_integral<T>)
constexpr int JPL::MSBIndex ( n)
constexprnoexcept

◆ Murmur3Finalize()

JPL_INLINE constexpr uint32_t JPL::Murmur3Finalize ( uint32_t  hash)
constexpr

◆ operator!=() [1/2]

JPL_INLINE simd_mask JPL::operator!= ( const simd a,
const simd b 
)
noexcept

◆ operator!=() [2/2]

◆ operator&() [1/2]

JPL_INLINE simd JPL::operator& ( const simd a,
const simd b 
)
noexcept

Component-wise logical AND.

◆ operator&() [2/2]

Component-wise logical AND.

◆ operator*() [1/8]

◆ operator*() [2/8]

JPL_INLINE constexpr Vec2 JPL::operator* ( const JPL::Vec2 A,
const JPL::Vec2 B 
)
constexprnoexcept

◆ operator*() [3/8]

◆ operator*() [4/8]

JPL_INLINE simd JPL::operator* ( float  value,
const simd vec 
)
noexcept

◆ operator*() [5/8]

JPL_INLINE Vec3Pack JPL::operator* ( simd  Scale,
const JPL::Vec3Pack V 
)
noexcept

◆ operator*() [6/8]

template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE constexpr MinimalVec3 JPL::operator* ( Scale,
const JPL::MinimalVec3 V 
)
constexprnoexcept

◆ operator*() [7/8]

template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE constexpr Vec2 JPL::operator* ( Scale,
const JPL::Vec2 V 
)
constexprnoexcept

◆ operator*() [8/8]

template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE Vec3Pack JPL::operator* ( Scale,
const JPL::Vec3Pack V 
)
noexcept

◆ operator/() [1/7]

◆ operator/() [2/7]

JPL_INLINE constexpr Vec2 JPL::operator/ ( const JPL::Vec2 A,
const JPL::Vec2 B 
)
constexprnoexcept

◆ operator/() [3/7]

◆ operator/() [4/7]

JPL_INLINE Vec3Pack JPL::operator/ ( simd  Scale,
const JPL::Vec3Pack V 
)
noexcept

◆ operator/() [5/7]

template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE constexpr MinimalVec3 JPL::operator/ ( Scale,
const JPL::MinimalVec3 V 
)
constexprnoexcept

◆ operator/() [6/7]

template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE constexpr Vec2 JPL::operator/ ( Scale,
const JPL::Vec2 V 
)
constexprnoexcept

◆ operator/() [7/7]

template<typename T >
requires (std::is_arithmetic_v<T>)
JPL_INLINE Vec3Pack JPL::operator/ ( Scale,
const JPL::Vec3Pack V 
)
noexcept

◆ operator<()

JPL_INLINE simd_mask JPL::operator< ( const simd a,
const simd b 
)
noexcept

◆ operator<<() [1/5]

std::ostream & JPL::operator<< ( std::ostream &  os,
const AcousticMaterial v 
)
inline

◆ operator<<() [2/5]

std::ostream & JPL::operator<< ( std::ostream &  os,
const MinimalVec3 v 
)
inline

◆ operator<<() [3/5]

template<CVec3 Vec3>
std::ostream & JPL::operator<< ( std::ostream &  os,
const Quat< Vec3 > &  quat 
)

◆ operator<<() [4/5]

std::ostream & JPL::operator<< ( std::ostream &  os,
const Vec2 v 
)
inline

◆ operator<<() [5/5]

std::ostream & JPL::operator<< ( std::ostream &  os,
const Vec3Pack v 
)
inline

◆ operator<=()

JPL_INLINE simd_mask JPL::operator<= ( const simd a,
const simd b 
)
noexcept

◆ operator==() [1/8]

JPL_INLINE constexpr bool JPL::operator== ( const MinimalVec3 A,
const MinimalVec3 B 
)
constexprnoexcept

◆ operator==() [2/8]

template<CVec3 Vec3Type>
JPL_INLINE bool JPL::operator== ( const OrientationData< Vec3Type > &  lhs,
const OrientationData< Vec3Type > &  rhs 
)
noexcept

◆ operator==() [3/8]

template<CVec3 Vec3Type>
JPL_INLINE bool JPL::operator== ( const Position< Vec3Type > &  lhs,
const Position< Vec3Type > &  rhs 
)
noexcept

◆ operator==() [4/8]

JPL_INLINE simd_mask JPL::operator== ( const simd a,
const simd b 
)
noexcept

Component-wise comparison.

◆ operator==() [5/8]

Component-wise comparison.

◆ operator==() [6/8]

◆ operator==() [7/8]

JPL_INLINE constexpr bool JPL::operator== ( const Vec2 A,
const Vec2 B 
)
constexprnoexcept

◆ operator==() [8/8]

◆ operator>()

JPL_INLINE simd_mask JPL::operator> ( const simd a,
const simd b 
)
noexcept

◆ operator>=()

JPL_INLINE simd_mask JPL::operator>= ( const simd a,
const simd b 
)
noexcept

◆ operator^() [1/2]

JPL_INLINE simd JPL::operator^ ( const simd a,
const simd b 
)
noexcept

Component-wise logical XOR.

◆ operator^() [2/2]

Component-wise logical XOR.

◆ operator|() [1/2]

JPL_INLINE simd JPL::operator| ( const simd a,
const simd b 
)
noexcept

Component-wise logical OR.

◆ operator|() [2/2]

Component-wise logical OR.

◆ pow()

simd JPL::pow ( const simd x,
const simd y 
)
inlinenoexcept

◆ ReflectionLoss_dB()

template<CFloatOrSIMD T>
JPL_INLINE T JPL::ReflectionLoss_dB ( const T &  alpha)

◆ reset_pmr_shared() [1/2]

template<class T >
JPL_INLINE void JPL::reset_pmr_shared ( std::shared_ptr< T > &  sharedPtr)

◆ reset_pmr_shared() [2/2]

template<class T , class Y >
JPL_INLINE void JPL::reset_pmr_shared ( std::shared_ptr< T > &  sharedPtr,
Y *  ptr 
)

◆ reverse()

JPL_INLINE simd JPL::reverse ( const simd vec)
noexcept

Reverse the order of the lanes.

◆ round()

JPL_INLINE simd JPL::round ( const simd vec)
noexcept

Element-wise round to nearest integer value.

◆ RoundUpBy4()

template<std::integral T>
constexpr T JPL::RoundUpBy4 ( n)
constexprnoexcept

◆ RoundUpToSIMD()

JPL_INLINE constexpr auto JPL::RoundUpToSIMD ( std::unsigned_integral auto  count)
constexprnoexcept

Round count up to the next simd width.

◆ SetX()

template<class Vec3Type >
JPL_INLINE void JPL::SetX ( Vec3Type &  v,
Vec3FloatType< Vec3Type >  value 
)
noexcept

◆ SetY()

template<class Vec3Type >
JPL_INLINE void JPL::SetY ( Vec3Type &  v,
Vec3FloatType< Vec3Type >  value 
)
noexcept

◆ SetZ()

template<class Vec3Type >
JPL_INLINE void JPL::SetZ ( Vec3Type &  v,
Vec3FloatType< Vec3Type >  value 
)
noexcept

◆ signbit()

JPL_INLINE simd_mask JPL::signbit ( const simd vec)
noexcept

Equivalent to std::signbit but for 4-wide 32-bit float vector.

◆ sin()

simd JPL::sin ( simd  x)
inlinenoexcept

Sin implementation for 4-wide 32-bit flaot vector Note: this function islmost identical to SinCos, where you get Cos almost for free.

◆ SplitFrequenciesFromBandCenters()

JPL_INLINE SplitFrequencies JPL::SplitFrequenciesFromBandCenters ( const FreqBandCenters bandCenters,
float  nyquist = 22050.0f 
)

◆ tan()

simd JPL::tan ( simd  x)
inlinenoexcept

Calculate the tangent for each element of the vector (input in radians). Valid for input values in range +-Pi*100'000

◆ ToChannelPos()

JPL_INLINE constexpr int JPL::ToChannelPos ( EChannel  channel)
constexprnoexcept

◆ ToDiamond() [1/2]

JPL_INLINE simd JPL::ToDiamond ( simd  x,
const simd y 
)
noexcept

Encode a 2D unit vector to scalar float [0, 1]. This overload encodes 4 directions at a time.

◆ ToDiamond() [2/2]

constexpr float JPL::ToDiamond ( Vec2  dir)
inlineconstexprnoexcept

"Diamond Encoding" of a 2D unit vector as per:

Encode a 2D unit vector to scalar float [0, 1]

◆ ToOctahedron32()

template<CVec3 Vec3>
JPL_INLINE constexpr uint32 JPL::ToOctahedron32 ( const Vec3 &  direction)
constexpr

Encode a direction vector into octahedron 32 bit integer at 16 bits precision.

Parameters
direction: direction vector to be encoded, must be normalized and non-zero
Returns
: encoded representation of the input direction vector

◆ trunc()

JPL_INLINE simd JPL::trunc ( const simd vec)
noexcept

Computes the nearest integer not greater in magnitude than vec.

Variable Documentation

◆ AssertFailed

JPL_EXPORT AssertFailedFunction JPL::AssertFailed
extern

◆ cBandCenters

The bands are 0-176 Hz, 176-775 Hz, 775-3408 Hz, and 3408-22050 Hz Centers: 59 Hz, 369 Hz, 1625 Hz, 8669 Hz

◆ cChannelPlaneRatios

constexpr std::array<std::array<float, 6>, 22> JPL::cChannelPlaneRatios
constexpr

Implementation adapted from David Reid's https://github.com/mackron/miniaudio.

Rectangular conversion ratios

◆ cDefaultAirAbsCache

Default air absorption used in JPL Spatial.

◆ cDefaultFrequencySplits

constexpr SplitFrequencies JPL::cDefaultFrequencySplits { .F1 = 176.0f, .F2 = 775.0f, .F3 = 3408.0f }
inlineconstexpr

At the moment JPL Spatial uses these frequency sptits for sound propagation.

◆ gDefaultMemoryResource

std::pmr::memory_resource* JPL::gDefaultMemoryResource = std::pmr::get_default_resource()
inline

Default memory resource used throughout the library (we may or may not want to make this thread_local)

◆ JPL_DB_TO_RECIP_M

constexpr float JPL::JPL_DB_TO_RECIP_M = 0.1151292546497022842f
constexpr

◆ JPL_RECIP_M_TO_DB

constexpr float JPL::JPL_RECIP_M_TO_DB = 8.68588963807f
constexpr

◆ SpatialTrace

JPL_EXPORT TraceFunction JPL::SpatialTrace
extern