@@ -33,7 +33,7 @@ def __init__(self, show_id):
3333 self .voicetracks = obplayer .RemoteData .get_show_voicetracks (show_id )
3434
3535 # how close to the voicetrack before we return it to queue playback?
36- self .voicetrack_timing_tolerance = 1
36+ self .voicetrack_timing_tolerance = 0.25
3737 self .voicetrack_none_until = 0 # allow us to delay the next voicetrack return to prevent duplicate play requests
3838
3939 if not self .voicetracks :
@@ -75,14 +75,15 @@ def current_voicetrack(self, current_track_position):
7575 # if the voicetrack is set relative to the current track, and has a positive delay, then it plays at the start of this track
7676 if voicetrack ["order_num" ] == self .pos and voicetrack ["delay" ] >= 0 :
7777 delta = voicetrack ["delay" ] - current_track_position
78- if delta >= 0 and delta < self .voicetrack_timing_tolerance :
78+
79+ if delta >= - self .voicetrack_timing_tolerance and delta <= self .voicetrack_timing_tolerance :
7980 self .delay_voicetrack ()
8081 return [voicetrack , delta ]
8182
8283 # if the voicetrack is set relative to the next track, but has a negative delay, then it plays at the end of this track
8384 if voicetrack ["order_num" ] == (self .pos + 1 ) and voicetrack ["delay" ] < 0 :
8485 delta = track_ends_in - abs (voicetrack ["delay" ])
85- if delta >= 0 and delta < self .voicetrack_timing_tolerance :
86+ if delta >= - self . voicetrack_timing_tolerance and delta <= self .voicetrack_timing_tolerance :
8687 self .delay_voicetrack ()
8788 return [voicetrack , delta ]
8889
@@ -619,7 +620,7 @@ def do_voicetrack_request(self, ctrl, present_time, media_class):
619620 self .do_voicetrack_update (ctrl , present_time )
620621
621622 def do_voicetrack_update (self , ctrl , present_time ):
622- self .voicetrack_ctrl .set_next_update (present_time + 0.25 )
623+ self .voicetrack_ctrl .set_next_update (present_time + 0.2 )
623624 if self .present_show :
624625 self .present_show .play_current_voicetrack (present_time )
625626
0 commit comments