MIDI drivers, custom sequencers, and any other code running in engine context will need a way of sending messages to the engine without using the normal API. That is, essentially a way of using a2_Start(), a2_Play(), a2_Send() etc, but bypassing the API-to-engine FIFO and message pump. Timestamping also needs to be covered.
Alternatives:
Add a set of a2r_*() calls corresponding to the API context message calls. This obviously has the advantage of being explicit in which calls are actually available in this context, and also allows this API to be adapted to the realtime context as needed.
Add a new kind of A2_state, which directly wraps an engine state, without the asynchronous API interface. This appears to be the cleaner solution, and avoids a lot of code duplication, but may result in a slightly confusing and less efficient solution.
MIDI drivers, custom sequencers, and any other code running in engine context will need a way of sending messages to the engine without using the normal API. That is, essentially a way of using a2_Start(), a2_Play(), a2_Send() etc, but bypassing the API-to-engine FIFO and message pump. Timestamping also needs to be covered.
Alternatives: