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§

source

fn get_channel_count(&self) -> ChannelCount

Get actual number of channels

source

fn get_direction(&self) -> Direction

Get actual stream direction

Direction::Input or Direction::Output.

source

fn get_sample_rate(&self) -> i32

Get the actual sample rate for the stream

source

fn get_frames_per_callback(&self) -> i32

Get the number of frames in each callback

source

fn get_format(&self) -> AudioFormat

Get the audio sample format (e.g. F32 or I16)

source

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.

source

fn get_buffer_capacity_in_frames(&self) -> i32

Get the capacity in number of frames

source

fn get_sharing_mode(&self) -> SharingMode

Get the sharing mode of the stream

source

fn get_performance_mode(&self) -> PerformanceMode

Get the performance mode of the stream

source

fn get_device_id(&self) -> i32

Get the device identifier of the stream

source

fn get_usage(&self) -> Usage

Get the usage for this stream

source

fn get_content_type(&self) -> ContentType

Get the stream’s content type

source

fn get_input_preset(&self) -> InputPreset

Get the stream’s input preset

source

fn get_session_id(&self) -> SessionId

Get the stream’s session ID allocation strategy (None or Allocate)

source

fn is_channel_conversion_allowed(&self) -> bool

Return true if can convert channel counts to achieve optimal results.

source

fn is_format_conversion_allowed(&self) -> bool

Return true if Oboe can convert data formats to achieve optimal results.

source

fn get_sample_rate_conversion_quality(&self) -> SampleRateConversionQuality

Get whether and how Oboe can convert sample rates to achieve optimal results.

Implementors§

source§

impl<T: RawAudioStreamBase> AudioStreamBase for T