perf stuff

This commit is contained in:
2023-01-16 02:10:57 +01:00
parent 99354918f7
commit a62ee9f811
5 changed files with 110 additions and 8 deletions

View File

@@ -143,6 +143,7 @@ void setDefaultAudioDevice(AudioData& audioData, const wchar_t* deviceId, ERole
}
}
// @slow (.2ms)
float getVolume(IAudioEndpointVolume* volumeInterface)
{
float volume;
@@ -160,6 +161,7 @@ void setVolume(IAudioEndpointVolume* volumeInterface, float newVolume)
isError(hr, "Failed to set volume level: ");
}
// @slow (.4ms)
UINT getMeterValues(IAudioMeterInformation* meterInterface, std::array<float, 2>& outLevels)
{
UINT channelCount;
@@ -176,6 +178,7 @@ void getVolumeLimit(IAudioEndpointVolume* volumeInterface, float* outMin, float*
volumeInterface->GetVolumeRange(outMin, outMax, &dummy);
}
// @slow (.3ms)
bool isMuted(IAudioEndpointVolume* volumeInterface)
{
BOOL result = false;