pub struct ResourceEstimates {
pub frames: u64,
pub events: u64,
pub peak_voices: u32,
pub memory_bytes: u64,
}Expand description
Bounded estimates of what a Program costs to render or run. Upper bounds are stated where an exact figure isn’t cheap; the runtime preallocates from these (ADR 0005).
Fields§
§frames: u64Total render length in frames (mono frame count).
events: u64Total note events across all tracks.
peak_voices: u32An upper bound on simultaneously sounding notes across the mix: the per-track maxima summed (tracks start together, so their peaks can coincide). Voice pools sized to this never steal.
memory_bytes: u64The dominant render allocation: the stereo f32 output buffers
(frames × 2 channels × 4 bytes). Everything else (per-track bounces)
is bounded by the same order.
Trait Implementations§
Source§impl Clone for ResourceEstimates
impl Clone for ResourceEstimates
Source§fn clone(&self) -> ResourceEstimates
fn clone(&self) -> ResourceEstimates
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceEstimates
impl Debug for ResourceEstimates
Source§impl<'de> Deserialize<'de> for ResourceEstimates
impl<'de> Deserialize<'de> for ResourceEstimates
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ResourceEstimates
impl RefUnwindSafe for ResourceEstimates
impl Send for ResourceEstimates
impl Sync for ResourceEstimates
impl Unpin for ResourceEstimates
impl UnsafeUnpin for ResourceEstimates
impl UnwindSafe for ResourceEstimates
Blanket Implementations§
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
Mutably borrows from an owned value. Read more