-
Notifications
You must be signed in to change notification settings - Fork 1
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
New Bus
system to replace naive Arc<Mutex<Buffer>>
System
#58
base: main
Are you sure you want to change the base?
Conversation
(Huge commit message incoming, very sry about that.) Rough first version of the new Inlet / Outlet system for audio IPC in Cyma. No mutexes or the like, just arc swaps, mpmc structs, and atomics. I also want to eventually add Outlets that can be shared by multiple visualizers. A system like that will definitely perform better than what Cyma currently has. Compared to the old peak graph example, this new one is actually a bit less performant. If my unscientific benchmarks are anything to go by, the avg. DSP load has gone up by 30%. The max. DSP load has already gone down by about 10%, though. The real gain is obviously that no mutexes are needed anymore.
Et voila, both the peak and avg. load have *halved* with this new system.
Also, there is no Inlet/Outlet differentiation anymore.
Channel
system to replace Arc<Mutex<Buffer>>
SystemBus
system to replace Arc<Mutex<Buffer>>
System
Bus
system to replace Arc<Mutex<Buffer>>
SystemBus
system to replace naive Arc<Mutex<Buffer>>
System
Update: The core bus system is finished! I might add a downmixing option to turn a Both current example plugins have been updated to reflect the changes. They might still need some testing, especially on different OSes and hosts. @magnetophon (mentioning you here because you said you'd be interested in testing) |
Overview
As per #55.
This branch introduces a new bus system, which sends raw audio data to the GUI lock-freely via crossbeam. The bus fans out new audio data to dynamically dispatched event handlers for visualizers.
Tasks
These visualizers use the new system:
Graph
Meter
Oscilloscope
Histogram
Lissajous
Other visualizers such as the Spectrum Analyzer are not affected and thus not listed. Some internal optimizations may still need to be made to many of these visualizers. However, these optimizations will not introduce any API changes, so they may be introduced later on. That also goes for some performance tweaks to the bus system itself, which may include some parallelization or async handling of events.
Some extras still need to be added
peak_graph
etc.Breaking Changes
Stub.
Non-breaking Changes
Stub.