mirror of
https://github.com/got-feedBack/feedBack-desktop.git
synced 2026-08-11 03:09:56 +00:00
fix(audio): surface real audio input device names (not "Desktop input N") (#32)
registerAudioSessionInputSources() discarded the real device name (the
forEach arg was `_deviceName`) and labelled every audio-input source with a
generic `Desktop input ${index+1}` pseudonym — so the audio-input picker
showed "Desktop input 1/2/…" instead of the actual device names. The real
names are already available: AudioEngine reads JUCE getDeviceNames(true),
NodeAddon exposes them as typeInfo.inputs, and the renderer already uses
them for setDevice(). Use that name as the source label, falling back to the
generic form only when it's empty.
(Re-applies a fix that previously lived on the dead byrongamatos/slopsmith-
desktop branch and never reached got-feedback/main.)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
7b7a5b59da
commit
f18b0a51fd
@@ -323,15 +323,18 @@ window.__slopsmithDesktopAudioHooks = window.__slopsmithDesktopAudioHooks || {};
|
||||
typeList.forEach((typeInfo) => {
|
||||
const typeName = typeInfo && typeInfo.name ? String(typeInfo.name) : '';
|
||||
const inputs = Array.isArray(typeInfo && typeInfo.inputs) ? typeInfo.inputs : [];
|
||||
inputs.forEach((_deviceName, index) => {
|
||||
inputs.forEach((deviceName, index) => {
|
||||
const logicalSourceKey = `desktop-audio:${safeKeyPart(typeName)}:input:${index}`;
|
||||
const realName = (typeof deviceName === 'string' && deviceName.trim())
|
||||
? deviceName.trim()
|
||||
: `Desktop input ${index + 1}`;
|
||||
audioSession.registerInputSource({
|
||||
sourceId: `audio_engine:${logicalSourceKey}`,
|
||||
logicalSourceKey,
|
||||
providerId: 'audio_engine',
|
||||
ownerPluginId: 'audio_engine',
|
||||
kind: 'instrument',
|
||||
labelPseudonym: `Desktop input ${index + 1}`,
|
||||
labelPseudonym: realName,
|
||||
labelSafe: true,
|
||||
availability: 'available',
|
||||
sourceMode: 'native',
|
||||
|
||||
Reference in New Issue
Block a user