Use the SharedLink struct instead of MumbleLink.

Makes it so the launch order for the wrapper and Mumble doesn't matter, previously Mumble had to be started first.
master
David 2018-12-18 20:49:36 -06:00
parent 687cfa7003
commit d7bc44051b
2 changed files with 9 additions and 14 deletions

19
.vscode/tasks.json vendored
View File

@ -10,7 +10,10 @@
"group": {
"kind": "build",
"isDefault": true
}
},
"problemMatcher": [
"$rustc"
]
},
{
"label": "cargo build release",
@ -19,16 +22,10 @@
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "cargo test",
"type": "shell",
"command": "cargo test",
"group": {
"kind": "test",
"isDefault": true
}
},
"problemMatcher": [
"$rustc"
]
}
]
}

View File

@ -19,7 +19,6 @@ fn get_data(captures: &regex::Captures) -> Result<([f32; 3], char, char), String
))
}
fn main() {
match try_main() {
Ok(_) => {},
@ -40,8 +39,7 @@ fn try_main() -> Result<(), String> {
println!("Starting...");
// Hook into Mumble using the very handy crate somebody made.
let mut link = MumbleLink::new("Minetest", "Minetest positional audio using a mod and wrapper.")
.map_err(|e| { format!("Unable to connect to Mumble. Is it running? ({})", e) })?;
let mut link = SharedLink::new("Minetest", "Minetest positional audio using a mod and wrapper.");
println!("Connected to Mumble successfully.");