Skip to content

Commit 24aa1b7

Browse files
committed
prevent loud blip on last track during show fadeout (related to volume being set back to 100% too early)
1 parent 853125d commit 24aa1b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

obplayer/scheduler/scheduler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,17 +599,17 @@ def do_showfade_request(self, ctrl, present_time, media_class):
599599
self.do_showfade_update(ctrl, present_time)
600600

601601
def do_showfade_update(self, ctrl, present_time):
602-
self.showfade_ctrl.set_next_update(present_time + 0.25)
602+
self.showfade_ctrl.set_next_update(present_time + 0.1)
603603
if self.present_show and type(self.present_show) is ObShow and self.present_show.fadeout:
604604
ending_in = self.present_show.end_time() - present_time
605-
fade_duration = self.showfade_duration # adding 0.25 to account for this only being called every 0.25, so we might be late
605+
fade_duration = self.showfade_duration
606606

607-
if(ending_in <= (fade_duration + 0.25)):
607+
if(ending_in <= fade_duration):
608608
obplayer.Player.outputs["mixer"].fade(
609609
{
610610
"element": "mixer-primary-volume",
611611
"volume": 0.0,
612-
"time": self.showfade_duration
612+
"time": self.showfade_duration - 0.1
613613
}
614614
)
615615

0 commit comments

Comments
 (0)