diff --git a/package.json b/package.json index 30d066b..aff0469 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "arrpc": "github:OpenAsar/arrpc#6960a8fd4d65d566da93dbdb8a7ca474aa0a3c9c" }, "optionalDependencies": { - "@vencord/venmic": "^5.0.0" + "@vencord/venmic": "^6.0.0" }, "devDependencies": { "@fal-works/esbuild-plugin-global-externals": "^2.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 297aec2..a2889f4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,8 +13,8 @@ importers: version: https://codeload.github.com/OpenAsar/arrpc/tar.gz/6960a8fd4d65d566da93dbdb8a7ca474aa0a3c9c optionalDependencies: '@vencord/venmic': - specifier: ^5.0.0 - version: 5.0.0 + specifier: ^6.0.0 + version: 6.0.0 devDependencies: '@fal-works/esbuild-plugin-global-externals': specifier: ^2.1.2 @@ -603,8 +603,8 @@ packages: '@vencord/types@1.8.4': resolution: {integrity: sha512-ogLqIOHVO+5zxKUVxAfGIAUZoEfIomrlg6f0cZ/2yd5vBAn1fA9Gi/NASoKfHZuJt8ZcYw329bgn0ah/VufqMg==} - '@vencord/venmic@5.0.0': - resolution: {integrity: sha512-28gPNLCZwjWk/r+J4Rg1Hgfp8apmFlkahGaADPASIbQ6lUjX2PVgOv4pxIPhsgMy1aZPaBwAIOeEVPoAKk6MCw==} + '@vencord/venmic@6.0.0': + resolution: {integrity: sha512-PpeUA1L1ApnNRGnFEkl3UVYobhho5zAJJCmj98vhhKHoPcolbfotcfxCSWkXY4sHmRc2OPGzjQpr9Ut5f7CqLg==} engines: {node: '>=14.15'} os: [linux] @@ -3034,7 +3034,7 @@ snapshots: standalone-electron-types: 1.0.0 type-fest: 3.13.1 - '@vencord/venmic@5.0.0': + '@vencord/venmic@6.0.0': dependencies: cmake-js: 7.3.0 node-addon-api: 8.0.0 diff --git a/src/main/venmic.ts b/src/main/venmic.ts index 829cda1..ab45bdc 100644 --- a/src/main/venmic.ts +++ b/src/main/venmic.ts @@ -81,14 +81,14 @@ ipcMain.handle(IpcEvents.VIRT_MIC_LIST, () => { ipcMain.handle(IpcEvents.VIRT_MIC_START, (_, targets: Node[]) => { const pid = getRendererAudioServicePid(); + const settings = Settings.store; const data: LinkData = { include: targets, - exclude: [{ "application.process.id": pid }] + exclude: [{ "application.process.id": pid }], + ignore_devices: settings.audioIgnoreDevices }; - const settings = Settings.store; - if (settings.audioIgnoreInputMedia ?? true) { data.exclude?.push({ "media.class": "Stream/Input/Audio" }); } @@ -106,11 +106,12 @@ ipcMain.handle(IpcEvents.VIRT_MIC_START, (_, targets: Node[]) => { ipcMain.handle(IpcEvents.VIRT_MIC_START_SYSTEM, () => { const pid = getRendererAudioServicePid(); - const settings = Settings.store; const data: LinkData = { exclude: [{ "application.process.id": pid }], + only_speakers: settings.audioOnlySpeakers, + ignore_devices: settings.audioIgnoreDevices, only_default_speakers: settings.audioOnlyDefaultSpeakers }; diff --git a/src/renderer/components/ScreenSharePicker.tsx b/src/renderer/components/ScreenSharePicker.tsx index 483f642..f8ef1cc 100644 --- a/src/renderer/components/ScreenSharePicker.tsx +++ b/src/renderer/components/ScreenSharePicker.tsx @@ -188,6 +188,7 @@ function AudioSettingsModal({ (Settings.audioWorkaround = v)} value={Settings.audioWorkaround ?? false} note={ @@ -199,11 +200,29 @@ function AudioSettingsModal({ > Microphone Workaround + (Settings.audioOnlySpeakers = v)} + value={Settings.audioOnlySpeakers ?? true} + note={ + <> + When sharing entire desktop audio, only share apps that play to a speaker. You may want to + disable this when using "mix bussing". + + } + > + Only Speakers + (Settings.audioOnlyDefaultSpeakers = v)} value={Settings.audioOnlyDefaultSpeakers ?? true} - note={<>When sharing entire desktop audio, only share apps that play to the default speakers.} + note={ + <> + When sharing entire desktop audio, only share apps that play to the default speakers. + You may want to disable this when using "mix bussing". + + } > Only Default Speakers @@ -221,13 +240,21 @@ function AudioSettingsModal({ value={Settings.audioIgnoreVirtual ?? true} note={ <> - Exclude virtual nodes, such as nodes belonging to sinks, this might be useful when using - "mix bussing" + Exclude virtual nodes, such as nodes belonging to sinks. This might be useful when using + "mix bussing". } > Ignore Virtual + (Settings.audioIgnoreDevices = v)} + value={Settings.audioIgnoreDevices ?? true} + note={<>Exclude device nodes, such as nodes belonging to microphones or speakers.} + > + Ignore Devices + { diff --git a/src/shared/settings.d.ts b/src/shared/settings.d.ts index 0efff76..596f30b 100644 --- a/src/shared/settings.d.ts +++ b/src/shared/settings.d.ts @@ -35,7 +35,10 @@ export interface Settings { audioGranularSelect?: boolean; audioIgnoreVirtual?: boolean; + audioIgnoreDevices?: boolean; audioIgnoreInputMedia?: boolean; + + audioOnlySpeakers?: boolean; audioOnlyDefaultSpeakers?: boolean; }