348588254c
- Add WASAPI audio capture for windows, input and output - Check for null pointer in os_dlopen - Add exception-safe 'WinHandle' and 'CoTaskMemPtr' helper classes that will automatically call CloseHandle on handles and call CoTaskMemFree on certain types of memory returned from windows functions - Changed the wide <-> MBS/UTF8 conversion functions so that you use buffers (like these functions are *supposed* to behave), and changed the ones that allocate to a different naming scheme to be safe
20 lines
405 B
C++
20 lines
405 B
C++
#pragma once
|
|
|
|
#define WIN32_MEAN_AND_LEAN
|
|
#include <windows.h>
|
|
#include <mmdeviceapi.h>
|
|
#include <audioclient.h>
|
|
#include <propsys.h>
|
|
#include <functiondiscoverykeys_devpkey.h>
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
struct AudioDeviceInfo {
|
|
std::string name;
|
|
std::string id;
|
|
};
|
|
|
|
std::string GetDeviceName(IMMDevice *device);
|
|
void GetWASAPIAudioDevices(std::vector<AudioDeviceInfo> &devices, bool input);
|