|
|
@ -115,11 +115,13 @@ void plWin32Sound::Update() |
|
|
|
plSrtFileReader* srtReader = buf->GetSrtReader(); |
|
|
|
plSrtFileReader* srtReader = buf->GetSrtReader(); |
|
|
|
if (srtReader != nullptr) { |
|
|
|
if (srtReader != nullptr) { |
|
|
|
uint32_t currentTimeMs = (uint32_t)(GetActualTimeSec() * 1000.0f); |
|
|
|
uint32_t currentTimeMs = (uint32_t)(GetActualTimeSec() * 1000.0f); |
|
|
|
while (plSrtEntry* nextEntry = srtReader->GetNextEntryStartingBeforeTime(currentTimeMs)) { |
|
|
|
if (currentTimeMs <= srtReader->GetLastEntryEndTime()) { |
|
|
|
if (plgAudioSys::AreSubtitlesEnabled()) { |
|
|
|
while (plSrtEntry* nextEntry = srtReader->GetNextEntryStartingBeforeTime(currentTimeMs)) { |
|
|
|
// add a plSubtitleMsg to go... to whoever is listening (probably the KI)
|
|
|
|
if (plgAudioSys::AreSubtitlesEnabled()) { |
|
|
|
plSubtitleMsg* msg = new plSubtitleMsg(nextEntry->GetSubtitleText(), nextEntry->GetSpeakerName()); |
|
|
|
// add a plSubtitleMsg to go... to whoever is listening (probably the KI)
|
|
|
|
msg->Send(); |
|
|
|
plSubtitleMsg* msg = new plSubtitleMsg(nextEntry->GetSubtitleText(), nextEntry->GetSpeakerName()); |
|
|
|
|
|
|
|
msg->Send(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|