pub trait SampleResource: SampleResourceInfo {
// Required method
fn fill_buffers(
&self,
buffers: &mut [&mut [f32]],
buffer_range: Range<usize>,
start_frame: u64,
);
}Expand description
A resource of audio samples.
Required Methods§
Sourcefn fill_buffers(
&self,
buffers: &mut [&mut [f32]],
buffer_range: Range<usize>,
start_frame: u64,
)
fn fill_buffers( &self, buffers: &mut [&mut [f32]], buffer_range: Range<usize>, start_frame: u64, )
Fill the given buffers with audio data starting from the given starting frame in the resource.
buffers- The buffers to fill with data. If the length ofbuffersis greater than the number of channels in this resource, then ignore the extra buffers.buffer_range- The range inside each buffer slice in which to fill with data. Do not fill any data outside of this range.start_frame- The sample (of a single channel of audio) in the resource at which to start copying from. Not to be confused with video frames.
Implementations on Foreign Types§
Implementors§
impl SampleResource for DecodedAudio
Available on crate feature
symphonium only.impl SampleResource for DecodedAudioF32
Available on crate feature
symphonium only.