vitamin-caig / zxtune

Mirror of http://bitbucket.org/zxtune/zxtune repository with robot-only issues tracker
https://zxtune.bitbucket.io
148 stars 17 forks source link

Loop is not working for songs playing outside of standard playlist #2223

Open przunk opened 1 year ago

przunk commented 1 year ago

When playing the song from "Playlist" view, everything seems to be working fine. In "Browser" view, when loading local playlist or local file, looping the song don't work. The song is played once, and then there is just a silence - progressbar is still indicating the progress of the song, but no sound can be heard.

Steps for reproduction:

Result: When the song ends, it doesn't repeat as expected. Progressbar is running forward (probably taking CPU time) but no sound is played.

Expected: The sound will loop indefinately.

This issue doesn't apply for "Playlist" view, when the song is added to standard playlist and played.

I am positive, that this issue didn't apply for older versions (few months back)

App. version r5050-thin

przunk commented 1 year ago

Observations after some more tests: This issue seems to be affecting only certain types of songs. In particular, some files which define goto 00 segment of the song at the end. Tested on these files:

vitamin-caig commented 1 year ago

If track doesn't have sound produced after playback for specified duration, it will be silence at looping. This usually actual for emulated formats. Yep, this is actual for Back_to_the_Scene.sap

vitamin-caig commented 1 year ago

And it doesn't matter whether track was played from playlist or browser.

przunk commented 1 year ago

Is this expected (valid) behaviour? Many songs have 1-pattern long pause at the end, which in this case effectively disables looping capabilities for them. In my opinion, loop is a loop - the song should jump to the beginning when reaching the end. I understand particular characteristics of chip music - some songs should not loop to the beginning but to the defined region.

vitamin-caig commented 1 year ago

Playback should be looped to intended position (or at the beginning if it's not specified). As for specified modules, used playback library doesn't support forced looping (I guess, it just obeys internal loop control commands).