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

Handling Keyboard Events on the Audio Thread directly #155

Open
nat3Github opened this issue Jun 17, 2024 · 1 comment
Open

Handling Keyboard Events on the Audio Thread directly #155

nat3Github opened this issue Jun 17, 2024 · 1 comment

Comments

@nat3Github
Copy link

It would be nice to have a way to handle Keyboard events directly in the audio thread.

Implementation Idea: a Channel that gets shared between the WindowHandle and the audiothread, where duplicate KeyEvent messages get send to the audiothread.

rationale: lower latency when triggering audio with the keyboard than going around the editor gui thread, possibly processing that late and sending it again to the audio thread.

This is a feature request not a bug!

@tphbrok
Copy link

tphbrok commented Jul 16, 2024

(disclaimer: Rust and nih-plug newbie)

I've implemented something similar (using crossbeam_channel) to trigger the export of a recorded buffer through a file dialog created from the audio thread when a button is clicked in the GUI.

Chances are I'm doing something unorthodox here, as any delay in real-time audio processing could be noticeable (see this blog: Real-time audio programming 101: time waits for nothing).

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

2 participants