Node graph improvements and fixes

This commit is contained in:
Skyler Lehmkuhl
2025-10-28 08:51:53 -04:00
parent d2354e4864
commit 9d6eaa5bba
9 changed files with 555 additions and 29 deletions
+16
View File
@@ -1131,6 +1131,22 @@ pub async fn multi_sampler_remove_layer(
}
}
#[tauri::command]
pub async fn get_oscilloscope_data(
state: tauri::State<'_, Arc<Mutex<AudioState>>>,
track_id: u32,
node_id: u32,
sample_count: usize,
) -> Result<Vec<f32>, String> {
let mut audio_state = state.lock().unwrap();
if let Some(controller) = &mut audio_state.controller {
controller.query_oscilloscope_data(track_id, node_id, sample_count)
} else {
Err("Audio not initialized".to_string())
}
}
#[derive(serde::Serialize, Clone)]
#[serde(tag = "type")]
pub enum SerializedAudioEvent {
+1
View File
@@ -233,6 +233,7 @@ pub fn run() {
audio::multi_sampler_get_layers,
audio::multi_sampler_update_layer,
audio::multi_sampler_remove_layer,
audio::get_oscilloscope_data,
])
// .manage(window_counter)
.build(tauri::generate_context!())