Open andrewcsmith opened 7 years ago
I wonder if we can have Signal::bus
take a ring_buffer::Bounded
(instead of using an inner VecDeque
) to solve this? I guess the caveat would be that although this would allow for ensuring no dynamic allocations, there would be the chance of panic!
ing if the ring buffer's max length was exceeded. I think the real-time case is probably important enough that this would be worth it though. Perhaps we can consider re-adding a growable option if there's a desire for it in the future.
Btw, would love to see your implementation if you think it could make a nice replacement!
While
Bus
is pretty cool, the use ofVecDeque
(and the possibility that it will reallocate mid-sample) means that it's not suitable for realtime audio. I'm working on a (very circumscribed) replacement that is suitable.