Skip to content

Commit 149d3b5

Browse files
Merge pull request #151 from GoXLR-on-Linux/dev-1.0.5
Dev 1.0.5
2 parents ce664cc + 0842e03 commit 149d3b5

30 files changed

+467
-257
lines changed

Cargo.lock

Lines changed: 30 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

audio/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "goxlr-audio"
3-
version = "1.0.4"
3+
version = "1.0.5"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "goxlr-client"
3-
version = "1.0.4"
3+
version = "1.0.5"
44
edition = "2021"
55
build = "build.rs"
66
authors = ["Nathan Adams <[email protected]>", "Craig McLure <[email protected]>", "Lars Mühlbauer <[email protected]>"]

daemon/Cargo.toml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "goxlr-daemon"
3-
version = "1.0.4"
3+
version = "1.0.5"
44
edition = "2021"
55
authors = ["Nathan Adams <[email protected]>", "Craig McLure <[email protected]>", "Lars Mühlbauer <[email protected]>"]
66
description = "Allows control of a TC-Helicon GoXLR or GoXLR Mini, by maintaining an interaction with it over USB in the background."
@@ -22,7 +22,7 @@ goxlr-scribbles = { path = "../scribbles" }
2222
log = "0.4.20"
2323
simplelog = "0.12.1"
2424
file-rotate = "0.7.5"
25-
log-panics = { version = "2.1.0", features = ["with-backtrace"]}
25+
log-panics = { version = "2.1.0", features = ["with-backtrace"] }
2626

2727
tokio = { version = "1.35.0", features = ["full"] }
2828
tokio-serde = "0.8.0"
@@ -83,10 +83,20 @@ winrt-notification = "0.5.1"
8383
winreg = "0.52.0"
8484
mslnk = "0.1.8"
8585
dunce = "1.0.4"
86-
win-win = "0.1.1"
87-
winapi = { version = "0.3.9", features = ["winuser"] }
8886
windows-args = "0.2.0"
8987

88+
# Experimental Package..
89+
windows = { version = "0.52.0", features = [
90+
"Win32_Foundation",
91+
"Win32_UI_Shell",
92+
"Win32_UI_Shell_Common",
93+
"Win32_UI_WindowsAndMessaging",
94+
"Win32_Graphics_Gdi",
95+
"Win32_System_LibraryLoader",
96+
"Win32_System_Shutdown",
97+
"Win32_System_RemoteDesktop"
98+
] }
99+
90100
[target.'cfg(target_os = "macos")'.dependencies]
91101

92102
# TAO has moved the tray feature to it's own crate, we need to work this in before we can update, 0.21.1 is the latest

daemon/src/device.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2578,11 +2578,12 @@ impl<'a> Device<'a> {
25782578
self.profile.set_mute_chat_button_blink(false);
25792579
}
25802580
MuteState::MutedToAll => {
2581-
self.profile.set_mute_chat_button_on(false);
2581+
self.profile.set_mute_chat_button_on(true);
25822582
self.profile.set_mute_chat_button_blink(true);
25832583
}
25842584
}
25852585
self.apply_cough_from_profile()?;
2586+
self.apply_effects(LinkedHashSet::from_iter([EffectKey::MicInputMute]))?;
25862587
self.apply_routing(BasicInputDevice::Microphone).await?;
25872588
self.update_button_states()?;
25882589
}

daemon/src/main.rs

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,35 @@ pub struct PatchEvent {
6868

6969
#[tokio::main]
7070
async fn main() -> Result<()> {
71-
let args: Cli = Cli::parse();
71+
// If running the utility has an error, make sure log level is debug, and propagate the
72+
// error up to the user on Windows.
73+
if let Err(e) = run_utility().await {
74+
let args: Cli = Cli::parse();
75+
let settings = SettingsHandle::load(args.config).await?;
76+
77+
if settings.get_log_level().await != LogLevel::Debug {
78+
info!("Setting Log Level to Debug for next run..");
79+
settings.set_log_level(LogLevel::Debug).await;
80+
settings.save().await;
81+
}
82+
83+
#[cfg(target_os = "windows")]
84+
{
85+
use platform::windows::display_error;
86+
let message = format!("Error Starting the GoXLR Utility:\r\n\r\n{}", e);
87+
display_error(message);
88+
}
89+
90+
bail!("{}", e);
91+
}
7292

73-
// Before we do absolutely anything, we need to load the config file, as it implies log settings
93+
Ok(())
94+
}
95+
96+
async fn run_utility() -> Result<()> {
97+
// We're just going to re-parse the args here, while we've technically done it above,
98+
// they get moved into the settings loader, which just causes headaches :D
99+
let args: Cli = Cli::parse();
74100
let settings = SettingsHandle::load(args.config).await?;
75101

76102
// Configure and / or create the log path, and file name.
@@ -246,9 +272,9 @@ async fn main() -> Result<()> {
246272

247273
// Spawn the IPC Socket..
248274
let ipc_socket = bind_socket().await;
249-
if ipc_socket.is_err() {
250-
error!("Error Starting Daemon: ");
251-
bail!("{}", ipc_socket.err().unwrap());
275+
if let Err(e) = ipc_socket {
276+
error!("Error Binding IPC Socket: {}", e);
277+
bail!("{}", e);
252278
}
253279

254280
// Start the USB Device Handler
@@ -265,7 +291,7 @@ async fn main() -> Result<()> {
265291
));
266292

267293
// Launch the IPC Server..
268-
let ipc_socket = ipc_socket.unwrap();
294+
let ipc_socket = ipc_socket?;
269295
let communications_handle = tokio::spawn(spawn_ipc_server(
270296
ipc_socket,
271297
usb_tx.clone(),

0 commit comments

Comments
 (0)