wip: Mute action in the voice notification, shared capture clock
This commit is contained in:
1 parent
14d0d81fdf
commit
1eff869d39
11 files changed
+159
-81
No files matched your search
@@ -111,8 +111,8 @@ fn watch_voice(host: &'static EngineHost) {
|
||||
loop {
|
||||
match events.recv().await {
|
||||
Ok(event) => {
|
||||
if let Some(text) = with_foreground(|f| f.update(&event))
|
||||
&& let Err(e) = bridge::set_voice_notification(text.as_deref())
|
||||
if let Some(notice) = with_foreground(|f| f.update(&event))
|
||||
&& let Err(e) = bridge::set_voice_notification(notice.as_ref())
|
||||
{
|
||||
warn!("voice service: {e}");
|
||||
}
|
||||
@@ -133,3 +133,16 @@ pub fn disconnect_voice() {
|
||||
host.engine().send(Command::DisconnectVoice { session });
|
||||
}
|
||||
}
|
||||
|
||||
/// "Mute" / "Unmute" in the voice notification: mute every voice session,
|
||||
/// or unmute them all when all are muted.
|
||||
pub fn toggle_mute() {
|
||||
let Some(host) = HOST.get() else {
|
||||
return;
|
||||
};
|
||||
let (sessions, muted) =
|
||||
with_foreground(|f| (f.voice_sessions(), f.notice().is_some_and(|n| n.muted)));
|
||||
for session in sessions {
|
||||
host.engine().send(Command::SetInputMuted { session, muted: !muted });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user