Repository navigation
Conversation
|
For context: In the chat fdelapena sent two tracker files that have loop points: It was noticed that looping isn't supported at all in our code. The proposed solution is doing loops for BGM and no loops for SE. |
|
@RPGoogles while your code works and you found the issue with the loop handlng are you okay with me proposing a different fix? In general we need a bit more control here by using the low level There are some interactions in the code you can't be aware of which will cause issues: We need a way to track the loop count (to determine whether a track played once otherwise you will e.g. softlock when going to an Inn and the Inn Music Plays). When xmp does the looping internally this won't work. There is already a |
|
Of Course! I mean, I wasn't expecting my edits to be the perfect solution as if I have to be honest, I kinda just, fumbled my way around the code base lol, I am surprised I managed to get a working solution so quickly ngl.
Do you mean by using the built in specify function under the Map Settings Tab/Window? As well as the default Music and Sound Effect Settings in the System Tabs? Which might cause this issue? Although, it may have been possible in one of the old patches that had module format support maybe?( I remember it being mentioned that some old 2k3 games used tracker modules right?)
I see, in |
Adds functionality so the player can actually find tracker module files(.mod, .xm, .s3m and .it) for Music and Sound.
This feature is now enabled for BGM and disabled for SE Migrated from xmp_play_buffer to the low level API xmp_play_frame for more control about the loop count
edd9170 to
04ec288
Compare
|
Jenkins: Test this please Yes I mean the "Call Inn" Event Command. The Inn Music Plays until the track ends or for 10 seconds, whatever happens first. So this needed detection of the loop point. Changed this now to the low level API (which made the code more complex than your solution xD) so the looping can be properly detected for this one edge case. Though in general the idea is the same as your solution. |
This should be an all in one fix for the Music Looping bug when using Tracker Module formats as well as allowing Tracker Module Formats to work as Sound Effects by adding an is_sound_effect parameter that when true, sets the loop limit within libxmp to 1( loop 1 once then finish ) and when false(so a Music Track) sets the loop limit to 0 ( endless looping determined by the module file( jump commands for example ) until the Game's developer changes the BGM or ends the BGM ).