Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detecting (default, type) Audio Device in windows #967

Open
Elabbasy00 opened this issue Feb 6, 2025 · 0 comments
Open

Detecting (default, type) Audio Device in windows #967

Elabbasy00 opened this issue Feb 6, 2025 · 0 comments

Comments

@Elabbasy00
Copy link

Elabbasy00 commented Feb 6, 2025

Describe the bug
si.audio() just a wrong value on windows also the default and type is always null

[{"id":"USB\\VID_046D&PID_0A8F&MI_00\\7&2DD55C4E&1&0000","name":"USB Audio Device","manufacturer":"(Generic USB Audio)","revision":null,"driver":null,"default":null,"channel":null,"type":"","in":null,"out":null,"status":"3"},{"id":"HDAUDIO\\FUNC_01&VEN_111D&DEV_7605&SUBSYS_103C3581&REV_1001\\4&340EB149&0&0001","name":"High Definition Audio Device","manufacturer":"Microsoft","revision":null,"driver":null,"default":null,"channel":null,"type":"Sound Driver","in":null,"out":null,"status":"3"},{"id":"HDAUDIO\\FUNC_01&VEN_8086&DEV_2805&SUBSYS_80860101&REV_1000\\4&340EB149&0&0301","name":"High Definition Audio Device","manufacturer":"Microsoft","revision":null,"driver":null,"default":null,"channel":null,"type":"Sound Driver","in":null,"out":null,"status":"3"}]

On a Mac, the correct name returned

To Reproduce
Steps to reproduce the behavior:

  1. used function 'si.audio()'
  2. code snippet
4. private async getAudioMetrics() {
   const audioDevices = await si.audio();
   const mic = audioDevices.find((device: any) => device.default && device.in);
   const speaker = audioDevices.find(
     (device: any) => device.default && device.out,
   );
   return {
     mic: mic?.name,
     speaker: speaker?.name,
     type: mic?.channel,
   };
 }

Current Output

[{"id":"USB\\VID_046D&PID_0A8F&MI_00\\7&2DD55C4E&1&0000","name":"USB Audio Device","manufacturer":"(Generic USB Audio)","revision":null,"driver":null,"default":null,"channel":null,"type":"","in":null,"out":null,"status":"3"},{"id":"HDAUDIO\\FUNC_01&VEN_111D&DEV_7605&SUBSYS_103C3581&REV_1001\\4&340EB149&0&0001","name":"High Definition Audio Device","manufacturer":"Microsoft","revision":null,"driver":null,"default":null,"channel":null,"type":"Sound Driver","in":null,"out":null,"status":"3"},{"id":"HDAUDIO\\FUNC_01&VEN_8086&DEV_2805&SUBSYS_80860101&REV_1000\\4&340EB149&0&0301","name":"High Definition Audio Device","manufacturer":"Microsoft","revision":null,"driver":null,"default":null,"channel":null,"type":"Sound Driver","in":null,"out":null,"status":"3"}]

Expected behavior
returning the name of the device and default and type

Environment (please complete the following information):

  • systeminformation package version: 5.25.11,
  • OS: [Windows]
  • Hardware [HP notebook]

To get all needed environment information, please run the following command:

  npx systeminformation info

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant