-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add auto player duck on mic live. Closes #70 #177
Conversation
@mstratford could you rebase this? |
Done :) |
Thanks, will test and merge in tonight. |
So, it works, but I have noticed quite a few perf problems when using it (which I oddly don't notice when fading using the usual shortcuts). I dug into the React profiler and this is what I saw: Couple things stand out to me:
|
I know there's certainly something inefficient, I can sometimes get WebStudio to make my laptop to become a blow drier (sustained like 50% cpu while seemingly doing nothing). |
I think the major problem here is that between.js has no step limiting, it just goes as often and as quickly as it can. Same with the VU meters. This just means the CPU is as busy as it can be, which i'm not too much of a fan of. |
@mstratford... ugh, that's annoying. Am I going to have to write my own between clone that uses requestAnimationFrame? |
Okay, no, it does use rAF under the hood. Am I going to write my own clone that limits it to, say, an update every 50 or 100ms |
The VU meters I could probably refactor to not re-render the element each frame, which would save a few CPU cycles, although since it doesn't rerender anything above it I'm not sure how much it'd save. Either way, I'll probably do those in separate PRs, so this and they can go in for 1.4.1 / 1.5.0. |
Current known bugs:
|
So that autoduck knows when it's not supposed to meddle.
Kinda want to merge this now, get people to test it. Leave the optimisation to #193 |
Taking some liberties and merging this to dev now. :) |
Some people may not want to keep fading their bed/music down to talk. This adds a Pro-Mode ™️ toggle button to enable WebStudio to work the faders for you.
This does show a tad of performance issue drawing to the screen though, those tweens are drawing too often.