Open Broadcaster Software
Free, open source software for live streaming and recording
wasapi-output.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <windows.h>
4 #include <mmdeviceapi.h>
5 #include <audioclient.h>
6 
7 #ifndef KSAUDIO_SPEAKER_2POINT1
8 #define KSAUDIO_SPEAKER_2POINT1 (KSAUDIO_SPEAKER_STEREO | SPEAKER_LOW_FREQUENCY)
9 #endif
10 
11 #define KSAUDIO_SPEAKER_SURROUND_AVUTIL \
12  (KSAUDIO_SPEAKER_STEREO | SPEAKER_FRONT_CENTER)
13 
14 #ifndef KSAUDIO_SPEAKER_4POINT1
15 #define KSAUDIO_SPEAKER_4POINT1 \
16  (KSAUDIO_SPEAKER_SURROUND | SPEAKER_LOW_FREQUENCY)
17 #endif
18 
19 #define safe_release(ptr) \
20  do { \
21  if (ptr) { \
22  ptr->lpVtbl->Release(ptr); \
23  } \
24  } while (false)