Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Is it possible to get the precisely accurate playing position in milliseconds? (Read 1745 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is it possible to get the precisely accurate playing position in milliseconds?

Is it possible to get the precisely accurate playing position in milliseconds? I did find some title formattings that are capable to do it in seconds, but not milliseconds. I didn't manage to find a solution to this. If there's a solution, please remind me.

It's rather an important issue to consider when doing lyric stuff. Using title formatting would be great in my solution, so that I can fetch it through HTTP requests thanks to foo_httpcontrol, or any related APIs available when building components are welcome.

Thanks a lot!

Re: Is it possible to get the precisely accurate playing position in milliseconds?

Reply #1
I don't think this is possible through title formatting, but you can get millisecond values in foo_jscript_panel. Just use fb.PlaybackTime.

Re: Is it possible to get the precisely accurate playing position in milliseconds?

Reply #2
Thanks. That can be an idea, but doesn't that mean I need to build my components based on JScript Panel? I think there must be a function I can call to build a "native" component. For example, I have found the function `playback_get_position` in  `playback_control` v1 to v3, but it provides the position only in seconds.

Re: Is it possible to get the precisely accurate playing position in milliseconds?

Reply #3
For example, I have found the function `playback_get_position` in  `playback_control` v1 to v3, but it provides the position only in seconds.

This function returns floating point value, so to get position in milliseconds you need to multiply returned value by 1000.

Re: Is it possible to get the precisely accurate playing position in milliseconds?

Reply #4
For example, I have found the function `playback_get_position` in  `playback_control` v1 to v3, but it provides the position only in seconds.

This function returns floating point value, so to get position in milliseconds you need to multiply returned value by 1000.

You are right. I didn't notice the result was in double. Thanks a lot!