5 #include <Audioclient.h> 7 #include <endpointvolume.h> 8 #include <mmdeviceapi.h> 12 #include <functiondiscoverykeys_devpkey.h> 15 #include <portaudio.h> 25 #include "hlaudio/internal/Device.h" 26 #include "hlaudio/internal/OSAudio.h" 28 #define REFTIMES_PER_SEC 10000000 29 #define REFTIMES_PER_MILLISEC 10000 32 #define HANDLE_ERROR(hres) \ 33 if (FAILED(hres)) { goto Exit; } 34 #define HANDLE_PA_ERROR(hres) \ 35 if (hres != paNoError) { goto Exit; } 36 #define SAFE_RELEASE(punk) \ 38 { (punk)->Release(); (punk) = NULL; } 47 const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
48 const IID IID_IMMDeviceEnumerator = __uuidof(IMMDeviceEnumerator);
49 const IID IID_IAudioClient = __uuidof(IAudioClient);
50 const IID IID_IAudioCaptureClient = __uuidof(IAudioCaptureClient);
56 REFERENCE_TIME requestDuration = REFTIMES_PER_SEC;
57 REFERENCE_TIME bufferDuration;
59 IMMDeviceEnumerator *pEnumerator = NULL;
60 IMMDeviceCollection *deviceCollection = NULL;
70 std::vector<Device *>
getDevices(DeviceType type);
78 #endif // END HL_WIN_AUDIO_H Abstract class that defines the required components for OS specfic audio classes. ...
Definition: OSAudio.h:19
~WindowsAudio()
Clear all global pointers.
Definition: WindowsAudio.cpp:293
A audio class that captures system wide audio on Windows.
Definition: WindowsAudio.h:45
void capture()
Execution loop for loopback capture.
Definition: WindowsAudio.cpp:175
std::vector< Device * > getDevices(DeviceType type)
Receive the list of available record, playback and/or loopback audio devices connected to the OS and ...
Definition: WindowsAudio.cpp:19
Wrapper for OS specific device information.
Definition: Device.h:34
Definition: Controller.h:11
bool checkRates(Device *device)
TODO: Fill in with something.
Definition: WindowsAudio.cpp:285
void setActiveOutputDevice(Device *device)
Set the selected output device and restart capture threads with new device.
Definition: WindowsAudio.cpp:168