[Bootstrap] Add random possible Linux audio fix

This commit is contained in:
Ducko 2022-01-13 17:33:27 +00:00
parent 0f2fb56d2f
commit 913df50902

8
src/bootstrap.js vendored
View file

@ -2,6 +2,12 @@ const { app, BrowserWindow } = require('electron');
const { readFileSync } = require('fs');
const { join } = require('path');
if (process.platform === 'linux') { // Discord is a well-made app which properly implements WebRTC
if (process.env.PULSE_LATENCY_MSEC === undefined) {
process.env.PULSE_LATENCY_MSEC = 30;
}
}
log('Bootstrap', 'Forcing Electron props');
app.name = 'discord'; // Force name as sometimes breaks data path even with "discord" name (also fixes kernel?)
@ -134,7 +140,7 @@ getModuleDataPath: ${paths.getModuleDataPath()}
getInstallPath: ${paths.getInstallPath()}`);
const instanceLock = app.requestSingleInstanceLock();
const allowMultiInstance = hasArgvFlag('--multi-instance') || oaConfig.multiInstance; // argv flag or config
const allowMultiInstance = hasArgvFlag('--multi-instance') || oaConfig.multiInstance === true; // argv flag or config
console.log(instanceLock, allowMultiInstance);