#[repr(i32)]pub enum AudioChannelCount {
Mono = 1,
Stereo = 2,
}Expand description
Audio channel configuration for capture
ScreenCaptureKit supports mono (1 channel) or stereo (2 channels) audio.
Using other values will result in the system defaulting to stereo.
§Examples
use screencapturekit::stream::configuration::audio::AudioChannelCount;
// Get the channel count
assert_eq!(AudioChannelCount::Stereo.as_count(), 2);
// Use default (stereo)
let channels = AudioChannelCount::default();
assert_eq!(channels, AudioChannelCount::Stereo);Variants§
Implementations§
Source§impl AudioChannelCount
impl AudioChannelCount
Sourcepub const fn from_count(count: i32) -> Option<Self>
pub const fn from_count(count: i32) -> Option<Self>
Create from channel count, returning None if unsupported
§Examples
use screencapturekit::stream::configuration::audio::AudioChannelCount;
assert_eq!(AudioChannelCount::from_count(2), Some(AudioChannelCount::Stereo));
assert_eq!(AudioChannelCount::from_count(6), None); // Not supportedTrait Implementations§
Source§impl Clone for AudioChannelCount
impl Clone for AudioChannelCount
Source§fn clone(&self) -> AudioChannelCount
fn clone(&self) -> AudioChannelCount
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioChannelCount
impl Debug for AudioChannelCount
Source§impl Default for AudioChannelCount
impl Default for AudioChannelCount
Source§fn default() -> AudioChannelCount
fn default() -> AudioChannelCount
Returns the “default value” for a type. Read more
Source§impl Display for AudioChannelCount
impl Display for AudioChannelCount
Source§impl From<AudioChannelCount> for i32
impl From<AudioChannelCount> for i32
Source§fn from(count: AudioChannelCount) -> Self
fn from(count: AudioChannelCount) -> Self
Converts to this type from the input type.
Source§impl Hash for AudioChannelCount
impl Hash for AudioChannelCount
Source§impl PartialEq for AudioChannelCount
impl PartialEq for AudioChannelCount
impl Copy for AudioChannelCount
impl Eq for AudioChannelCount
impl StructuralPartialEq for AudioChannelCount
Auto Trait Implementations§
impl Freeze for AudioChannelCount
impl RefUnwindSafe for AudioChannelCount
impl Send for AudioChannelCount
impl Sync for AudioChannelCount
impl Unpin for AudioChannelCount
impl UnwindSafe for AudioChannelCount
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more