Trait oboe::AudioStreamBase
source · pub trait AudioStreamBase {
Show 17 methods
// Required methods
fn get_channel_count(&self) -> ChannelCount;
fn get_direction(&self) -> Direction;
fn get_sample_rate(&self) -> i32;
fn get_frames_per_callback(&self) -> i32;
fn get_format(&self) -> AudioFormat;
fn get_buffer_size_in_frames(&self) -> i32;
fn get_buffer_capacity_in_frames(&self) -> i32;
fn get_sharing_mode(&self) -> SharingMode;
fn get_performance_mode(&self) -> PerformanceMode;
fn get_device_id(&self) -> i32;
fn get_usage(&self) -> Usage;
fn get_content_type(&self) -> ContentType;
fn get_input_preset(&self) -> InputPreset;
fn get_session_id(&self) -> SessionId;
fn is_channel_conversion_allowed(&self) -> bool;
fn is_format_conversion_allowed(&self) -> bool;
fn get_sample_rate_conversion_quality(&self) -> SampleRateConversionQuality;
}
Expand description
Base trait containing parameters for audio streams and builders.
Required Methods§
sourcefn get_channel_count(&self) -> ChannelCount
fn get_channel_count(&self) -> ChannelCount
Get actual number of channels
sourcefn get_direction(&self) -> Direction
fn get_direction(&self) -> Direction
Get actual stream direction
Direction::Input
or Direction::Output
.
sourcefn get_sample_rate(&self) -> i32
fn get_sample_rate(&self) -> i32
Get the actual sample rate for the stream
sourcefn get_frames_per_callback(&self) -> i32
fn get_frames_per_callback(&self) -> i32
Get the number of frames in each callback
sourcefn get_format(&self) -> AudioFormat
fn get_format(&self) -> AudioFormat
Get the audio sample format (e.g. F32 or I16)
sourcefn get_buffer_size_in_frames(&self) -> i32
fn get_buffer_size_in_frames(&self) -> i32
Query the maximum number of frames that can be filled without blocking. If the stream has been closed the last known value will be returned.
sourcefn get_buffer_capacity_in_frames(&self) -> i32
fn get_buffer_capacity_in_frames(&self) -> i32
Get the capacity in number of frames
sourcefn get_sharing_mode(&self) -> SharingMode
fn get_sharing_mode(&self) -> SharingMode
Get the sharing mode of the stream
sourcefn get_performance_mode(&self) -> PerformanceMode
fn get_performance_mode(&self) -> PerformanceMode
Get the performance mode of the stream
sourcefn get_device_id(&self) -> i32
fn get_device_id(&self) -> i32
Get the device identifier of the stream
sourcefn get_content_type(&self) -> ContentType
fn get_content_type(&self) -> ContentType
Get the stream’s content type
sourcefn get_input_preset(&self) -> InputPreset
fn get_input_preset(&self) -> InputPreset
Get the stream’s input preset
sourcefn get_session_id(&self) -> SessionId
fn get_session_id(&self) -> SessionId
Get the stream’s session ID allocation strategy (None or Allocate)
sourcefn is_channel_conversion_allowed(&self) -> bool
fn is_channel_conversion_allowed(&self) -> bool
Return true if can convert channel counts to achieve optimal results.
sourcefn is_format_conversion_allowed(&self) -> bool
fn is_format_conversion_allowed(&self) -> bool
Return true if Oboe can convert data formats to achieve optimal results.
sourcefn get_sample_rate_conversion_quality(&self) -> SampleRateConversionQuality
fn get_sample_rate_conversion_quality(&self) -> SampleRateConversionQuality
Get whether and how Oboe can convert sample rates to achieve optimal results.