mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Add check of sound's current volume before sending subtitles
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user