ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.65k stars 371 forks source link

Playing music track from the beginning #5567

Open Branikolog opened 2 years ago

Branikolog commented 2 years ago

Preliminary checks

Describe the problem requiring a solution

After the latest implementation of new audio code all music themes started playing from the place they've stopped. I think in some rare cases we should force engine to start music theme from the beginning, as it looks quite weird, when we start new game, for instance, but music theme of terrain and even castle is played not from the beginning.

Describe the possible solution

I think we should implement some sort of timer to force engine to start music theme from the beginning in such cases like:

Additional info

No response

oleg-derevenetz commented 2 years ago

Hi @Branikolog

as it looks quite weird, when we start new game, for instance, but music theme of terrain and even castle is played not from the beginning.

It doesn't look weird in the original game however, where terrain music and main menu theme are always resumed, even after restarting the scenario (turn on the sound when watching a video):

https://user-images.githubusercontent.com/32623900/175644711-431360e4-4226-47c4-b7e6-b57839378b62.mp4

BTW, in the original game castle music is never resumed.

Branikolog commented 2 years ago

Hi, @oleg-derevenetz. That's why I marked the thread as "improvement". :) I think, starting terrain theme from the beginning is more relevant, when we start a new game. Also, I want to remind you, that the main point of my thread is to implement some sort of timer, so music theme would be reset after some period of time. Playing music theme not from the beginning while returning to main menu seems not bad (when we want to load game etc), but, I think, after player finished scenario or pressed "New game" button (after long play) starting from the beginning seems to me quite relevant.

BTW, in the original game castle music is never resumed.

So your and @ihhub work on audio code is definitely a huge improvement over the original game, which is so loved by our community. 👍