|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Backend audio subsystem service interface. More...
#include <AudioBackendService.hpp>
Collaboration diagram for MayaFlux::Registry::Service::AudioBackendService:Public Attributes | |
| std::function< std::span< const double >()> | get_output_snapshot |
| Returns a span over the last committed interleaved output buffer. | |
| std::function< uint32_t(std::function< void(const double *, uint32_t)>)> | register_output_observer |
| Register a per-cycle output observer. | |
| std::function< void(uint32_t)> | unregister_output_observer |
| Unregister a previously registered observer. | |
Backend audio subsystem service interface.
Registered into BackendRegistry by AudioSubsystem during initialize(). Follows the same pattern as NetworkService, BufferService, DisplayService, and InputService: plain struct of std::function members, natural C++ types only, no engine-internal pointers.
Two consumption models:
Polling: call get_output_snapshot() from any non-RT thread to read the last committed interleaved output buffer.
Per-cycle notification: call register_output_observer() with a callback. The callback fires on a dedicated notification thread (not the RT audio thread) once per output cycle. Any number of observers may be registered at any time. Each receives a unique id for later unregistration. The callback must not block; post to a lock-free queue if further work is needed.
Definition at line 41 of file AudioBackendService.hpp.