Robosturm / Commander_Wars

The aim of this project is to create an Advance Wars Clone with a lot of additions customizations and modding support. For Contact Inforamtion see the wiki page. Take a view on the game.
https://github.com/Robosturm/Commander_Wars/releases
GNU Lesser General Public License v3.0
213 stars 33 forks source link

Suggestion: .js capability to get the ms time value of the currently playing theme in AudioManager. #1782

Closed Oxyliteral closed 5 months ago

Oxyliteral commented 5 months ago

There is currently no way to make a CO's theme music start at the time it ended on the last turn. I would like to suggest adding the ability to do so. I believe the simplest solution to this problem is to add the ability to check the current ms time value of the theme in audio, as I think this would allow us to, when ending a turn, save it, and later input it as a parameter when loading CO music for the next turn, without changing much for those who do not want this feature.

Describe the solution you'd like Ability to call a function to get the current ms time value of the currently playing theme. (For example, audio.getMusicPosition(), or something to that effect). Of course, if there is a better solution than this one, then that would be great as well.