-
Notifications
You must be signed in to change notification settings - Fork 20
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
A few linux behavior changes #68
Conversation
1. Call the timer register in a deferred callback launched from init 2. implementsGui has a `canUseTimerSupport` check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not able to test on Linux at the moment, but the code changes look good!
defineAudioPorts(); | ||
|
||
haveCompletedDeferredInit = false; | ||
_host.requestCallback(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure I'm understanding correctly: The idea is that if init()
is called on a thread that isn't the main thread, defer the timer initialization to a main thread callback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit different. The idea is that in init the host doesn’t know if a plugin supports timers. So it’s not clear that we can call rather than just probe extensions. See free-audio/clap#111 (reply in thread)
src/wrapper/clap-juce-wrapper.cpp
Outdated
#if JUCE_LINUX | ||
if (_host.canUseTimerSupport()) | ||
{ | ||
_host.timerSupportRegister(1000 / 50, &idleTimer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for the number 1000 / 50
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
50 times a second seemed ok. I guess I could change it to 60 to be 60hz and will do so
This reverts commit d4c2c05. For some reason in bws43b8 it causes a segv on macos
A few changes which only impact the Linux implementation
init
canUseTimerSupport
checkCloses #63