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
24
votes
1 answer

How to get below 10ms latency using WASAPI shared mode?

According to Microsoft, starting with Windows 10, applications using shared-mode WASAPI can request buffer sizes smaller than 10ms (see https://msdn.microsoft.com/en-us/library/windows/hardware/mt298187%28v=vs.85%29.aspx). According to the article,…
Sjoerd van Kreel
  • 1,000
  • 6
  • 19
13
votes
3 answers

Peak meters for individual programs on Windows 7

Is it possible to obtain the peak meter readings for individual programs on Windows 7, and if so, how? With WASAPI one can capture the entire system audio through a loopback device, but this does not differentiate between outputs from different…
jonathanasdf
  • 2,844
  • 2
  • 23
  • 26
10
votes
2 answers

How is SndVol able to change the volume level of a given audio session?

I am writing my own API to perform some of the functionality of the SndVol system utility. I would like part of this API to be the ability to set the volume level of a given audio session. SndVol displays a slider on the "Device" panel that the user…
Joseph Trebbien
  • 309
  • 1
  • 3
  • 8
9
votes
3 answers

How to record audio with WasapiLoopbackCapture when no voice is coming out from speaker in c#?

The below is my sample code to record audio coming from a speaker. It is working fine. But it is recording audio only when some audio is coming out from speaker. If there is no audio then it is not recording. Actually i am doing screen recording…
9
votes
2 answers

COM Interop in Mono 2.0

I am trying to use this code in a Unity project, but it seems the implementations of COM Interop in Mono/.NET differs, which causes the code to fail or crash. Running the code in .NET works fine, but running it with Mono 2.0 (outside of Unity) fails…
Johan
  • 780
  • 7
  • 22
8
votes
1 answer

Directing microphone input to speakers and writing a custom DSP function with CSCore library

CSCore (https://github.com/filoe/cscore) seems to be a very good audio library for C# but it lacks documentation and good examples. I've been playing with Bass.Net for a long time and the architecture of CSCore is not like the Bass library so it is…
Ahmet Uzun
  • 91
  • 7
8
votes
2 answers

Getting individual windows application current volume output level as visualized in audio Mixer

I am trying to write a C# code that outputs the current audio output level from each of the windows application accessing the sound output (as shown with constantly changing green bars of the Volume mixer). The program will check every 10 ms, and…
mio
  • 159
  • 1
  • 1
  • 12
6
votes
2 answers

Capture audio of a single application on Windows 7

Is there a way to capture the audio outputted by only a single application, and not the system as a whole? With WASAPI I can capture the entire system audio, but I wish to only capture the audio from one application (there will be many applications,…
Isaac Waller
  • 32,709
  • 29
  • 96
  • 107
6
votes
1 answer

Why can't I set master volume for USB/Firewire Audio interface with IAudioEndpointVolume::SetMasterVolumeLevelScalar

I am trying to fix an Audacity bug that revolves around portmixer. The output/input level is settable using the mac version of portmixer, but not always in windows. I am debugging portmixer's window code to try to make it work there. Using…
Michael Chinen
  • 17,737
  • 5
  • 33
  • 45
5
votes
1 answer

NAudio's BufferedWaveProvider gets full when recording and mixing an audio

I'm having an issue with a BufferedWaveProvider from NAudio library. I'm recording 2 audio devices (a microphone and a speaker), merge them into 1 stream and send it to an encoder (for a video). To do this, I do the following: Create a thread where…
Veler
  • 161
  • 2
  • 13
5
votes
1 answer

API for supporting Echo Cancellation in Windows Vista/7

In 2007, during the fever over DRM being included in Windows Vista, a Windows Vista Team blog was created to respond to a lot of the concerns. One of the questions responded to the ability of VoIP software to perform echo cancellation when running…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
5
votes
1 answer

When was support for AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM added to WASAPI?

Does anyone know when support for the AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM stream flag was added to WASAPI? MSDN mentions this flag briefly, but doesn't go into much detail regarding its use and which versions of Windows support this. I'm using the…
Shane Kirk
  • 301
  • 2
  • 8
4
votes
2 answers

audio capture in metro apps

I need to perform low-level audio capture in my Windows 8 Metro-style app. I guess I need to use the IAudioClient interface, but how to get that interface? Microsoft says "A client obtains a reference to an IAudioClient interface for an audio…
Jeff McClintock
  • 1,242
  • 10
  • 27
4
votes
0 answers

WasapiLoopbackCapture is receiving silence on some devices when speakers are muted

I am using NAudio library and recording "what you hear" using its WasapiLoopbackCapture in a very simplistic way: var outputFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "NAudio"); …
forlayo
  • 1,371
  • 2
  • 13
  • 23
4
votes
0 answers

how to create a virtual audio input/output device on Windows in C++

background: I want to broadcast the Windows system audio except my own app's one. application loopbackcapture exactly does what I want, but it only supports Windows 11 (I want a much more general solution, Windows 7/8/10/11). current…
TianpingHsu
  • 91
  • 2
  • 5
1
2 3
15 16