mirror of
https://github.com/got-feedBack/feedBack-desktop.git
synced 2026-09-11 06:04:10 +00:00
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:
co-authored by
Claude Opus 4.8
parent
6017c594ac
commit
ce15581ca8
@@ -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);
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user