Sometimes a very brief pause soon after starting a track #223

Open
opened 2024-02-18 12:46:30 +00:00 by kae · 9 comments
Owner

Hypotheis: it may be related to releasing the music player at the end of the previous track.

Hypotheis: it may be related to releasing the music player at the end of the previous track.
kae added the
bug
label 2024-02-18 12:46:31 +00:00
Author
Owner

Investigation work on #2976cea

Investigation work on #2976cea
kae referenced this issue from a commit 2024-02-23 12:28:00 +00:00
Author
Owner

Pause happened BEFORE releasing player

[21:13:09] musicmuster.py:1105 play_next(position=False)
[21:13:09] music.py:69 Music.stop()
[21:13:09] playlistmodel.py:1029 previous_track_ended()
[21:13:09] music.py:101 Music.play(path='/home/kae/music/Fleetwood Mac/Fleetwood Mac/01. Monday Morning.flac', position=False
[21:13:09] playlistmodel.py:991 obs_scene_change(row_number=25)
[21:13:09] playlistmodel.py:1329 update_track_times()
[21:13:09] playlistmodel.py:1189 set_next_row(row_number=27)
[21:13:09] infotabs.py:50 Wikipedia Infotab for title="She's Leaving Home"
[21:13:09] playlistmodel.py:1329 update_track_times()
[21:13:14] music.py:47 Releasing player self.player=<vlc.MediaPlayer object at 0x7f6d4bd12e10>
Pause happened BEFORE releasing player ``` [21:13:09] musicmuster.py:1105 play_next(position=False) [21:13:09] music.py:69 Music.stop() [21:13:09] playlistmodel.py:1029 previous_track_ended() [21:13:09] music.py:101 Music.play(path='/home/kae/music/Fleetwood Mac/Fleetwood Mac/01. Monday Morning.flac', position=False [21:13:09] playlistmodel.py:991 obs_scene_change(row_number=25) [21:13:09] playlistmodel.py:1329 update_track_times() [21:13:09] playlistmodel.py:1189 set_next_row(row_number=27) [21:13:09] infotabs.py:50 Wikipedia Infotab for title="She's Leaving Home" [21:13:09] playlistmodel.py:1329 update_track_times() [21:13:14] music.py:47 Releasing player self.player=<vlc.MediaPlayer object at 0x7f6d4bd12e10> ```
Author
Owner

Put delays in post-track processing and notify to debug log to try to find cause of dropouts

Put delays in post-track processing and notify to debug log to try to find cause of dropouts
kae referenced this issue from a commit 2024-04-05 11:23:08 +01:00
Author
Owner

Dropout just after but sometimes before "Pause finished after calling active_proxy_model().current_track_started()"

So maybe timer related.

Dropout just after but sometimes before "Pause finished after calling active_proxy_model().current_track_started()" So maybe timer related.
kae referenced this issue from a commit 2024-04-24 17:55:51 +01:00
kae referenced this issue from a commit 2024-04-24 17:56:45 +01:00
Author
Owner

Problem did not occur with 4c638ab

Changes in musicmuster.py:

  • in play_next(), disable the timer10 timer

  • in tick_1000ms(), enable timer10 if it is inactive and we're more than 10 seconds into the track (playtime > 10000)

git diff f1ef2f4..4c638ab will show the changes.

Problem did not occur with 4c638ab Changes in musicmuster.py: - in play_next(), disable the timer10 timer - in tick_1000ms(), enable timer10 if it is inactive and we're more than 10 seconds into the track (playtime > 10000) `git diff f1ef2f4..4c638ab` will show the changes.
kae referenced this issue from a commit 2024-04-27 14:41:09 +01:00
kae closed this issue 2024-04-27 14:41:09 +01:00
Author
Owner

Happening again, but it looks as if the fix was lost somewhere.

Happening again, but it looks as if the fix was lost somewhere.
kae reopened this issue 2024-05-24 13:23:16 +01:00
Author
Owner

Reimplemented earlier fix. In musicmuster.py:play_next:

# Issue #223 concerns a very short pause (maybe 0.1s) sometimes
# when starting to play at track.

# Resolution appears to be to disable timer10 for the first ten
# seconds of playback. Re-enabled tick_1000ms

self.timer10.stop()
self.show_status_message("10ms timer disabled", 0)

# If there's currently a track playing, fade it.
self.stop_playing(fade=True)

In musicmuster.py:tick_1000ms:

# If track is playing, update track clocks time and colours
if self.music.player and self.music.player.is_playing():
    playtime = self.music.get_playtime()
    time_to_fade = track_sequence.now.fade_at - playtime
    time_to_silence = track_sequence.now.silence_at - playtime

    # see play_next() and issue #223
    if playtime > 10000 and not self.timer10.isActive():
        self.timer10.start(10)
        self.show_status_message("10ms timer enabled", 0)

Reimplemented earlier fix. In musicmuster.py:play_next: ``` # Issue #223 concerns a very short pause (maybe 0.1s) sometimes # when starting to play at track. # Resolution appears to be to disable timer10 for the first ten # seconds of playback. Re-enabled tick_1000ms self.timer10.stop() self.show_status_message("10ms timer disabled", 0) # If there's currently a track playing, fade it. self.stop_playing(fade=True) ``` In musicmuster.py:tick_1000ms: ``` # If track is playing, update track clocks time and colours if self.music.player and self.music.player.is_playing(): playtime = self.music.get_playtime() time_to_fade = track_sequence.now.fade_at - playtime time_to_silence = track_sequence.now.silence_at - playtime # see play_next() and issue #223 if playtime > 10000 and not self.timer10.isActive(): self.timer10.start(10) self.show_status_message("10ms timer enabled", 0) ```
kae closed this issue 2024-05-24 13:34:22 +01:00
kae referenced this issue from a commit 2024-05-24 13:36:04 +01:00
kae referenced this issue from a commit 2024-05-24 13:36:55 +01:00
Author
Owner

Implemented jittermonitor which pointed to the code in music_manager that checked volume after track starts. That no longer seems to be a problem so removing that and logging jitter times (ie, GUI loop stalled) over 100ms.

Implemented [jittermonitor]([url](https://chatgpt.com/c/69598115-bc3c-8325-89fb-6c52a06cff2c)) which pointed to the code in music_manager that checked volume after track starts. That no longer seems to be a problem so removing that and logging jitter times (ie, GUI loop stalled) over 100ms.
kae reopened this issue 2026-01-04 13:07:48 +00:00
Author
Owner

Jitter monitoring and cleanups in #791fad6 and #8c60d6a

Jitter monitoring and cleanups in #791fad6 and #8c60d6a
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kae/musicmuster#223
No description provided.