Questions tagged [audio-device]

22 questions
16
votes
3 answers

Detect if headphones are plugged in or not via C#

There is no example how to detect if headphones are plugged in or not via C#. I assume should be some event for that... Does make sense to use WMI? ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\cimv2", …
NoWar
  • 36,338
  • 80
  • 323
  • 498
9
votes
2 answers

How to difference headphones from integrated audio in PC

I am using amazing NAudio framework to get the list of the audio devices. But as I see is impossible difference which audio device is PC's integrated audio and which is a headphones. I mean they have the same name and only if we plug the headphones…
NoWar
  • 36,338
  • 80
  • 323
  • 498
6
votes
0 answers

How to get all audio devices for Android APIs < 23

how can i get all device info not using the method of api 23 ? AudioDeviceInfo[] devices = audioManager.getDevices(AudioManager.GET_DEVICES_ALL); //or GET_DEVICES_OUTPUTS is there any way? In this case the target api is 19 - KitKat. Thank you.
6
votes
1 answer

Detect if headphones are plugged in or not via VBScript

Is any a way to detect if headphones are plugged in or not via VBScript? This link doesnt help Switching current active sound device using VBScript?
NoWar
  • 36,338
  • 80
  • 323
  • 498
5
votes
1 answer

How to identify the default audio device in Powershell?

I am looking for a solution to get the default audio device via Powershell. In best case, it could work via embedded C#-code to directly use IMMDeviceEnumerator::GetDefaultAudioEndpoint (see here IMMDeviceEnumertor). But if it is easier to get this…
Carsten
  • 1,612
  • 14
  • 21
5
votes
0 answers

How can I get the list of microphones on android Api 17 (usb connected mic's)

For Android Api level 23, you can use AudioRecord.setPreferredDevice(); And you can also use: AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); if (android.os.Build.VERSION.SDK_INT >=…
rosu alin
  • 5,674
  • 11
  • 69
  • 150
2
votes
2 answers

Audio Output Device Array is of length 0 on safari

I am working on a video conferencing app that leverages Amazon Chime. I have followed the npm page of Amazon Chime SDK JS and managed to get the server response and initialized the meetingSession. However, the problem is when I try to get an array…
1
vote
0 answers

Having trouble setting the Speech Synthesizer audio output

So.. ive been trying for a bit and i still cant get it to work, i was able to make it List all devices using var enumerator = new MMDeviceEnumerator(); for (int i = 0; i < WaveOut.DeviceCount;…
1
vote
0 answers

How to only list audio devices using FFmpeg?

I am doing an audio recording project using FFmpeg 5.0.1. To list all the available audio input devices for the user to select and use, I used the function avdevice_list_input_sources(). My code goes like…
1
vote
1 answer

Assertion Error: Device index out of range (0 devices available; device index should be between 0 and -1 inclusive)

I am working on a speech recognition project. I am using Google speechrecognition api. I have deployed the django project on GCP flex environment using a dockerfile. Dockerfile: FROM gcr.io/google-appengine/python RUN apt-get update RUN apt-get…
1
vote
1 answer

Is sample rate reliable?

In audio processing, say the underling library (PortAudio, in my case) gives me a binary, which represents a few seconds of audio captured from a mic, and when it is captured, it used a sample rate of sr, and the underling library tells me that this…
Incömplete
  • 853
  • 8
  • 20
1
vote
1 answer

Rerouting applications' audio to another audio device

I have Virtual Audio Cables installed, but for some applications it's hard to have them permamnently rerouted through a different audio device, seen as they're missing a specific option to change this (Spotify or your web browser). I'm wondering if…
Farcrada
  • 75
  • 1
  • 6
0
votes
0 answers

Setting MMDevice WaveFormat Keeps Reverting to Default value

I am trying to modify the open source (https://github.com/frgnca/AudioDeviceCmdlets) of "AudioDeviceCmdlets.dll" to be able to set the DeviceFormat of the default recording device. Using Windows PowerShell, I can get the current Device Format just…
Nolemonpledge
  • 139
  • 1
  • 2
  • 11
0
votes
0 answers

Getting error UPGRADE_HOST_ERROR_UNKNOWN_ID while upgrade bin for Audio Device Qualcomm

I am trying to upgrade firmware on audio device. My audio device chip is QCC512X_QCC302X.SRC.1.0 and I am using ADK_QCC512X_ROM_V21_WIN_6.4.2.25. As per App its compatible with above chip. "The command 'Upgrade Binary' is only applicable to…
0
votes
0 answers

Is there a fourth way to get the audio device (IMMDevice)

From the documentation of windows, I know that there are three ways to get the audio device: IMMDeviceCollection::Item IMMDeviceEnumerator::GetDefaultAudioEndpoint IMMDeviceEnumerator::GetDevice then I hook the three ways, And I see all of them has…
yanrk
  • 49
  • 5
1
2