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.69k stars 375 forks source link

Pause and resume MIDI music during a turn #5047

Open djk12587 opened 2 years ago

djk12587 commented 2 years ago

Preliminary checks

Describe the problem requiring a solution

Music is one of the best parts of this game. The castle music is phenomenal, i'd like to hear more of the middle and ending parts of the castle music. Currently, i feel like i listen to the first 0-30 seconds over and over and over again.

Describe the possible solution

Create an experimental feature that pauses and resumes castle music when switching between your castles during a single turn.

When switching between 2 or more towns of the same type, the music will continue. When you switch between different town types, the music will pause and resume.

Once your turn is over, all castle music will restart from the beginning.

Additional info

No response

Branikolog commented 2 years ago

Hi, @djk12587 ! I believe your proposal is completely the same to the existing issue: #1068

djk12587 commented 2 years ago

@Branikolog it could be, but #1068 is kind of hard to understand and lacks detail.

ihhub commented 2 years ago

We have 2 types of music to pause and resume: MIDI and external. I am creating tasks for each of them in the original post.

ihhub commented 2 years ago

Hi @oleg-derevenetz , do we have anything else to be done for this issue.

oleg-derevenetz commented 2 years ago

Hi @ihhub currently this works absolutely the same on Windows and non-Windows OSes: MIDI music playback still cannot be resumed from an arbitrary position because of SDL Mixer limitations, other music types are resumed just fine, it does not depend on the OS.

peteroupc commented 11 months ago

@ihhub : I want to note that the following issues are related: https://github.com/libsdl-org/SDL_mixer/issues/519, https://github.com/libsdl-org/SDL_mixer/issues/563