pub struct AudioConfig {
pub handle: SmartHandle<SPXAUDIOCONFIGHANDLE>,
pub properties: PropertyCollection,
}
Expand description
AudioConfig represents specific audio configuration, such as microphone, file, or custom audio streams.
Fields
handle: SmartHandle<SPXAUDIOCONFIGHANDLE>
properties: PropertyCollection
Implementations
sourceimpl AudioConfig
impl AudioConfig
pub fn from_stream_input(stream: &dyn AudioInputStream) -> Result<AudioConfig>
pub fn from_wav_file_input(file_name: &str) -> Result<AudioConfig>
pub fn from_default_microphone_input() -> Result<AudioConfig>
pub fn from_microphone_input(device_name: &str) -> Result<AudioConfig>
pub fn from_speaker_output(device_name: &str) -> Result<AudioConfig>
pub fn from_default_speaker_output() -> Result<AudioConfig>
pub fn from_wav_file_output(file_name: &str) -> Result<AudioConfig>
pub fn from_stream_output(stream: &dyn AudioOutputStream) -> Result<AudioConfig>
pub fn set_property(&mut self, id: PropertyId, value: &str) -> Result<()>
pub fn get_property(&self, id: PropertyId) -> Result<String>
pub fn set_property_by_string(&mut self, id: &str, value: &str) -> Result<()>
pub fn get_property_by_string(&self, id: &str) -> Result<String>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AudioConfig
impl Send for AudioConfig
impl !Sync for AudioConfig
impl Unpin for AudioConfig
impl UnwindSafe for AudioConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more