ensnare-org / ensnare-v1

A library for generating digital audio.
https://ensnare.me
Other
2 stars 1 forks source link

Does Generates work better with an internal buffer? #46

Closed sowbug closed 2 months ago

sowbug commented 2 months ago

I experimented with changing generate() to assume an internal buffer, rather than one provided by the caller. This was to make async/threaded behavior simpler -- every thing that could be parallelized comes with its own buffer. But after prototyping an async version of the main traits, I decided that's too complicated, and instead thought about Orchestrator wrapping each entity in a thread and allowing communication with messages (basically the same thing I've been doing to all services). That seems a lot simpler, and it means the core structs can stay nice and simple, knowing nothing about async.

Work: try the message-based solution, and then close this bug wontfix if it works.

sowbug commented 2 months ago

Update after a ~week and a half of prototyping:

So it wasn't an either-or; it's more of an and. Closing this bug because the research is done and is on its way to production now.