|
JPL Spatial
Sound spatialization and propagation library
|
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 |
| concept | CTraceResultsRange |
| concept | CTraceResultsView |
Typedefs | |
| using | FrequencyBands = simd |
| using | Rand = WyRand |
| template<class KeyType , class T , template< class > class AllocatorType> | |
| using | FlatMapWithAllocator |
| 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 | VBAPStandardTraits = VBAPBaseTraits<MinimalVec3> |
| template<class Traits = VBAPStandardTraits> | |
| using | VBAPanner2D = VBAPannerBase<VBAP::Panning2D<Traits>, Traits> |
| using | StandardPanner2D = VBAPanner2D<> |
| Alias for 2D panner that doesn't customize any traits. | |
| template<class Traits = VBAPStandardTraits, auto cLUTType = VBAP::ELUTSize::KB_983> | |
| using | VBAPanner3D = VBAPannerBase<VBAP::Panning3D<Traits, cLUTType>, Traits> |
| using | StandardPanner3D = VBAPanner3D<> |
| Alias for 3D panner that doesn't customize any traits. | |
| using | AttenuationCurveRef = std::shared_ptr<AttenuationFunction> |
| using | DirectEffectHandle = IDType<DirectPathServiceIDTag> |
| using | StandardPanner = StandardPanner2D |
| using | StandardSourceLayout = typename StandardPanner::SourceLayoutType |
| using | StandardPanData = typename StandardPanner::PanUpdateData |
| using | StandardPanDataWithOrientation = typename StandardPanner::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_INLINE T | ReflectionLoss_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 simd | EstimateRT60FromMFP (float mfpMeters, const simd &avgAbsorption) |
| Estimate RT60 from Mean Free Path using Eyring-Norris equation. | |
| JPL_INLINE constexpr float | CalculateChannelPositionRectangularWeight (uint32 channelPositionA, uint32 channelPositionB) |
| JPL_INLINE constexpr int | ToChannelPos (EChannel channel) noexcept |
| constexpr std::string_view | ToString (EChannel channel) |
| constexpr std::string_view | ToStringShort (EChannel channel) |
| 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_INLINE T | dBToGain (const T &dB) noexcept |
| template<CFloatOrSIMD T> | |
| JPL_INLINE T | dBToIntencity (const T &dB) noexcept |
| template<CFloatOrSIMD T> | |
| JPL_INLINE T | GainTodB (const T &gainFactor) noexcept |
| template<CFloatOrSIMD T> | |
| JPL_INLINE constexpr T | IntencityTodB (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) |
| 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> | |
| constexpr T | Byteswap (T value) noexcept |
| template<class T > requires (std::unsigned_integral<T>) | |
| constexpr int | MSBIndex (T n) noexcept |
| template<std::integral T> | |
| constexpr T | RoundUpBy4 (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() |
| using JPL::AbsorptionCoeffs = simd |
| using JPL::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 JPL::AttenuationCurveRef = std::shared_ptr<AttenuationFunction> |
| using JPL::EnergyBands = simd |
| using JPL::FlatMapWithAllocator |
| using JPL::FreqBandCenters = simd |
| using JPL::FrequencyBands = simd |
| using JPL::int16 = std::int16_t |
| using JPL::int32 = std::int32_t |
| using JPL::int64 = std::int64_t |
| using JPL::int8 = std::int8_t |
Encoder aliases for available encoding precisions.
| using JPL::OnlineVariance = typename Variance<float>::Online |
| using JPL::OnlineVarianceSIMD = typename Variance<simd>::Online |
| using JPL::pmr_unique_ptr = std::unique_ptr<T, PmrDeleter<T>> |
Alias for unique ptr using pmr allocator and deleter.
| using JPL::PmrAllocator = std::pmr::polymorphic_allocator<T> |
Just a shorter alias.
| using JPL::RingIndexBackward = AbstractRingIndex<MaxWindow, RingImpl::EWriteDirection::Backward, RingImpl::EOperationMode::Modulo> |
| using JPL::RingIndexBackwardFast = AbstractRingIndex<MaxWindow, RingImpl::EWriteDirection::Backward, RingImpl::EOperationMode::Pow2BitManip> |
| using JPL::RingIndexForward = AbstractRingIndex<MaxWindow, RingImpl::EWriteDirection::Forward, RingImpl::EOperationMode::Modulo> |
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)
| using JPL::RingIndexForwardFast = AbstractRingIndex<MaxWindow, RingImpl::EWriteDirection::Forward, RingImpl::EOperationMode::Pow2BitManip> |
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)
| using JPL::ScratchHashSetIdentity = ScratchHashSet32<uint32, std::identity> |
| using JPL::StandardPanData = typename StandardPanner::PanUpdateData |
| using JPL::StandardPanner = StandardPanner2D |
| using JPL::StandardPanner2D = VBAPanner2D<> |
Alias for 2D panner that doesn't customize any traits.
| using JPL::StandardPanner3D = VBAPanner3D<> |
Alias for 3D panner that doesn't customize any traits.
| using JPL::StandardSourceLayout = typename StandardPanner::SourceLayoutType |
| using JPL::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 JPL::uint = unsigned int |
| using JPL::uint16 = std::uint16_t |
| using JPL::uint32 = std::uint32_t |
| using JPL::uint64 = std::uint64_t |
| using JPL::uint8 = std::uint8_t |
| using JPL::VBAPanner2D = 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)
| using JPL::VBAPanner3D = VBAPannerBase<VBAP::Panning3D<Traits, cLUTType>, Traits> |
Alias for VBAP panner for panning to a 3D speaker layout (i.e. layout including top/bottom speakers)
| using JPL::Vec3FloatBuffer = Vec3Buffer<float, N> |
Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as simd.
| using JPL::Vec3FloatBufferView = Vec3BufferView<float> |
View into a Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as simd.
| using JPL::Vec3FloatType = std::remove_cvref_t<decltype(Vec3Access<Vec3Type>::GetX(std::declval<Vec3Type>()))> |
| using JPL::Vec3SIMDBuffer = Vec3Buffer<simd, N> |
Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as floats.
| using JPL::Vec3SIMDBufferView = Vec3BufferView<simd> |
View into a Vec3-like SoA buffer, holding separate arrays of Vec3 components X, Y, Z as floats.
| enum JPL::AttenuationModel : int |
| enum JPL::EChannel : uint32 |
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
|
strong |
|
strong |
|
strong |
|
strong |
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
|
inline |
|
inline |
Various float vector mixing utilities, with interface to accommodate mixing interleaved channel buffers.
|
inline |
|
inline |
|
nodiscard |
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.
|
inline |
|
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
|
inline |
|
inline |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexpr |
Element-wise clamp.
|
noexcept |
Element-wise clamp.
|
noexcept |
Element-wise clamp, signed.
Combine two high lanes of input a and b as { a2, a3, b2, b3 }.
Combine two low lanes of input a and b as { a0, a1, b0, b1 }.
Combine two low lanes of a and two high lanes from b as { a0, a1, b2, b3 }.
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
inlinenodiscard |
Compute 2-dimentional VBAP for a source direction within speaker arch defined by two speaker directions. Note: all directions must be normalized.
| sourceDirection | : direction from listener towards the source |
| speakerADirection | : directoin of the first speaker |
| speakerBDirection | : direction of the second speaker |
|
inlinenodiscard |
Compute three-dimensional VBAP for a point within a triangle of speaker directions.
| sourceDirection | Normalized direction from the listener towards the source. |
| triPointA | Direction of the first speaker in the triangle. |
| triPointB | Direction of the second speaker in the triangle. |
| triPointC | Direction of the third speaker in the triangle. |
Cos implementation for 4-wide 32-bit flaot vector Note: this function islmost identical to SinCos, where you get Sin almost for free.
|
noexcept |
|
noexcept |
| JPL_INLINE void JPL::DefaultDelete | ( | T * | object | ) |
Delete object allcoated from deafult global memory resource. The object must had been allocated by calling DefaultNew
|
nodiscard |
Allocate new object from deafult global memory resource used in JPLSpatial.
|
inline |
|
nodiscard |
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.
|
nodiscard |
Estimate RT60 using Eyring-Norris equation, taking into account air absorption.
|
nodiscard |
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).
|
nodiscard |
Estimate RT60 using Sabine's equation, taking into account air absorption.
Estimate RT60 from Mean Free Path using Eyring-Norris equation.
|
nodiscardconstexprnoexcept |
Floor count to divisible by 2.
|
nodiscardconstexprnoexcept |
Floor count to 4-wide simd vector.
|
nodiscardconstexprnoexcept |
Floor count to 8-wide simd vector.
Element-wise fused multiply-add.
|
inlinenodiscardconstexprnoexcept |
Decode scalar [0, 1] to a 2D unit vector.
|
constexpr |
Decode octahedron encoded direction back to a vector. This reverses the operation performed by ToOctahedron32.
| encodedDirection | : the octahedron integer to be decoded back to a direction vector. |
|
noexcept |
|
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)
|
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
|
inlinenoexcept |
|
nodiscard |
|
nodiscardconstexprnoexcept |
count is uneven, 0 otherwise
|
nodiscardconstexprnoexcept |
Get number of SIMD operations that can fit into the count
|
nodiscardconstexprnoexcept |
Get number of 8-wide simd operations that can fit into the count
|
nodiscardconstexprnoexcept |
Get the remaining tail from count that won't fill a simd vector.
|
nodiscardconstexprnoexcept |
Get the remaining tail from count that won't fill 8-wide simd vector.
| JPL_INLINE float JPL::GetSpreadFromSourceSize | ( | float | sourceSize, |
| float | distance ) |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
constexpr |
|
constexpr |
|
inlinenodiscardconstexpr |
|
inlinenodiscardconstexpr |
|
constexprnoexcept |
Interleave two low lanes with the two high lanes (e.g. { 0, 1, 2, 3 } -> { 0, 2, 1, 3 })
Determines if the given floating-point number num is a positive or negative infinity.
Determines if the given floating point number vec is a not-a-number(NaN) value.
|
nodiscard |
channelMap is not a valid channel map for a VBAP panning source; nullopt otherwise Multiplies a floating-point value arg by the number 2 raised to the exp power.
Natural logarithm computed for 4-wide 32-bit float vector return NaN for x <= 0
|
nodiscard |
std::make_shared wrapper using our global memory resource
|
nodiscard |
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.
|
nodiscard |
std::make_unique wrapper using our global memory resource
Element-wise max.
Element-wise max, signed.
Element-wise min.
Element-wise min, signed.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexpr |
Component-wise logical AND.
Component-wise logical AND.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardnoexcept |
|
inline |
|
inline |
| std::ostream & JPL::operator<< | ( | std::ostream & | os, |
| const Quat< Vec3 > & | quat ) |
|
inline |
|
inline |
|
nodiscardconstexprnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
Component-wise comparison.
Component-wise comparison.
|
nodiscardconstexpr |
|
nodiscardconstexprnoexcept |
Component-wise logical XOR.
Component-wise logical XOR.
Component-wise logical OR.
Component-wise logical OR.
| JPL_INLINE T JPL::ReflectionLoss_dB | ( | const T & | alpha | ) |
| JPL_INLINE void JPL::reset_pmr_shared | ( | std::shared_ptr< T > & | sharedPtr | ) |
| JPL_INLINE void JPL::reset_pmr_shared | ( | std::shared_ptr< T > & | sharedPtr, |
| Y * | ptr ) |
Element-wise round to nearest integer value.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Round count up to the next simd width.
|
noexcept |
|
noexcept |
|
noexcept |
Equivalent to std::signbit but for 4-wide 32-bit float vector.
Sin implementation for 4-wide 32-bit flaot vector Note: this function islmost identical to SinCos, where you get Cos almost for free.
|
nodiscard |
Calculate the tangent for each element of the vector (input in radians). Valid for input values in range +-Pi*100'000
|
nodiscardconstexprnoexcept |
Encode a 2D unit vector to scalar float [0, 1]. This overload encodes 4 directions at a time.
|
inlinenodiscardconstexprnoexcept |
"Diamond Encoding" of a 2D unit vector as per:
Encode a 2D unit vector to scalar float [0, 1]
|
constexpr |
Encode a direction vector into octahedron 32 bit integer at 16 bits precision.
| direction | : direction vector to be encoded, must be normalized and non-zero |
|
constexpr |
|
constexpr |
Computes the nearest integer not greater in magnitude than vec.
|
extern |
|
inline |
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
|
constexpr |
Implementation adapted from David Reid's https://github.com/mackron/miniaudio.
Rectangular conversion ratios
|
inline |
|
inlineconstexpr |
|
inline |
Default memory resource used throughout the library (we may or may not want to make this thread_local)
|
constexpr |
|
constexpr |
|
extern |