Skip to main content

FrameSyncAudioRequest

Struct FrameSyncAudioRequest 

Source
pub struct FrameSyncAudioRequest { /* private fields */ }
Expand description

A validated, reusable audio operation for FrameSync::capture_audio.

capture and capture_with require explicit positive output channels and samples per channel. Construction checks the SDK’s signed byte stride and the 64 MiB packed sample payload limit before any native work. This bounds requested samples, not SDK internal memory use. Successful construction and request reuse allocate nothing in the wrapper; submitting a request performs no dimension checks, locks, or extra SDK queries. Returned descriptors and metadata are still validated after each capture.

query_input queries the current input format without requesting samples. To follow source channels, query first, wait for a positive channel count, then build a capture request with that concrete count. Re-query and rebuild when the application chooses to follow format changes. The SDK converts to the explicit output count even if the source changes meanwhile.

Implementations§

Source§

impl FrameSyncAudioRequest

Source

pub const fn query_input() -> Self

Query the current incoming audio format without requesting sample data. The result has zero sample rate and channels if no input format is known.

Source

pub fn capture(channels: i32, samples: i32) -> Result<Self>

Capture samples using the source sample rate and explicit output channels.

§Errors

Returns Error::InvalidFrame for nonpositive dimensions, an unrepresentable signed byte stride, arithmetic overflow, or a sample payload exceeding 64 MiB. Validation does not allocate sample storage.

Source

pub fn capture_with( sample_rate: Option<i32>, channels: i32, samples: i32, ) -> Result<Self>

Capture samples with an optional source-derived sample rate.

None uses the current source rate. Some(rate) must be positive. Channels and samples per channel must always be explicitly positive. A request can be copied and reused across borrowed and owned captures.

§Errors

Returns Error::InvalidFrame for a nonpositive explicit sample rate or invalid dimensions as described in capture.

Trait Implementations§

Source§

impl Clone for FrameSyncAudioRequest

Source§

fn clone(&self) -> FrameSyncAudioRequest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FrameSyncAudioRequest

Source§

impl Debug for FrameSyncAudioRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for FrameSyncAudioRequest

Source§

impl PartialEq for FrameSyncAudioRequest

Source§

fn eq(&self, other: &FrameSyncAudioRequest) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FrameSyncAudioRequest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.