olofson / audiality2

A realtime scripted modular audio engine for video games and musical applications.
http://audiality.org/
zlib License
80 stars 5 forks source link

Grouped events #362

Open olofson opened 1 year ago

olofson commented 1 year ago

Inspired by a gamedev problem I'm currently working on, I realize that it would be useful to declare events as related, so they can be managed in a way similar to database transactions. More specifically;

Since interface contexts can be considered stateful (current interfaces are created per thread, and a thread-safe implementation would rely on TLS, to the same effect), we can implement groups by adding methods along the lines of BeginGroup()/EndGroup(), where BeginGroup() switches event enqueuing to a local buffer, and EndGroup() finalizes and sends the group via a single event to the engine context. Thus, API can remain simple to use, with virtually no impact on synchronization, performance etc when using event grouping.

clort81 commented 8 months ago

This is really a great sounding software synthesizer for use in games. Your demos were great too. I'd use it if i could be as productive with my own projects It's much appreciated!