Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music widget does some polling even if muted #5411

Open
sprunk opened this issue Dec 23, 2024 · 0 comments
Open

Music widget does some polling even if muted #5411

sprunk opened this issue Dec 23, 2024 · 0 comments
Labels
backend Stuff that makes code easier to work with, without affecting the end user

Comments

@sprunk
Copy link
Member

sprunk commented Dec 23, 2024

There is some sort of polling every 0.03s going on regardless of whether music is muted. Doesn't seem to do much harm other than waste a bit of perf but maybe there's other mistaken assumptions to uncover?

timeframetimer_short = timeframetimer_short + dt
if timeframetimer_short > 0.03 then
local playedTime, totalTime = Spring.GetSoundStreamTime()
playedTime = tonumber( ("%.2f"):format(playedTime) )

@sprunk sprunk added the backend Stuff that makes code easier to work with, without affecting the end user label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Stuff that makes code easier to work with, without affecting the end user
Projects
None yet
Development

No branches or pull requests

1 participant