Re:Show HN: Contrapunk – Real-time counterpoint harmony from...
by waveywaves on Sunday April 05, 2026 @06:15AM
(#47647888)
This is callback heavy audio code so this was the bigger problem for me mainly and learning about lifetimes was a pain initially. cpal's stream callback wants 'static which means you can't just pass references around. You end up using channels (crossbeam / std::sync::mpsc) between the audio thread and everything else. Once I structured around that it got smoother. I also got a lot of help from AI to understand and reimplement a lot of the parts for this as you can tell from the commit messages.
[ Parent
| on HN ]
There are no comments on this comment yet.