Skip to content

Commit

Permalink
wasapi: improved including
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPulec committed Jul 30, 2024
1 parent 340b026 commit f819dee
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 15 deletions.
27 changes: 20 additions & 7 deletions src/audio/capture/wasapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,40 @@
* Probe and help are almost similar - consolide common code.
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config_unix.h"
#include "config_win32.h"
#endif

#include <audiosessiontypes.h> // for AUDCLNT_STREAMFLAGS_LOOPBACK, _AUDC...
#include <audioclient.h>
#include <basetsd.h> // for HRESULT, UINT, LPWSTR, GUID, UINT32
#include <cctype> // for isdigit
#include <cstdio> // for mesnprintf
#include <cstdlib> // for realloc, atoi, malloc, mbtowc, free
#include <cstring> // for NULL, memset, strcmp, strlen, wcslen
#include <combaseapi.h> // for CoTaskMemFree, CoCreateInstance
#include <guiddef.h> // for IsEqualGUID
#include <iomanip>
#include <iostream>
#include <mfapi.h>
#include <ksmedia.h> // for KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
#include <mediaobj.h> // for REFERENCE_TIME
#include <mmeapi.h> // for WAVEFORMATEX, WAVE_FORMAT_PCM
#include <mmdeviceapi.h>
#include <mmreg.h> // for PWAVEFORMATEXTENSIBLE, WAVE_FORMAT_...
#include <objbase.h> // for STGM_READ
#include <propidl.h> // for PropVariantClear, PropVariantInit
#include <propsys.h> // for IPropertyStore
#include <sstream>
#include <string>
#include <windows.h>
#include <synchapi.h> // for Sleep
#include <winerror.h> // for SUCCEEDED, S_OK, FAILED

#include "audio/audio_capture.h"
#include "audio/types.h"
#include "debug.h"
#include "host.h" // for audio_capture_channels, audio_captu...
#include "lib_common.h"
#include "types.h" // for device_info
#include "ug_runtime_error.hpp"
#include "utils/color_out.h"
#include "utils/macros.h" // for snprintf_ch
#include "utils/windows.h"

#define MOD_NAME "[WASAPI cap.] "
Expand Down
26 changes: 18 additions & 8 deletions src/audio/playback/wasapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,34 @@
* frames.
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config_unix.h"
#include "config_win32.h"
#endif

#include <audioclient.h>
#include <audiosessiontypes.h> // for AUDCLNT_SHAREMODE_SHARED
#include <basetsd.h> // for UINT32, HRESULT, UINT, LPWSTR, GUID..
#include <cassert> // for assert
#include <cctype> // for isdigit
#include <combaseapi.h> // for CoTaskMemFree, CoCreateInstance
#include <cstdio> // for snprintf
#include <cstdlib> // for NULL, atoi, malloc, mbtowc, realloc
#include <cstring> // for memset, strcmp, strlen, wcslen
#include <iostream>
#include <mfapi.h>
#include <ksmedia.h> // for KSAUDIO_SPEAKER_5POINT1_SURROUND
#include <mediaobj.h> // for REFERENCE_TIME
#include <mmdeviceapi.h>
#include <mmeapi.h> // for WAVEFORMATEX
#include <mmreg.h> // for WAVEFORMATEXTENSIBLE, WAVE_FORMAT_...
#include <objbase.h> // for STGM_READ
#include <propidl.h> // for PropVariantClear, PropVariantInit
#include <propsys.h> // for IPropertyStore
#include <sstream>
#include <string>
#include <windows.h>
#include <winerror.h> // for SUCCEEDED, S_OK, FAILED, S_FALSE

#include "audio/audio_playback.h"
#include "audio/types.h"
#include "debug.h"
#include "host.h" // for get_commandline_param, INIT_NOERR
#include "lib_common.h"
#include "types.h" // for device_info
#include "ug_runtime_error.hpp"
#include "utils/color_out.h"
#include "utils/windows.h"
Expand Down

0 comments on commit f819dee

Please sign in to comment.