@@ -66,7 +66,7 @@ void FSystemMicLiteManager::DestroyInstance()
6666 }
6767}
6868
69- FString FSystemMicLiteManager::GetDefaultDeviceName ()
69+ FString FSystemMicLiteManager::GetDefaultDeviceName () const
7070{
7171#if PLATFORM_WINDOWS
7272 return GetDeviceName (GetDevice ());
@@ -75,7 +75,7 @@ FString FSystemMicLiteManager::GetDefaultDeviceName()
7575#endif
7676}
7777
78- FString FSystemMicLiteManager::GetDefaultDeviceId ()
78+ FString FSystemMicLiteManager::GetDefaultDeviceId () const
7979{
8080#if PLATFORM_WINDOWS
8181 return GetDeviceId (GetDevice ());
@@ -84,7 +84,7 @@ FString FSystemMicLiteManager::GetDefaultDeviceId()
8484#endif
8585}
8686
87- FString FSystemMicLiteManager::GetDeviceIdFromName (const FString& DeviceName)
87+ FString FSystemMicLiteManager::GetDeviceIdFromName (const FString& DeviceName) const
8888{
8989 FString DeviceId;
9090
@@ -100,7 +100,7 @@ FString FSystemMicLiteManager::GetDeviceIdFromName(const FString& DeviceName)
100100 return DeviceId;
101101}
102102
103- FString FSystemMicLiteManager::GetDeviceNameFromId (const FString& DeviceId)
103+ FString FSystemMicLiteManager::GetDeviceNameFromId (const FString& DeviceId) const
104104{
105105 FString DeviceName;
106106
@@ -116,7 +116,7 @@ FString FSystemMicLiteManager::GetDeviceNameFromId(const FString& DeviceId)
116116 return DeviceName;
117117}
118118
119- TMap<FString, FString> FSystemMicLiteManager::GetActiveDevices ()
119+ TMap<FString, FString> FSystemMicLiteManager::GetActiveDevices () const
120120{
121121 TMap<FString, FString> ActiveDevices;
122122
@@ -179,7 +179,7 @@ void FSystemMicLiteManager::SetVolume(float Value, const FString& DeviceId)
179179#endif
180180}
181181
182- float FSystemMicLiteManager::GetVolume (const FString& DeviceId)
182+ float FSystemMicLiteManager::GetVolume (const FString& DeviceId) const
183183{
184184 float MicVolume = 0 .0f ;
185185
@@ -201,18 +201,18 @@ float FSystemMicLiteManager::GetVolume(const FString& DeviceId)
201201 return GetValueFromScalar (MicVolume);
202202}
203203
204- float FSystemMicLiteManager::GetScalarFromValue (int32 Value)
204+ float FSystemMicLiteManager::GetScalarFromValue (int32 Value) const
205205{
206206 return FMath::Abs (Value) >= 100 .0f ? 1 .0f : Value / 100 .0f ;
207207}
208208
209- float FSystemMicLiteManager::GetValueFromScalar (float Value)
209+ float FSystemMicLiteManager::GetValueFromScalar (float Value) const
210210{
211211 return FMath::RoundToFloat (FMath::Abs (Value) > 0 .0f ? Value * 100 .0f : 0 .0f );
212212}
213213
214214#if PLATFORM_WINDOWS
215- TComPtr<IMMDevice> FSystemMicLiteManager::GetDevice (const FString& DeviceId)
215+ TComPtr<IMMDevice> FSystemMicLiteManager::GetDevice (const FString& DeviceId) const
216216{
217217 TComPtr<IMMDevice> Device;
218218 HRESULT Result = S_OK ;
@@ -283,7 +283,7 @@ FString FSystemMicLiteManager::GetDeviceId(const TComPtr<IMMDevice>& Device) con
283283 return DeviceId;
284284}
285285
286- TComPtr<IAudioEndpointVolume> FSystemMicLiteManager::GetAudioEndpointVolume (const TComPtr<IMMDevice>& Device)
286+ TComPtr<IAudioEndpointVolume> FSystemMicLiteManager::GetAudioEndpointVolume (const TComPtr<IMMDevice>& Device) const
287287{
288288 if (!Device.IsValid ())
289289 {
@@ -301,7 +301,7 @@ TComPtr<IAudioEndpointVolume> FSystemMicLiteManager::GetAudioEndpointVolume(cons
301301 return AudioEndpointVolume;
302302}
303303
304- TComPtr<IAudioEndpointVolume> FSystemMicLiteManager::GetAudioEndpointVolume (const FString& DeviceId)
304+ TComPtr<IAudioEndpointVolume> FSystemMicLiteManager::GetAudioEndpointVolume (const FString& DeviceId) const
305305{
306306 TComPtr<IMMDevice> Device = GetDevice (DeviceId);
307307 if (!Device.IsValid ())
0 commit comments