Add a feature based dummy implementation
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user