diff --git a/src/main/audio-bridge.ts b/src/main/audio-bridge.ts index f4e14f1..691df6f 100644 --- a/src/main/audio-bridge.ts +++ b/src/main/audio-bridge.ts @@ -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); diff --git a/src/main/preload.ts b/src/main/preload.ts index 9a360b3..40ef9f6 100644 --- a/src/main/preload.ts +++ b/src/main/preload.ts @@ -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),