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
3
votes
0 answers

How to set microphone boost in C# using WASAPI

I am trying to use WASAPI in C# but I could not even find which dll to reference in Visual Studio. Should I reference a dll in COM assemblies or download one from Microsoft website and reference it? Is there any documentation how to use the WASAPI…
Yusuf Tarık Günaydın
  • 3,016
  • 2
  • 27
  • 41
3
votes
2 answers

WASAPI GetDisplayName returns blank

I am trying to write a program that interfaces with Windows Core Audio and WASAPI. I am having difficulty with the following couple lines. CComHeapPtr name; hr = pAudioSessionControl->GetDisplayName(&name); if (FAILED(hr)) { …
Jacky4566
  • 31
  • 3
3
votes
1 answer

WASAPI: Choosing a wave format for exclusive output

I'm trying to open an exclusive stream with an output device using WASAPI. I'm having trouble choosing an acceptable format, since there appear to be no hints as to what formats are accepted by a given device. In my case,…
NmdMystery
  • 2,778
  • 3
  • 32
  • 60
3
votes
1 answer

WASAPI AudioClient.GetMixFormat() returns AUDCLNT_E_NOT_INITIALIZED

I'm attempting to use AudioClient interface for the first time, without luck. So far I managed to get the default AudioClient interface using the successfully MMDeviceEnumerator and MMDevice interfaces: CoCreateInstance( …
user2440253
  • 31
  • 1
  • 2
3
votes
4 answers

Captured audio buffers are all silent on Windows Phone 8

I'm trying to capture audio using WASAPI. My code is largely based on the ChatterBox VoIP sample app. I'm getting audio buffers, but they are all silent (flagged AUDCLNT_BUFFERFLAGS_SILENT). I'm using Visual Studio Express 2012 for Windows Phone.…
oferei
  • 1,610
  • 2
  • 19
  • 27
3
votes
1 answer

WASAPI - trouble with CoCreateInstance method

I am trying to capture audio from the mic using the windows core audio APIs The relevant lines of code are const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator); const IID IID_IMMDeviceEnumerator =…
3
votes
2 answers

Problems with WASAPI

I'm developing audio code for a program that needs to be able to record and playback on a variety of devices, some of them high end, with a variety of different wav and AIFF formats. I expected to be able to use the WASAPI library, but I'm hitting…
TomJeffries
  • 558
  • 1
  • 8
  • 25
2
votes
1 answer

How to control the Microphone Boost in Windows 7?

I am trying to control the Microphone Boost (level/(un)mute) in Windows 7 using the MIXER API in a C/C++ application, but I do not get the controls for the same. Can it be done using WASAPI? Can somebody suggest any other API to control the…
Iman
  • 21
  • 2
  • 4
2
votes
1 answer

WASAPI: IAudioClient->Initialize succeeds even when IAudioClient->IsFormatSupported fails with same format

I am trying to find out which output formats are supported by a specific audio device in exclusive mode. To do this, I am using IAudioClient->IsFormatSupported(), which according to the documentation should be usable for this. Unfortunately, it…
Adion
  • 579
  • 1
  • 9
  • 21
2
votes
1 answer

Create a gstreamer sink that appears in the list of audio devices on Windows

I would like to write a gstreamer pipeline that mixes the audio from two sources. I then want to be able to select an audio source from an app on my computer, i.e. Discord, such that the mixed audio will play as if it was coming from my mic. It…
rpecka
  • 1,168
  • 5
  • 17
2
votes
1 answer

Correctly setting up MMDevice in a DirectX project

I am currently trying to piece together a shader-based music visualizer. The plan is to read data from the current MMDevice, which I'm trying to follow the documentation for, but I must be doing something wrong because I had to jump through all…
noahbkim
  • 528
  • 2
  • 13
2
votes
0 answers

How to get a meaningful value for PROPERTYKEY from OnPropertyValueChanged()

I am implementing the callback methods from MMNotificationClient to get notified of audio device changes. When I change the "spatial sound" settings for the Windows audio driver, then MMNotificationClient::OnPropertyValueChanged() gets called…
j b
  • 5,147
  • 5
  • 41
  • 60
2
votes
1 answer

capturing bluetooth audio data with WASAPI

I'm working on a small project where I need to mix incoming data from my internal microphone and a bluetooth headset (Bose). I thought I'd use WASAPI for it. However, whilst I can easily read out my internal microphone, this is not the case for my…
DYD35
  • 121
  • 1
  • 7
2
votes
1 answer

What is the expected effect of using IAudioClient2::SetClientProperties on a capture client in Windows 10?

The specification of IAudioClient2::SetClientProperties contains only one parameter but is it not clear to me what to expect from the API given the existing documentation. The parameter is given by: typedef struct AudioClientProperties { UINT32 …
2
votes
0 answers

Why is `IAudioMeterInformation` an incomplete type?

Trying to compile the following with g++ main.cpp -lwinmm throws the following errors: main.cpp: In function 'int main()': main.cpp:15:15: error: invalid use of incomplete type 'IAudioMeterInformation' {aka 'struct IAudioMeterInformation'} …
GirkovArpa
  • 4,427
  • 4
  • 14
  • 43
1 2
3
15 16