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

How to record an input device with more than 2 channels to mp3 format

I am building a recording software for recording all connected devices to PC into mp3 format. Here is my code: IWaveIn _captureInstance = inputDevice.DataFlow == DataFlow.Render ? new WasapiLoopbackCapture(inputDevice) : new…
Rougher
  • 834
  • 5
  • 19
  • 46
4
votes
1 answer

Windows Vista/7: How to sample output audio mix?

How can i gain access to the current wave output sample stream? In a December 2006 question on social.microsoft.com (How to record from 'Wave' or 'Stereo Mix' in Vista?) yjslash asked: On Windows XP or earlier, I could capture the audio stream to…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
4
votes
1 answer

How to capture audio on c++ UWP app with WASAPI?

I can not seem to find any tutorial on the internet for my question. All the simple guide is not suitable for UWP. For Example, To use WASAPI there are these steps enumerate devices capture audio play (render) audio back But the enumerating step,…
Ntk
  • 155
  • 1
  • 10
4
votes
0 answers

CSCore - Play audio from MemoryStream

I am new to CsCore. Need some help. I want to build an Audio Recorder, which is able to record mic and Speakers into a file and an external Recorder device. I have successfully finished recording to file. Now I want just the same thing once again,…
Lama
  • 159
  • 1
  • 7
4
votes
1 answer

Interpreting WAVEFORMATEXTENSIBLE from IAudioClient::GetMixFormat

I'm learning about Windows Core Audio APIs. Using this Rendering a Stream example, I'm finding that IAudioClient::GetMixFormat returns an ambiguous WAVEFORMATEXTENSIBLE that looks like this: Format wFormatTag = WAVE_FORMAT_EXTENSIBLE…
Adrian McCarthy
  • 45,555
  • 16
  • 123
  • 175
4
votes
2 answers

WASAPI: Play sine wave sound in minimum latency without glitches (exclusive-event driven mode)

I'm trying to play a simple sineous waveform using the Windows Audio Session API (WASAPI) in exclusive mode, but encountering sound glitches no matter what I do. I've been using the MSDN Exclusive-Mode Streams example as a reference point, and…
ehoopz
  • 139
  • 3
  • 10
4
votes
0 answers

How to detect a buffer underflow with WASAPI?

Using the Windows Audio Session API, how does one detect a buffer underflow, also known as buffer underrun?
andrewrk
  • 30,272
  • 27
  • 92
  • 113
4
votes
0 answers

WASAPI Resampling / Windows Media Foundation

I'm writing a Pro Audio application using WASAPI. This application runs a stream in exclusive mode, and resamples the audio data to and from a constant format in both directions (one resample between the capture device and the app, and another…
NmdMystery
  • 2,778
  • 3
  • 32
  • 60
4
votes
0 answers

Method for audio playback with known output latency on Windows

I have a C++ application that receives a timestamped audio stream and attempts to play the audio samples as close as possible to the specified timestamp. To do so I need to know the delay (with reasonable accuracy) from when I place the audio…
jensnielsen
  • 191
  • 1
  • 6
3
votes
1 answer

How do I get information out of IMMDevice?

I'm a complete beginner with regards to IMMDevice, and I need to ask what a good, easy way to get some device out of information out of it is. In my program, I've already successfully set a pointer to one of those with GetDefaultAudioEndpoint(). …
Panzercrisis
  • 4,590
  • 6
  • 46
  • 85
3
votes
0 answers

Encoding and decoding audio using opus - WINDOWS?

I am trying to capture audio from the default device and stream with the help of OPUS. The audio from the device is captured using WASAPI. Encoding and decoding is done using OPUS where the states are created initially. Initialization…
3
votes
1 answer

Record an audio stream with WASAPI

I'm reading documentation such as Capturing a stream or Loopback recording, but I can't find a good reproducible example (with includes, build instructions, etc.) about how to record chunks from a Loopback audio device (sometimes called "What you…
Basj
  • 41,386
  • 99
  • 383
  • 673
3
votes
1 answer

How to make named pipe accessible for non-elevated processes?

Problem: I created a service, which is supposed to run under elevated privileges. Now I have an application accessible to users. The application wants to speak to the service via a named pipe. The named pipe is created by the service. However I…
dev_null
  • 1,907
  • 1
  • 16
  • 25
3
votes
1 answer

Windows application volume mixer

I would like to list the applications displayed in the windows volume mixer. In this example, "sons systeme", "Windows" and "spotify" I write some code and I´m able to count and list those applications. The problem is I cant fetch their name nor…
Erwan Douaille
  • 553
  • 1
  • 10
  • 31
3
votes
1 answer

Resample loopback capture

I successfully captured sound from Wasapi using the following code: IWaveIn waveIn = new WasapiLoopbackCapture(); waveIn.DataAvailable += OnDataReceivedFromWaveOut; What I need to do now, is to resample the in-memory data to pcm with a sample rate…
Samy Massoud
  • 4,295
  • 2
  • 35
  • 48
1
2
3
15 16