mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-06 16:46:11 -05:00
reduce duplicate code
This commit is contained in:
@@ -43,10 +43,12 @@ public:
|
||||
bool _wait = false;
|
||||
|
||||
private:
|
||||
void StartSourceFade();
|
||||
void StartMasterFade();
|
||||
void FadeSourceVolume();
|
||||
void FadeMasterVolume();
|
||||
void StartFade();
|
||||
void FadeVolume();
|
||||
void SetVolume(float vol);
|
||||
float GetVolume();
|
||||
void SetFadeActive(bool value);
|
||||
bool FadeActive();
|
||||
|
||||
static bool _registered;
|
||||
static const std::string id;
|
||||
|
||||
@@ -111,8 +111,11 @@ struct SwitcherData {
|
||||
StartupBehavior startupBehavior = PERSIST;
|
||||
AutoStartEvent autoStartEvent = AutoStartEvent::NEVER;
|
||||
|
||||
std::atomic_bool masterAudioFadeActive = {false};
|
||||
std::unordered_map<std::string, std::atomic_bool> activeAudioFades;
|
||||
struct AudioFadeInfo {
|
||||
std::atomic_bool active = {false};
|
||||
};
|
||||
AudioFadeInfo masterAudioFade;
|
||||
std::unordered_map<std::string, AudioFadeInfo> activeAudioFades;
|
||||
|
||||
Duration cooldown;
|
||||
std::chrono::high_resolution_clock::time_point lastMatchTime;
|
||||
|
||||
Reference in New Issue
Block a user