pub struct Context { /* 私有字段 */ }实现§
源代码§impl Context
impl Context
源代码pub fn get(
src_format: Sample,
src_channel_layout: ChannelLayout,
src_rate: u32,
dst_format: Sample,
dst_channel_layout: ChannelLayout,
dst_rate: u32,
) -> Result<Self, Error>
pub fn get( src_format: Sample, src_channel_layout: ChannelLayout, src_rate: u32, dst_format: Sample, dst_channel_layout: ChannelLayout, dst_rate: u32, ) -> Result<Self, Error>
Create a resampler with the given definitions.
源代码pub fn get_with(
src_format: Sample,
src_channel_layout: ChannelLayout,
src_rate: u32,
dst_format: Sample,
dst_channel_layout: ChannelLayout,
dst_rate: u32,
options: Dictionary<'_>,
) -> Result<Self, Error>
pub fn get_with( src_format: Sample, src_channel_layout: ChannelLayout, src_rate: u32, dst_format: Sample, dst_channel_layout: ChannelLayout, dst_rate: u32, options: Dictionary<'_>, ) -> Result<Self, Error>
Create a resampler with the given definitions and custom options dictionary.
源代码pub fn input(&self) -> &Definition
pub fn input(&self) -> &Definition
Get the input definition.
源代码pub fn output(&self) -> &Definition
pub fn output(&self) -> &Definition
Get the output definition.