From 1ad5baef14a5d1ca79e2bdaac93d445137173704 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 4 Nov 2015 13:29:30 +0000 Subject: [PATCH] Moved audio processing outside of main window --- package.json | 2 +- src/audio.html | 9 +++++++++ src/index.html | 1 - src/main.js | 12 +++++++++++- 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 src/audio.html diff --git a/package.json b/package.json index a16ac0d..47b63af 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "test": "echo \"Error: no test specified\" && exit 1", "lint": "eslint -c node_modules/eslint-config/.eslintrc 'src/'", "build": "npm run create-build-dirs && npm run build-fonts && npm run build-html && npm run build-js && npm run build-less", - "build-html": "cp src/index.html build/index.html", + "build-html": "cp src/index.html build/index.html && cp src/audio.html build/audio.html", "build-fonts": "cp -R node_modules/ionicons/fonts build/ && cp -R node_modules/bootstrap/fonts build/" }, "repository": { diff --git a/src/audio.html b/src/audio.html new file mode 100644 index 0000000..b221ae9 --- /dev/null +++ b/src/audio.html @@ -0,0 +1,9 @@ + + + + Audio Controller Window + + + + + diff --git a/src/index.html b/src/index.html index 44d81d7..853b7f7 100644 --- a/src/index.html +++ b/src/index.html @@ -11,6 +11,5 @@ - diff --git a/src/main.js b/src/main.js index b4ebc16..867de3e 100644 --- a/src/main.js +++ b/src/main.js @@ -12,6 +12,7 @@ require('crash-reporter').start(); // Start crash reporter var menu = new Menu(); Menu.setApplicationMenu(menu); var mainWindow = null; +var audioController = null; // Make sure the application closes app.on('window-all-closed', function () { @@ -30,8 +31,17 @@ app.on('ready', function () { mainWindow.toggleDevTools(); mainWindow.on('closed', function() { - mainWindow = undefined; + mainWindow = undefined; + audioController.close(); }); + + audioController = new BrowserWindow({ + width: 1, + height: 1, + hide: true, + frame: false + }); + audioController.loadUrl('file://' + __dirname + '/audio.html'); }); ipc.on('hide', function () {