audio: expose replaceIR over the IPC bridge

Wire the native replaceIR(slotId, path, gain) through audio-bridge (ipcMain
handle) + preload, so renderers get feedBackDesktop.audio.replaceIR. Lets the
rig-builder cab room swap a cab's IRs in place instead of a full loadPreset +
param re-apply (that re-apply was the brief 'can't move the mic yet' lag).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jafz2001
2026-07-07 23:35:33 -04:00
co-authored by Claude Opus 4.8
parent 6017c594ac
commit ce15581ca8
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -1080,6 +1080,10 @@ export function initAudioBridge(): void {
return await audio?.loadIR(irPath) ?? -1;
});
ipcMain.handle('audio:replaceIR', async (_event, slotId: number, irPath: string, gain?: number) => {
return await audio?.replaceIR(slotId, irPath, typeof gain === 'number' ? gain : -1) ?? false;
});
ipcMain.handle('audio:removeProcessor', (_event, slotId: number) => {
audio?.removeProcessor(slotId);
vstSlotPaths.delete(slotId);
+2
View File
@@ -402,6 +402,8 @@ const feedBackDesktopApi = {
loadVST: (pluginPath: string) => ipcRenderer.invoke('audio:loadVST', pluginPath),
loadNAMModel: (modelPath: string) => ipcRenderer.invoke('audio:loadNAMModel', modelPath),
loadIR: (irPath: string) => ipcRenderer.invoke('audio:loadIR', irPath),
replaceIR: (slotId: number, irPath: string, gain?: number) =>
ipcRenderer.invoke('audio:replaceIR', slotId, irPath, gain),
removeProcessor: (slotId: number) => ipcRenderer.invoke('audio:removeProcessor', slotId),
moveProcessor: (from: number, to: number) => ipcRenderer.invoke('audio:moveProcessor', from, to),
setBypass: (slotId: number, bypassed: boolean) => ipcRenderer.invoke('audio:setBypass', slotId, bypassed),