New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loop main menu background music #2542
Conversation
So this one kinda works! But a little too well :D The Probably it could have a little check added to make sure the player is actually still in the main menu. That might be enough of a fix. On a related note of interest (no action needed here from you @arpan98 - just notes in general): This sort of side-steps #2364 since the abrupt stop now with this PR results in the music immediately replaying again. Yet the underlying issue there still exists, it just gets hidden by this. We need to remember that when trying to fix the other issue, which would likely involve music not being affected unless whatever context it cares about changes. Context changes several times in the main menu (loading modules, previewing a world, starting to load a game). Something like module availability cares about that (the preview screen needs to have the enabled modules available) so that context would change, but it shouldn't interfere with the menu music. |
Hooray Jenkins reported success with all tests good! |
I added a boolean to keep track of whether the music needs to be stopped or not. Also lambdified the |
Hooray Jenkins reported success with all tests good! |
Can confirm it works properly now :-) This PR has the advantage of working around the context swap, while #2545 (we ended up with two PRs for the same issue) adds the looping into the audio manager (but a bit too much so). Both have good parts, maybe they could be spliced together somehow. For reference here is good logging for this PR being tested, playing Heroes exactly once:
|
I suggest integrating the looping functionality into the AudioManager, as suggested in #2545 |
Hooray Jenkins reported success with all tests good! |
@msteiger Do you mind if we merge this PR? Even if not perfect I think it is a solution that could work for now till someone does it a better way. |
Apologies for the late reply. How about merging #2545 instead? The conflict seems to be a small issue. I can have a look if the original author is no longer available. |
Sorry for the long delay. What's the status on this? Does this need any changes? |
I think we need to retest this one and #2545 again, that one also just got re-awakened and has new commits. Ideally we'd grab the best from both PRs. Maybe you can look at the code there and advise on whether some of it could be merged together? Other PR needs a rebase at least, it has ended up with a bunch of "noise" in its history. |
This PR is a workaround for this specific case. #2545 seems more complete as it integrates the looping functionality into the AudioManager and only seems to need a few style fixes. |
Contains
Fix for #2527
How to test