pub fn seconds_to_samples<F: RealFloat>(
seconds: F,
sample_rate: impl Into<u32>,
) -> usizeExpand description
Helper function to convert seconds to samples Converts time in seconds to number of samples at given sample rate
§Arguments
seconds: Duration in secondssample_rate: Sampling frequency in Hz (acceptsu32orNonZeroU32)
§Returns
Number of samples representing the specified duration
§Panics
Panics if the computed sample count cannot be converted to usize,
typically when the result would overflow or is infinite/NaN.