2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 14:37:41 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
ebfc0deceb Merge branch 'ticket/50'
closes #50
2023-03-13 14:16:00 -06:00
fb96b2b03c Add check of sound's current volume before sending subtitles 2023-02-27 21:56:28 -06:00

View File

@ -117,7 +117,8 @@ void plWin32Sound::Update()
uint32_t currentTimeMs = (uint32_t)(GetActualTimeSec() * 1000.0f);
if (currentTimeMs <= srtReader->GetLastEntryEndTime()) {
while (plSrtEntry* nextEntry = srtReader->GetNextEntryStartingBeforeTime(currentTimeMs)) {
if (plgAudioSys::AreSubtitlesEnabled()) {
float currVol = QueryCurrVolume();
if (plgAudioSys::AreSubtitlesEnabled() && currVol > 0.01f) {
// add a plSubtitleMsg to go... to whoever is listening (probably the KI)
plSubtitleMsg* msg = new plSubtitleMsg(nextEntry->GetSubtitleText(), nextEntry->GetSpeakerName());
msg->Send();