Perhaps we'll use relm4 for audio?

This commit is contained in:
Lucy 2022-03-07 15:04:14 -05:00
parent 31bb22f91b
commit 4ad01331e0
No known key found for this signature in database
GPG key ID: EBC517FAD666BBF1
3 changed files with 64 additions and 4 deletions

51
Cargo.lock generated
View file

@ -241,7 +241,8 @@ dependencies = [
"gtk4",
"libcosmic-widgets",
"once_cell",
"relm4-macros 0.4.2",
"pulsectl-rs",
"relm4",
"tokio",
]
@ -1013,6 +1014,33 @@ dependencies = [
"winapi",
]
[[package]]
name = "libpulse-binding"
version = "2.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17be42160017e0ae993c03bfdab4ecb6f82ce3f8d515bd8da8fdf18d10703663"
dependencies = [
"bitflags",
"libc",
"libpulse-sys",
"num-derive",
"num-traits",
"winapi",
]
[[package]]
name = "libpulse-sys"
version = "1.19.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "991e6bd0efe2a36e6534e136e7996925e4c1a8e35b7807fe533f2beffff27c30"
dependencies = [
"libc",
"num-derive",
"num-traits",
"pkg-config",
"winapi",
]
[[package]]
name = "lock_api"
version = "0.4.6"
@ -1123,6 +1151,17 @@ dependencies = [
"winapi",
]
[[package]]
name = "num-derive"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "num-integer"
version = "0.1.44"
@ -1378,6 +1417,15 @@ dependencies = [
"libc",
]
[[package]]
name = "pulsectl-rs"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06a988bceed1981b2c5fc4a3da0e4e073fdaff8e6bd022b089f54bc573dc3cfc"
dependencies = [
"libpulse-binding",
]
[[package]]
name = "quote"
version = "1.0.15"
@ -1456,6 +1504,7 @@ dependencies = [
"gtk4",
"log",
"once_cell",
"relm4-macros 0.4.1",
"tokio",
]

View file

@ -7,7 +7,8 @@ license = "LGPL-3.0-or-later"
[dependencies]
futures-util = "0.3.21"
gtk4 = "0.4.6"
once_cell = "1.10.0"
relm4-macros = "0.4.2"
tokio = { version = "1.17.0", features = ["full"] }
libcosmic-widgets = { git = "https://github.com/pop-os/libcosmic", branch = "lucy/widgets" }
once_cell = "1.10.0"
pulsectl-rs = "0.3.2"
relm4 = { git = "https://github.com/AaronErhardt/relm4", branch = "new-approach", features = ["macros"] }
tokio = { version = "1.17.0", features = ["full"] }

View file

@ -1,3 +1,13 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
#[macro_use]
extern crate relm4;
use once_cell::sync::Lazy;
use tokio::runtime::Runtime;
static RT: Lazy<Runtime> = Lazy::new(|| Runtime::new().expect("failed to build tokio runtime"));
fn main() {
println!("Hello, world!");
}