Skip to content

Commit 0fdcbc6

Browse files
committed
Merge branch 'dev'
2 parents 3b459f5 + a9ef8c8 commit 0fdcbc6

6 files changed

Lines changed: 206 additions & 103 deletions

File tree

Source/SystemMicControlLite/Private/SystemMicControlLite.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void FSystemMicControlLiteModule::ShutdownModule()
1717
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
1818
// we call this function before unloading the module.
1919

20-
FSystemMicLiteManager::Get()->DestroyInstance();
20+
FSystemMicLiteManager::DestroyInstance();
2121
}
2222

2323
#undef LOCTEXT_NAMESPACE

Source/SystemMicControlLite/Private/SystemMicControlLiteBPLibrary.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,48 @@ USystemMicControlLiteBPLibrary::USystemMicControlLiteBPLibrary(const FObjectInit
99

1010
}
1111

12+
void USystemMicControlLiteBPLibrary::PostInitProperties()
13+
{
14+
Super::PostInitProperties();
15+
16+
FSystemMicLiteManager::Get()->Init();
17+
}
18+
1219
FString USystemMicControlLiteBPLibrary::GetMicDefaultDeviceName()
1320
{
1421
return FSystemMicLiteManager::Get()->GetDefaultDeviceName();
1522
}
1623

24+
void USystemMicControlLiteBPLibrary::GetMicDeviceIdFromName(const FString& InDeviceName, FString& OutDeviceId)
25+
{
26+
OutDeviceId = FSystemMicLiteManager::Get()->GetDeviceIdFromName(InDeviceName);
27+
}
28+
29+
void USystemMicControlLiteBPLibrary::GetMicDeviceNameFromId(const FString& InDeviceId, FString& OutDeviceName)
30+
{
31+
OutDeviceName = FSystemMicLiteManager::Get()->GetDeviceNameFromId(InDeviceId);
32+
}
33+
1734
void USystemMicControlLiteBPLibrary::SetMicVolume(float Value)
1835
{
1936
FSystemMicLiteManager::Get()->SetVolume(Value);
2037
}
2138

39+
void USystemMicControlLiteBPLibrary::SetMicVolumeForDeviceId(const FString& DeviceId, float Volume)
40+
{
41+
FSystemMicLiteManager::Get()->SetVolume(Volume, DeviceId);
42+
}
43+
2244
float USystemMicControlLiteBPLibrary::GetMicVolume()
2345
{
2446
return FSystemMicLiteManager::Get()->GetVolume();
2547
}
2648

49+
float USystemMicControlLiteBPLibrary::GetMicVolumeForDeviceId(const FString& DeviceId)
50+
{
51+
return FSystemMicLiteManager::Get()->GetVolume(DeviceId);
52+
}
53+
2754
TMap<FString, FString> USystemMicControlLiteBPLibrary::GetMicActiveDevices()
2855
{
2956
return FSystemMicLiteManager::Get()->GetActiveDevices();

0 commit comments

Comments
 (0)