Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

zig: link libusb

try to call pause function

try to call pause function

try to call pause function

try to call pause function

try to call pause function

try to call pause function

try to call pause function

+13 -5
+2 -1
build.zig
··· 159 159 defineCMacros(libfirmware); 160 160 addIncludePaths(libfirmware); 161 161 162 + libfirmware.linkSystemLibrary("usb"); 163 + 162 164 const libspeex_voice = b.addStaticLibrary(.{ 163 165 .name = "speex-voice", 164 166 .target = target, ··· 2932 2934 exe.linkLibrary(libfixedpoint); 2933 2935 exe.linkLibrary(libuisimulator); 2934 2936 exe.linkSystemLibrary("SDL"); 2935 - exe.linkSystemLibrary("usb"); 2936 2937 exe.linkLibC(); 2937 2938 } 2938 2939
+5 -1
crates/graphql/src/server.rs
··· 61 61 62 62 HttpServer::new(move || { 63 63 let cors = Cors::permissive(); 64 - App::new().app_data(Data::new(schema.clone())).wrap(cors) 64 + App::new() 65 + .app_data(Data::new(schema.clone())) 66 + .wrap(cors) 67 + .service(index_graphql) 68 + .service(index_graphiql) 65 69 }) 66 70 .bind(addr)? 67 71 .run()
+1
crates/rpc/src/playback.rs
··· 1 1 use crate::api::rockbox::v1alpha1::{playback_service_server::PlaybackService, *}; 2 2 use rockbox_sys as rb; 3 + use tokio::task; 3 4 4 5 #[derive(Default)] 5 6 pub struct Playback;
+5 -3
crates/server/src/lib.rs
··· 1 1 use owo_colors::OwoColorize; 2 + use rockbox_sys as rb; 2 3 use std::thread; 3 4 4 5 #[no_mangle] ··· 15 16 // Start the server 16 17 println!("{}", BANNER.yellow()); 17 18 18 - thread::spawn(|| { 19 - let runtime = tokio::runtime::Builder::new_multi_thread() 19 + thread::spawn(move || { 20 + rb::playback::pause(); 21 + let runtime = tokio::runtime::Builder::new_current_thread() 20 22 .enable_all() 21 23 .build() 22 24 .unwrap(); ··· 29 31 }); 30 32 31 33 thread::spawn(|| { 32 - let runtime = tokio::runtime::Builder::new_multi_thread() 34 + let runtime = tokio::runtime::Builder::new_current_thread() 33 35 .enable_all() 34 36 .build() 35 37 .unwrap();