Struct goxlr_daemon::device::Device
source · [−]pub struct Device<'a, T: UsbContext> {
goxlr: GoXLR<T>,
hardware: HardwareStatus,
last_buttons: EnumSet<Buttons>,
button_states: EnumMap<Buttons, ButtonState>,
profile: ProfileAdapter,
mic_profile: MicProfileAdapter,
audio_handler: Option<AudioHandler>,
settings: &'a SettingsHandle,
}
Fields
goxlr: GoXLR<T>
hardware: HardwareStatus
profile: ProfileAdapter
mic_profile: MicProfileAdapter
audio_handler: Option<AudioHandler>
settings: &'a SettingsHandle
Implementations
sourceimpl<'a, T: UsbContext> Device<'a, T>
impl<'a, T: UsbContext> Device<'a, T>
pub fn new(
goxlr: GoXLR<T>,
hardware: HardwareStatus,
profile_name: Option<String>,
mic_profile_name: Option<String>,
profile_directory: &Path,
mic_profile_directory: &Path,
settings_handle: &'a SettingsHandle
) -> Result<Self>
pub fn serial(&self) -> &str
pub fn status(&self) -> MixerStatus
pub fn profile(&self) -> &ProfileAdapter
pub fn mic_profile(&self) -> &MicProfileAdapter
pub async fn monitor_inputs(&mut self) -> Result<()>
async fn handle_fader_mute(
&mut self,
fader: FaderName,
held: bool
) -> Result<()>
async fn unmute_if_muted(&mut self, fader: FaderName) -> Result<()>
async fn unmute_chat_if_muted(&mut self) -> Result<()>
async fn handle_cough_mute(
&mut self,
press: bool,
release: bool,
held: bool,
held_called: bool
) -> Result<()>
async fn load_sample_bank(&mut self, bank: SampleBank) -> Result<()>
async fn sync_sample_lighting(&mut self) -> Result<()>
async fn load_effect_bank(&mut self, preset: EffectBankPresets) -> Result<()>
async fn toggle_megaphone(&mut self) -> Result<()>
async fn toggle_robot(&mut self) -> Result<()>
async fn toggle_hardtune(&mut self) -> Result<()>
async fn toggle_effects(&mut self) -> Result<()>
fn mic_muted_by_fader(&self) -> bool
fn mic_muted_by_cough(&self) -> bool
fn update_volumes_to(&mut self, volumes: [u8; 4])
fn update_encoders_to(&mut self, encoders: [i8; 4]) -> Result<()>
pub async fn perform_command(&mut self, command: GoXLRCommand) -> Result<()>
fn apply_channel_routing(
&mut self,
input: BasicInputDevice,
router: EnumMap<BasicOutputDevice, bool>
) -> Result<()>
fn apply_transient_routing(
&self,
input: BasicInputDevice,
router: &mut EnumMap<BasicOutputDevice, bool>
)
fn apply_transient_fader_routing(
&self,
fader: FaderName,
router: &mut EnumMap<BasicOutputDevice, bool>
)
fn apply_transient_cough_routing(
&self,
router: &mut EnumMap<BasicOutputDevice, bool>
)
fn apply_transient_channel_routing(
&self,
muted_to_x: bool,
muted_to_all: bool,
mute_function: MuteFunction,
router: &mut EnumMap<BasicOutputDevice, bool>
)
fn apply_routing(&mut self, input: BasicInputDevice) -> Result<()>
fn apply_mute_from_profile(&mut self, fader: FaderName) -> Result<()>
fn apply_cough_from_profile(&mut self) -> Result<()>
async fn set_fader(
&mut self,
fader: FaderName,
new_channel: ChannelName
) -> Result<()>
fn get_fader_state(&self, fader: FaderName) -> FaderStatus
fn set_fader_display_from_profile(&mut self, fader: FaderName) -> Result<()>
fn load_colour_map(&mut self) -> Result<()>
fn apply_profile(&mut self) -> Result<()>
sourcefn apply_mic_params(
&mut self,
params: HashSet<MicrophoneParamKey>
) -> Result<()>
fn apply_mic_params(
&mut self,
params: HashSet<MicrophoneParamKey>
) -> Result<()>
Applies a Set of Microphone Parameters based on input, designed this way so that commands and other abstract entities can apply a subset of params
fn apply_effects(&mut self, params: HashSet<EffectKey>) -> Result<()>
fn apply_mic_profile(&mut self) -> Result<()>
fn load_effects(&mut self) -> Result<()>
fn set_pitch_mode(&mut self) -> Result<()>
fn get_epoch_ms(&self) -> u128
Trait Implementations
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for Device<'a, T>
impl<'a, T> Send for Device<'a, T>
impl<'a, T> Sync for Device<'a, T>
impl<'a, T> Unpin for Device<'a, T> where
T: Unpin,
impl<'a, T> !UnwindSafe for Device<'a, T>
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