V42+V42A: fix seam click khi loop master FX — worklet wrap crossfade (tail->head) + native WebAudio loop cho bypass (het click beat 0); dip bypass 5ms; PDC playhead freeze/snap
This commit is contained in:
+23
-1
@@ -293,7 +293,8 @@ pub fn run() {
|
||||
bridge_status,
|
||||
transport_control,
|
||||
set_fx_chain,
|
||||
restart_bridge_with_sample_rate
|
||||
restart_bridge_with_sample_rate,
|
||||
dbg_log
|
||||
])
|
||||
.setup(|app| {
|
||||
// V10 (FIX_DRAG_DROP_WINDOWS): disable Tauri's built-in drag-drop
|
||||
@@ -900,6 +901,27 @@ fn bridge_status(app: AppHandle) -> Result<BridgeStatus, String> {
|
||||
Ok(status)
|
||||
}
|
||||
|
||||
/// V28: JS timing diagnostics — append `{unix_ms} {tag} {extra}` to
|
||||
/// %APPDATA%/SonicForgeDAW/logs/dbg.log (create dirs as needed). Fire-and-forget
|
||||
/// từ app.jsx (_dbgLog) để định vị delay Play/Stop không cần devtools.
|
||||
#[tauri::command]
|
||||
fn dbg_log(tag: String, extra: String) -> Result<(), String> {
|
||||
let Some(appdata) = std::env::var("APPDATA").ok() else { return Ok(()) };
|
||||
let dir = Path::new(&appdata).join("SonicForgeDAW").join("logs");
|
||||
let _ = std::fs::create_dir_all(&dir);
|
||||
let path = dir.join("dbg.log");
|
||||
let now_ms = std::time::SystemTime::now()
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
.map(|d| d.as_millis())
|
||||
.unwrap_or(0);
|
||||
let line = format!("{} {} {}\n", now_ms, tag, extra);
|
||||
use std::io::Write;
|
||||
if let Ok(mut f) = std::fs::OpenOptions::new().create(true).append(true).open(&path) {
|
||||
let _ = f.write_all(line.as_bytes());
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn transport_control(app: AppHandle, kind: String, playhead: Option<u32>) -> Result<(), String> {
|
||||
let state = app.state::<ShmState>();
|
||||
|
||||
Reference in New Issue
Block a user