enhancements
This commit is contained in:
parent
1c452d406b
commit
0f987bc481
7 changed files with 50 additions and 36 deletions
|
|
@ -14,12 +14,12 @@ protocol.registerSchemesAsPrivileged([
|
|||
]);
|
||||
|
||||
// Load environment variable
|
||||
const isDevelopment = process.env.NODE_ENV !== "production";
|
||||
const isDev = require('electron-is-dev');
|
||||
|
||||
// NOTE Program Begins Here
|
||||
(async () => {
|
||||
|
||||
console.log('Starting Crimata electron app.');
|
||||
initApp(isDevelopment);
|
||||
initApp(isDev);
|
||||
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -165,15 +165,15 @@ export function play(input: string): void {
|
|||
// -------------------------------------------------------------
|
||||
|
||||
// Get's called on window close.
|
||||
export function stopStream() {
|
||||
console.log("AUDIO:Stopping audio stream.")
|
||||
if (ai) {
|
||||
ai.quit()
|
||||
}
|
||||
if (ao) {
|
||||
ao.quit()
|
||||
}
|
||||
console.log("AUDIO:Audio closed.")
|
||||
}
|
||||
// export function stopStream() {
|
||||
// console.log("AUDIO:Stopping audio stream.")
|
||||
// if (ai) {
|
||||
// ai.quit()
|
||||
// }
|
||||
// if (ao) {
|
||||
// ao.quit()
|
||||
// }
|
||||
// console.log("AUDIO:Audio closed.")
|
||||
// }
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -56,17 +56,9 @@ export function initApp(dev: boolean): void {
|
|||
|
||||
// Exit cleanly on request from parent process in development mode.
|
||||
if (dev) {
|
||||
if (process.platform === "win32") {
|
||||
process.on("message", data => {
|
||||
if (data === "graceful-exit") {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
process.on("SIGTERM", () => {
|
||||
app.quit();
|
||||
});
|
||||
}
|
||||
app.quit();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue