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
1
vote
1 answer

IMFTransform SetInputType()/SetOutputType() fails

I'm trying to playback MP3 (and similar audio files) using WASAPI shared mode and a media foundation IMFSourceReader on Windows 7. From what I understand I have to use an IMFTransform between the IMFSourceReader decoding and the WASAPI playback. …
iam
  • 1,623
  • 1
  • 14
  • 28
1
vote
0 answers

Record audio with CaptureSharedEventDriven not set time

In CaptureSharedEventDriven recording time is put in TargetDurationInSec and they set size of buffer is size_t captureBufferSize = capturer->SamplesPerSecond() * TargetDurationInSec * capturer->FrameSize() How to record audio without…
user14470640
1
vote
1 answer

Programatically setting the playback device for an application

Does anyone know if it is possible to set the audio playback device programatically on Windows 7? (I've seen quite a few posts on this but no 'good' answers). I don't really want to change the default playback device. E.g. If I have 2 sound cards…
user457588
  • 331
  • 5
  • 11
1
vote
1 answer

Why does WASAPI loopback capture produce variable buffers?

Using NAudio to capture a microphone records the exact same amount of buffer data every single time. But I'm trying to use WASAPI Loopback Capture and getting many packets that are larger than I would expect. Using a setting of 500ms for…
Joshua Frank
  • 13,120
  • 11
  • 46
  • 95
1
vote
1 answer

How to modify WASAPI loopback capture volume when the volume of the system gets modified?

I'm using WASAPI with loopback capture mode to record the audio of my Windows 10 laptop soundcard. I followed the example here: https://learn.microsoft.com/en-us/windows/win32/coreaudio/capturing-a-stream and it works perfectly. However, when I mute…
philippemnoel
  • 21
  • 1
  • 3
1
vote
0 answers

ManagedBass Wasapi dll UWP

I have to retrieve the device output data to create a stream with ManagedBass.Wasapi.dll, but an error is returned despite having copied the basswasapi.dll to the system32 folder and to the app's debug folder. MainPage.xaml.cs: private void…
Prino
  • 19
  • 4
1
vote
0 answers

[windows wasapi, visual studio 2017 c++ project]cannot resolve symbol PKEY_AudioEndpoint_FormFactor

When I use Windows WASAPI to get the audio device properties, the following 3 properties compiled good, PKEY_Device_FriendlyName PKEY_Device_DeviceDesc PKEY_DeviceInterface_FriendlyName but when I use PKEY_AudioEndpoint_FormFactor, the Visual…
1
vote
1 answer

Trying to create a wav file with 'Capturing a Stream" from Win32 WASAPI C++

I'm having trouble attempting to interpret (BYTE* pData) audio data that the getBuffer function returns. I'm attempting to write captured audio from my mic into a wav file I myself am constructing all for the purpose of better understanding audio…
oaguilar
  • 11
  • 2
1
vote
1 answer

No audio output from one of two streams when rendering directly to WASAPI

I've been stuck on this problem for weeks now and Google is no help, so hopefully some here can help me. I am programming a software sound mixer in C++, getting audio packets from the network and Windows microphones, mixing them together as PCM, and…
Tustin2121
  • 2,058
  • 2
  • 25
  • 38
1
vote
1 answer

Synchronization of WASAPI Audio Devices

Is there a way with WASAPI to determine if two devices (an input and an output device) are both synced to the same underlying clock source? In all the examples I've seen input and output devices are handled separately - typically a different thread…
Brad Robinson
  • 44,114
  • 19
  • 59
  • 88
1
vote
1 answer

rendering an audio stream (WASAPI / WINAPI )

i'm currently reading the documentation of MSDN to render a stream to an audio renderer.. or in other word, to play my captured data from microphone. http://msdn.microsoft.com/en-us/library/dd316756%28v=vs.85%29.aspx this example provides…
Aguk Kuga
  • 21
  • 1
  • 3
1
vote
1 answer

How to access audio waveform buffer when recording using WASAPI in c++?

I've used winmm library to access the waveform information before with syntax like this waveInAddBuffer(hwi, &wh[i], sizeof(WAVEHDR)); So I've to pass the pointer that point to the memory block (&wh[i]) where I want to store the waveform data, In…
BombShelley
  • 107
  • 9
1
vote
0 answers

How can I subscribe on c# stream from python using pythonnet?

I need to analyze loopbackcapture stream with python. I didn't found any python wrappings for wasapi loopbackcapture, so I had to use c# (in which I don't have any experience). For now I have c# assembly dll which is wrappings to…
Roman Makarov
  • 323
  • 3
  • 9
1
vote
0 answers

WASAPI capture data is only 00 and FF

If I open the captured PCM data with a Hex eitor they are only combinations of 00 and FF bytes.It seems to capture only static noise on my laptop and pc.On my pc, the recording device (Stereo Mix - Realtek High Definiton Audio) and on my laptop I…
Josh
  • 49
  • 1
  • 6
1
vote
2 answers

WASAPI shared mode: What amplitude does the audio engine expect?

I previously messed up with this question. I made it sound as though I'm asking about my particular implementation, but my question is actually about the general topic. I am pretty confident, that my implementation is OK. So I am rewriting this…
egst
  • 1,605
  • 3
  • 18
  • 25