20 lines
1.1 KiB
C++
20 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <mmdeviceapi.h>
|
|
|
|
#include "ApplicationData.h"
|
|
|
|
void initAudio(ApplicationData& appData);
|
|
void loadAudioDevices(AudioData& audioData, std::vector<AudioDevice>& deviceList, EDataFlow deviceType);
|
|
void reloadDeviceLists(AudioData& audioData);
|
|
|
|
HRESULT getDeviceProperty(IPropertyStore* propertyStore, const PROPERTYKEY propertyKey, PROPVARIANT* outData);
|
|
HRESULT getDevicePropertyString(IPropertyStore* propertyStore, const PROPERTYKEY propertyKey, PROPVARIANT* outData, const wchar_t*& outString, const wchar_t* defaultStr = L"Unknown");
|
|
void setDefaultAudioDevice(AudioData& audioData, const wchar_t* deviceId, ERole role);
|
|
|
|
float getVolume(IAudioEndpointVolume* volumeInterface);
|
|
void setVolume(IAudioEndpointVolume* volumeInterface, float newVolume);
|
|
UINT getMeterValues(IAudioMeterInformation* meterInterface, std::array<float, 2>& levels);
|
|
void getVolumeLimit(IAudioEndpointVolume* volumeInterface, float* outMin, float* outMax);
|
|
bool isMuted(IAudioEndpointVolume* volumeInterface);
|
|
void setMuted(IAudioEndpointVolume* volumeInterface, bool newState); |