Class Ase::AudioEngine
ClassList > Ase > AudioEngine
#include <engine.hh>
Inherits the following classes: Ase::VirtualBase
Inherited by the following classes: Ase::AudioEngineThread
Classes
Type | Name |
---|---|
class | JobQueue |
Public Attributes
Type | Name |
---|---|
JobQueue | async_jobs Executed asynchronously, may modify AudioProcessor objects. |
JobQueue | const_jobs Blocks during execution, must treat AudioProcessor objects read-only. |
Public Static Attributes
Type | Name |
---|---|
const ThreadId & | thread_id = = audio_engine_thread_id |
Public Functions
Type | Name |
---|---|
uint64_t | block_size () const |
String | engine_stats (uint64_t stats) const |
uint64_t | frame_counter () const |
AudioProcessorP | get_event_source () |
ProjectImplP | get_project () |
double | inyquist () const |
void | ipc_dispatch () |
bool | ipc_pending () |
uint | nyquist () const |
void | queue_capture_start (CallbackS & callbacks, const String & filename, bool needsrunning) |
void | queue_capture_stop (CallbackS & callbacks) |
uint | sample_rate () const |
void | set_autostop (uint64_t nsamples) |
void | set_project (ProjectImplP project) |
SpeakerArrangement | speaker_arrangement () const |
void | start_threads () |
void | stop_threads () |
const AudioTransport & | transport () const |
bool | update_drivers (const String & pcm, uint latency_ms, const StringS & midis) |
void | wakeup_thread_mt () |
Public Static Functions
Type | Name |
---|---|
bool | thread_is_engine () |
Protected Attributes
Type | Name |
---|---|
std::atomic< size_t > | processor_count_ = = 0 |
std::atomic< uint64_t > | render_stamp_ = = 0 |
JobQueue | synchronized_jobs |
AudioTransport & | transport_ |
Protected Functions
Type | Name |
---|---|
AudioEngine (AudioEngineThread & audio_engine_thread, AudioTransport & transport) |
|
void | enable_output (AudioProcessor & aproc, bool onoff) |
void | schedule_add (AudioProcessor & aproc, uint level) |
void | schedule_queue_update () |
virtual | ~AudioEngine () |
Protected Functions inherited from Ase::VirtualBase
See Ase::VirtualBase
Type | Name |
---|---|
virtual | ~VirtualBase () noexcept = 0 |
Detailed Description
Main handle for AudioProcessor administration and audio rendering. Use make_audio_engine() to create a new engine and start_threads() to run its synthesis threads. AudioEngine objects cannot be deleted, because other ref-counted objects may hold AudioEngine &
members until after main(). Use async_jobs to have the engine execute arbitrary code. Use const_jobs for synchronous read-only data gathering, this may take quite long. Use main_rt_jobs (see main.hh) for obstruction free enqueueing of main_loop callbacks.
Public Attributes Documentation
variable async_jobs
JobQueue Ase::AudioEngine::async_jobs;
variable const_jobs
JobQueue Ase::AudioEngine::const_jobs;
Public Static Attributes Documentation
variable thread_id
const ThreadId & Ase::AudioEngine::thread_id;
Public Functions Documentation
function block_size
uint64_t Ase::AudioEngine::block_size () const
function engine_stats
String Ase::AudioEngine::engine_stats (
uint64_t stats
) const
function frame_counter
inline uint64_t Ase::AudioEngine::frame_counter () const
function get_event_source
AudioProcessorP Ase::AudioEngine::get_event_source ()
function get_project
ProjectImplP Ase::AudioEngine::get_project ()
function inyquist
inline double Ase::AudioEngine::inyquist () const
function ipc_dispatch
void Ase::AudioEngine::ipc_dispatch ()
function ipc_pending
bool Ase::AudioEngine::ipc_pending ()
function nyquist
inline uint Ase::AudioEngine::nyquist () const
function queue_capture_start
void Ase::AudioEngine::queue_capture_start (
CallbackS & callbacks,
const String & filename,
bool needsrunning
)
function queue_capture_stop
void Ase::AudioEngine::queue_capture_stop (
CallbackS & callbacks
)
function sample_rate
inline uint Ase::AudioEngine::sample_rate () const
function set_autostop
void Ase::AudioEngine::set_autostop (
uint64_t nsamples
)
function set_project
void Ase::AudioEngine::set_project (
ProjectImplP project
)
function speaker_arrangement
inline SpeakerArrangement Ase::AudioEngine::speaker_arrangement () const
function start_threads
void Ase::AudioEngine::start_threads ()
function stop_threads
void Ase::AudioEngine::stop_threads ()
function transport
inline const AudioTransport & Ase::AudioEngine::transport () const
function update_drivers
bool Ase::AudioEngine::update_drivers (
const String & pcm,
uint latency_ms,
const StringS & midis
)
function wakeup_thread_mt
void Ase::AudioEngine::wakeup_thread_mt ()
Public Static Functions Documentation
function thread_is_engine
static inline bool Ase::AudioEngine::thread_is_engine ()
Protected Attributes Documentation
variable processor_count_
std::atomic<size_t> Ase::AudioEngine::processor_count_;
variable render_stamp_
std::atomic<uint64_t> Ase::AudioEngine::render_stamp_;
variable synchronized_jobs
JobQueue Ase::AudioEngine::synchronized_jobs;
variable transport_
AudioTransport& Ase::AudioEngine::transport_;
Protected Functions Documentation
function AudioEngine
explicit Ase::AudioEngine::AudioEngine (
AudioEngineThread & audio_engine_thread,
AudioTransport & transport
)
function enable_output
void Ase::AudioEngine::enable_output (
AudioProcessor & aproc,
bool onoff
)
function schedule_add
void Ase::AudioEngine::schedule_add (
AudioProcessor & aproc,
uint level
)
function schedule_queue_update
void Ase::AudioEngine::schedule_queue_update ()
function ~AudioEngine
virtual Ase::AudioEngine::~AudioEngine ()
The documentation for this class was generated from the following file /__w/anklang/anklang/ase/engine.hh