music offset value that is in miliseconds [bug] [solved]

right now “the playing of the music on channel” offset value is like this:
1 second = 0.001
1.25 seconds = 0.001
2 seconds = 0.002

It would be much more useful if its in miliseconds instead:
1 second = 1000
1.25 seconds - 1250
2 seconds = 2000

That way we can use it as a timer that is true to the time of the music (rhythm games) and also have it show the time between seconds.

You mean right now it is:

1 second = 1
1.25 seconds = 1.25
2 seconds = 2

Because I think that the most obvious unit for most people is second, (this is what is used by default in API like html5 audio) and it’s still easy to use milliseconds.
Setting the default unit to milliseconds would confuse users and do not bring more precisions (most API/computers won’t handle milliseconds precision, nor the player by the way :slight_smile: )

So I think right now it’s perfect: It’s easy enough to be undersand in a breeze (i.e: unit is second, it’s easy to handle for most people minds) and you can still use more precisions if needed :slight_smile: And it is consistent with timers and TimeDelta() returning time in seconds. Consistency is ultra important in an engine :slight_smile:

It is strange. When I set a variable to the music offset - to see whats going on, I get 0.001, 0.002 and so on. It gets +0.001 every second

It seems to not be showing them the way you say it is right now.

here is is as compared to a timer (btw the dark background is the debugger window):

Am I making a mistake in the way I am using it?

The problem for me is that it does not take into account miliseconds

Fixed in
This bug only happens with native games, not html5 ones.

ah thank you! :slight_smile: didnt know it was a bug.
Glad we caught it!

Thanks guys! :smiley: