chore: unsingletonize SoundController (#5462)

This commit is contained in:
pajlada
2024-06-16 15:44:08 +02:00
committed by GitHub
parent 85d6ff1e6c
commit f111b0f08d
6 changed files with 13 additions and 24 deletions
+3 -2
View File
@@ -136,7 +136,7 @@ Application::Application(Settings &_settings, const Paths &paths,
, ffzBadges(&this->emplace<FfzBadges>())
, seventvBadges(&this->emplace<SeventvBadges>())
, userData(new UserDataController(paths))
, sound(&this->emplace<ISoundController>(makeSoundController(_settings)))
, sound(makeSoundController(_settings))
, twitchLiveController(&this->emplace<TwitchLiveController>())
, twitchPubSub(new PubSub(TWITCH_PUBSUB_URL))
, twitchBadges(new TwitchBadges)
@@ -173,6 +173,7 @@ void Application::fakeDtor()
this->seventvEmotes.reset();
// this->twitch.reset();
this->fonts.reset();
this->sound.reset();
this->userData.reset();
}
@@ -435,7 +436,7 @@ ISoundController *Application::getSound()
{
assertInGuiThread();
return this->sound;
return this->sound.get();
}
ITwitchLiveController *Application::getTwitchLiveController()