Add a feature based dummy implementation
Some checks failed
ci/woodpecker/push/pre_commit_test Pipeline was successful
ci/woodpecker/push/code_tests Pipeline failed

This commit is contained in:
2025-12-01 22:42:06 +01:00
parent af97801d31
commit 50ebac998c
3 changed files with 29 additions and 12 deletions

View File

@@ -7,9 +7,7 @@ use tonic::{Response, transport::Server};
use tonic_reflection::server;
use crate::control_pane::ControlPane;
#[cfg(feature = "jack") ]
use crate::audio_engine::jack_ab::JackAudioBackend;
use crate::{audio_engine::jack_ab::JackAudioBackend, control_pane::ControlPane};
pub(crate) struct Grpc {
pub(crate) port: i32,
@@ -65,11 +63,11 @@ impl AudioBackend for TermixAudioBackend {
) -> Result<Response<BackendList>, tonic::Status> {
info!("discovering available backends");
let mut response = BackendList::default();
if cfg!(feature = "jack") {
let jack = JackAudioBackend{ name: "jack".to_string(), running: todo!() };
response.backends.push(Backend {
name: "jack".to_string(),
});
let jack = JackAudioBackend::new();
if jack.feature_jack {
response.backends.push(Backend {
name: "jack".to_string(),
});
}
Ok(Response::new(response))
}