Questions tagged [wasapi]

The Windows Audio Session API (WASAPI) enables client applications to manage the flow of audio data between the application and an audio endpoint device.

The Windows Audio Session API (WASAPI) enables client applications to manage the flow of audio data between the application and an audio endpoint device.

For more details see msdn.microsoft.com.

234 questions
0
votes
1 answer

Windows 11: Audio channels are swapped on a 5.1 system with DirectSound, but WASAPI works

Setup Intel NUC 11 as HTPC -> HDMI-CEC -> Denon AVR-X2500H -> HDMI-CEC -> LG 55SJ800V Steps to reproduce Note, I tried Ubuntu 22.04 first, but to avail. Best I got was stereo output after 2 days of trouble. Hence, I installed Windows 11 Pro,…
fuggi
  • 321
  • 5
  • 14
0
votes
1 answer

Persistent audio discontinuity in Debug mode for WASAPI loopback capture

I am writing a program that captures the output on a Windows device using WASAPI loopback capture. In principle it works correctly, but it breaks whenever I try to debug it, after continuing from a breakpoint. I can reproduce this in Windows' own…
Yellow
  • 3,955
  • 6
  • 45
  • 74
0
votes
1 answer

Where is defined the actual value of the AUDCLNT_SHAREMODE_SHARED for Windows WASAPI?

In audiosessiontypes.h is "typedef enum _AUDCLNT_SHAREMODE" but not exact value of the AUDCLNT_SHAREMODE_SHARED. Not found in the Windows 10 SDK or on the Internet.
SVT2
  • 5
  • 1
0
votes
1 answer

ISimpleAudioVolume G/SetMute not updating

Solution: I reference the pointer of a variable instead of the variable itself. Thank you @RomanR. I'm trying to use GetMute/SetMute through ISimpleAudioVolume, and I'm having trouble with what I'm seeing. When I run GetMute I can see that it's not…
0
votes
0 answers

LoopbackCapture (`ActivateAudioInterfaceAsync` with `VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK` ), m_AudioClient->GetMixFormat failed with E_NOTIMPL

I use the applicationloopbackaudio-sample to record system audio, it works fine. However, the capture format is hard coded: // The app can also call m_AudioClient->GetMixFormat instead to get the capture format. // 16 - bit PCM format. …
TianpingHsu
  • 91
  • 2
  • 5
0
votes
0 answers

IAudioClient->Initialize() fails with 0x80070016 - HRESULT_FROM_WIN32(ERROR_BAD_COMMAND) : The device does not recognize the command

I am writing a WASAPI app. I have an external audio interface and the onboard Realtek audio card. I seem to have a problem running render devices in exclusive mode. No matter what I do and what the user chooses, the app crashes on initialization.…
damix911
  • 4,165
  • 1
  • 29
  • 44
0
votes
0 answers

Does wasapi support device which has 8 audio channels?

I tried to use wasapi to record system's playout audio, but if the audio device has 8 channels, I always get the error (AUDCLNT_E_UNSUPPORTED_FORMAT) "m_captureClient->Initialize" would return AUDCLNT_E_UNSUPPORTED_FORMAT. But if the device is…
TONY
  • 101
  • 7
0
votes
1 answer

Is it possible apply audio effects to all sounds coming out of a specific audio endpoint

I have been looking around online for an answer for some days now, without any luck. So now, I hope one of you might be able to help point me in the right direction. WHAT I AM TRYING TO DO: I want to build a C# application where I can apply…
Kasper
  • 35
  • 7
0
votes
1 answer

Windows Microphone session volume change using wasapi

I implemented to change microphone volume using wasapi. https://learn.microsoft.com/en-us/windows/win32/api/_coreaudio/ The program will get default mic device, and initialize IAudioClient. IAudioCaptureClient will be set from IAudioClient (use…
0
votes
0 answers

WASAPI, Delays on m_AudioClient->Start()

The app captures sound from a microphone using WASAPI. This code initializes m_AudioClient that is of type IAudioClient*. const LONG CAPTURE_CLIENT_LATENCY = 50 * 10000; DWORD loopFlag = m_IsLoopback ? AUDCLNT_STREAMFLAGS_LOOPBACK : 0; hr =…
Ashot
  • 10,807
  • 14
  • 66
  • 117
0
votes
1 answer

Why is AUDCLNT_E_ENDPOINT_CREATE_FAILED triggered when I use WASAPI to create an audio endpoint on a Windows computer?

I used Core Audio to collect audio on a Windows computer. There was no problem at first, but after calling the initialize interface many times, the AUDCLNT_E_ENDPOINT_CREATE_FAILED error message appeared. Does anyone know the reason? API link is as…
Ivan
  • 1
  • 1
0
votes
0 answers

Record from mic and speaker at the same time using wasapi

Hello i've trying to use wasapi to record and playback using two threads but I encountered one problem which is I don't know how to save the both streams in one buffer is there a way to do that like mixing the two buffer in one wave file without…
Bin
  • 1
0
votes
1 answer

Understanding WASAPI Acoustic Echo Cancellation (AEC) and loopback audio capture

I have one application based on webrtc. Currently I need to capture the system audio(by wasapi),but the mixed captured audio contains the audio stream which is my application's, if I send this audio stream to peer, he would listen echo. The article…
TONY
  • 101
  • 7
0
votes
1 answer

What is the structure of a NAudio capture?

I am trying to send over PCM audio using UDP via WLAN. The audio I am trying to send is the data I get from NAudio's WasapiLoopBackCapture(). When the DataAvailable event is called I send the whole buffer in one message: var capture = new…
GoRgo 3
  • 13
  • 3
0
votes
0 answers

Recording internal sound and microphone with NAudio

I need to record an internal sound and microphone sound simultaneously. So, I'm using 2 parallel tasks: WasapiLoopbackCapture class for an internal sound recording and WaveInEvent class for microphone sound recording. It works good for computer's…
Rougher
  • 834
  • 5
  • 19
  • 46