-
Notifications
You must be signed in to change notification settings - Fork 9
Home
Christian Pérez-Llamas edited this page Jun 27, 2020
·
19 revisions
Welcome to the hero-studio wiki!
Interesting videos about real-time audio processing with lock-free data structures and no allocations:
- CppCon 2015: Timur Doumler “C++ in the Audio Industry”
- C++ in the Audio Industry, Episode II: Floating Atomics, Timur Doumler, JUCE Summit 2015
- Rust Bay Area Meetup - November 13, 2018
Concurrent programming:
Lock-free data structures:
- rignbuf crate (no-std)
- Lock-free Rust: Crossbeam in 2019
- crossbeam spsc queue PR
- crossbeam ringbuffer design
- crossbeam-circbuf PR
Immutable data structures:
Memory pools:
Realtime threads
Measuring time within the real-time thread:
- JUCE and Tracktion seem not to care about calling the OS in the real-time context:
- There are two alternatives I can think of:
- Counting CPU cycles
-
rdtscin x86 (see crates quanta and clocksource) -
pmccntrin ARM (see this C code)
-
- Measuring time in another real-time thread with a much lower latency from that of the audio callback one, where an atomic value get incremented periodically, so the audio callback can use it to measure time. For example, for CPU usage measurement, it could be 1/100th of the audio callback latency, so I would get 1% precision.
- Counting CPU cycles