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

Worker Thread for AsyncCaller #11

Open
Rincewind34 opened this issue Sep 12, 2021 · 2 comments
Open

Worker Thread for AsyncCaller #11

Rincewind34 opened this issue Sep 12, 2021 · 2 comments

Comments

@Rincewind34
Copy link

I just took a look into this library (and watched the two videos on YouTube) but I can't find a good example on how to run the process function. In the video you said that it is possible to make the process thread run interleaved with audio thread? How exactly can I accomplish that?
Can you recommend any papers I can read about that topic? When I search on that topics, I tend to find a lot of stuff about writing the audio thread and the syncing mechanisms (like a fifo queue) but its very hard to find example for the consumer thread that is actually working the queue. Even though that may only be very few lines of code they are very important.

I hope you (or someone else of course) can help me with that.
Thanks in advance!

@tomjwaldron
Copy link

There's a partial example here: https://hogliux.github.io/farbot/presentations/meetingcpp_2019/assets/player/KeynoteDHTMLPlayer.html#172

This just uses a juce::Timer callback to run the process function, the timer callback itself would be run from the juce message thread.

@hogliux
Copy link
Owner

hogliux commented Mar 3, 2023

Yes, you need to have some kind of idle or timer callback function which regularly checks if there is work to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants