pub struct HolosonicWavefield { /* private fields */ }Expand description
Fixed-capacity holosonic wavefield manager (Tier-1 zero-heap).
Implementations§
Source§impl HolosonicWavefield
impl HolosonicWavefield
Sourcepub fn push(&mut self, emitter: HolosonicEmitter) -> bool
pub fn push(&mut self, emitter: HolosonicEmitter) -> bool
Adds an emitter to the spatial wavefield. Returns false if capacity exceeded.
Sourcepub fn as_slice(&self) -> &[HolosonicEmitter]
pub fn as_slice(&self) -> &[HolosonicEmitter]
Returns a slice of the currently active emitters.
Sourcepub fn emit_sonic_token(
&self,
emitter_idx: usize,
origin_quin_hash: u64,
tensor_index: u32,
deontic_permit: u8,
occlusion_gain: f32,
sample: HolosonicPointSample,
listener_pos: [f32; 3],
time_s: f32,
) -> (HolosonicSonicToken48, SonicToken)
pub fn emit_sonic_token( &self, emitter_idx: usize, origin_quin_hash: u64, tensor_index: u32, deontic_permit: u8, occlusion_gain: f32, sample: HolosonicPointSample, listener_pos: [f32; 3], time_s: f32, ) -> (HolosonicSonicToken48, SonicToken)
Emits a 48-byte HolosonicSonicToken48 telemetry record for an active emitter and sample,
and also packs a 64-bit SonicToken for the Q42 U3 SonicTokenRing.
Sourcepub fn evaluate_point(
&self,
listener_pos: [f32; 3],
listener_yaw: f32,
time_s: f32,
) -> HolosonicPointSample
pub fn evaluate_point( &self, listener_pos: [f32; 3], listener_yaw: f32, time_s: f32, ) -> HolosonicPointSample
Evaluates the instantaneous spatial acoustic wavefield at the listener standpoint.
Computes spherical wave propagation, phase delays ($\Delta \phi = k \cdot d$), wave superposition, and HRTF binaural panning.
Sourcepub fn render_block(
&self,
listener_pos: [f32; 3],
listener_yaw: f32,
start_time_s: f32,
sample_rate: f32,
out_l: &mut [f32],
out_r: &mut [f32],
)
pub fn render_block( &self, listener_pos: [f32; 3], listener_yaw: f32, start_time_s: f32, sample_rate: f32, out_l: &mut [f32], out_r: &mut [f32], )
Renders a discrete buffer block of stereo audio samples (zero heap).
Fills caller-supplied out_l and out_r slices.
Sourcepub fn emit_tokens_from_sample(
&self,
sample: HolosonicPointSample,
out_tokens: &mut [SonicToken],
) -> usize
pub fn emit_tokens_from_sample( &self, sample: HolosonicPointSample, out_tokens: &mut [SonicToken], ) -> usize
Translates constructive interference peaks into 64-bit SonicToken events.
Fills out_tokens without heap allocation; returns number of tokens emitted.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HolosonicWavefield
impl RefUnwindSafe for HolosonicWavefield
impl Send for HolosonicWavefield
impl Sync for HolosonicWavefield
impl Unpin for HolosonicWavefield
impl UnsafeUnpin for HolosonicWavefield
impl UnwindSafe for HolosonicWavefield
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more