draggables, ipc stuff
This commit is contained in:
@ -15,6 +15,7 @@ import { autoUpdater } from 'electron-updater';
|
||||
import log from 'electron-log';
|
||||
import MenuBuilder from './menu';
|
||||
import { resolveHtmlPath } from './util';
|
||||
import registerFileIpcHandlers from '../ipc/audio/main';
|
||||
|
||||
class AppUpdater {
|
||||
constructor() {
|
||||
@ -108,17 +109,7 @@ const createWindow = async () => {
|
||||
return { action: 'deny' };
|
||||
});
|
||||
|
||||
ipcMain.handle('load-audio-buffer', async (event, filePath) => {
|
||||
try {
|
||||
// console.log(`Loading audio file: ${filePath}`);
|
||||
const buffer = fs.readFileSync(filePath);
|
||||
// console.log(buffer);
|
||||
return buffer;
|
||||
} catch (err) {
|
||||
return { error: err.message };
|
||||
}
|
||||
});
|
||||
|
||||
registerFileIpcHandlers();
|
||||
// Remove this if your app does not use auto updates
|
||||
// eslint-disable-next-line
|
||||
new AppUpdater();
|
||||
|
||||
Reference in New Issue
Block a user