Skip to content

Class Ase::AudioEngineThread

ClassList > Ase > AudioEngineThread

Inherits the following classes: Ase::AudioEngine

Classes

Type Name
struct UserNoteJob

Public Attributes

Type Name
AtomicIntrusiveStack< EngineJobImpl > async_jobs_
std::atomic< uint64 > autostop_ = = U64MAX
std::atomic< uint64_t > buffer_size_ = = MAX_BUFFER_SIZE
float chbuffer_data_ = = { 0, }
AtomicIntrusiveStack< EngineJobImpl > const_jobs_
DriverSet driver_set_ml
MainLoopP event_loop_ = = MainLoop::create()
EngineMidiInputP midi_proc_
PcmDriverP null_pcm_driver_
AudioProcessorS oprocs_
bool output_needsrunning_ = = false
const VoidF owner_wakeup_
PcmDriverP pcm_driver_
ProjectImplP project_
std::vector< AudioProcessor * > schedule_
bool schedule_invalid_ = = true
std::thread * thread_ = = nullptr
FastMemory::Block transport_block_
AtomicIntrusiveStack< EngineJobImpl > trash_jobs_
AtomicIntrusiveStack< UserNoteJob > user_notes_
uint64 write_stamp_ = = 0
WaveWriterP wwriter_

Public Attributes inherited from Ase::AudioEngine

See Ase::AudioEngine

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
constexpr size_t MAX_BUFFER_SIZE = = AUDIO_BLOCK_MAX_RENDER_SIZE
constexpr uint fixed_n_channels = = 2

Public Static Attributes inherited from Ase::AudioEngine

See Ase::AudioEngine

Type Name
const ThreadId & thread_id = = audio_engine_thread_id

Public Functions

Type Name
AudioEngineThread (const VoidF & owner_wakeup, uint sample_rate, SpeakerArrangement speakerarrangement, const FastMemory::Block & transport_block)
void add_job_mt (EngineJobImpl * aejob, const AudioEngine::JobQueue * jobqueue)
void capture_start (const String & filename, bool needsrunning)
void capture_stop ()
void create_processors_ml ()
bool driver_dispatcher (const LoopState & state)
void enable_output (AudioProcessor & aproc, bool onoff)
String engine_stats_string (uint64_t stats) const
AudioProcessorP get_event_source ()
ProjectImplP get_project ()
void ipc_dispatch ()
bool ipc_pending ()
bool pcm_check_write (bool write_buffer, int64 * timeout_usecs_p=nullptr)
bool process_jobs (AtomicIntrusiveStack< EngineJobImpl > & joblist)
void queue_user_note (const String & channel, UserNote::Flags flags, const String & text)
void run (StartQueue * sq)
void schedule_add (AudioProcessor & aproc, uint level)
void schedule_clear ()
void schedule_queue_update ()
void schedule_render (uint64 frames)
void set_project (ProjectImplP project)
void start_threads_ml ()
void stop_threads_ml ()
void update_driver_set (DriverSet & dset)
void wakeup_thread_mt ()
virtual ~AudioEngineThread ()

Public Functions inherited from Ase::AudioEngine

See Ase::AudioEngine

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 inherited from Ase::AudioEngine

See Ase::AudioEngine

Type Name
bool thread_is_engine ()

Protected Attributes inherited from Ase::AudioEngine

See Ase::AudioEngine

Type Name
std::atomic< size_t > processor_count_ = = 0
std::atomic< uint64_t > render_stamp_ = = 0
JobQueue synchronized_jobs
AudioTransport & transport_

Protected Functions inherited from Ase::AudioEngine

See Ase::AudioEngine

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

Public Attributes Documentation

variable async_jobs_

AtomicIntrusiveStack<EngineJobImpl> Ase::AudioEngineThread::async_jobs_;

variable autostop_

std::atomic<uint64> Ase::AudioEngineThread::autostop_;

variable buffer_size_

std::atomic<uint64_t> Ase::AudioEngineThread::buffer_size_;

variable chbuffer_data_

float Ase::AudioEngineThread::chbuffer_data_[MAX_BUFFER_SIZE *fixed_n_channels];

variable const_jobs_

AtomicIntrusiveStack<EngineJobImpl> Ase::AudioEngineThread::const_jobs_;

variable driver_set_ml

DriverSet Ase::AudioEngineThread::driver_set_ml;

variable event_loop_

MainLoopP Ase::AudioEngineThread::event_loop_;

variable midi_proc_

EngineMidiInputP Ase::AudioEngineThread::midi_proc_;

variable null_pcm_driver_

PcmDriverP Ase::AudioEngineThread::null_pcm_driver_;

variable oprocs_

AudioProcessorS Ase::AudioEngineThread::oprocs_;

variable output_needsrunning_

bool Ase::AudioEngineThread::output_needsrunning_;

variable owner_wakeup_

const VoidF Ase::AudioEngineThread::owner_wakeup_;

variable pcm_driver_

PcmDriverP Ase::AudioEngineThread::pcm_driver_;

variable project_

ProjectImplP Ase::AudioEngineThread::project_;

variable schedule_

std::vector<AudioProcessor*> Ase::AudioEngineThread::schedule_;

variable schedule_invalid_

bool Ase::AudioEngineThread::schedule_invalid_;

variable thread_

std::thread* Ase::AudioEngineThread::thread_;

variable transport_block_

FastMemory::Block Ase::AudioEngineThread::transport_block_;

variable trash_jobs_

AtomicIntrusiveStack<EngineJobImpl> Ase::AudioEngineThread::trash_jobs_;

variable user_notes_

AtomicIntrusiveStack<UserNoteJob> Ase::AudioEngineThread::user_notes_;

variable write_stamp_

uint64 Ase::AudioEngineThread::write_stamp_;

variable wwriter_

WaveWriterP Ase::AudioEngineThread::wwriter_;

Public Static Attributes Documentation

variable MAX_BUFFER_SIZE

constexpr size_t Ase::AudioEngineThread::MAX_BUFFER_SIZE;

variable fixed_n_channels

constexpr uint Ase::AudioEngineThread::fixed_n_channels;

Public Functions Documentation

function AudioEngineThread

explicit Ase::AudioEngineThread::AudioEngineThread (
    const VoidF & owner_wakeup,
    uint sample_rate,
    SpeakerArrangement speakerarrangement,
    const FastMemory::Block & transport_block
) 

function add_job_mt

void Ase::AudioEngineThread::add_job_mt (
    EngineJobImpl * aejob,
    const AudioEngine::JobQueue * jobqueue
) 

function capture_start

void Ase::AudioEngineThread::capture_start (
    const String & filename,
    bool needsrunning
) 

function capture_stop

void Ase::AudioEngineThread::capture_stop () 

function create_processors_ml

void Ase::AudioEngineThread::create_processors_ml () 

function driver_dispatcher

bool Ase::AudioEngineThread::driver_dispatcher (
    const LoopState & state
) 

function enable_output

void Ase::AudioEngineThread::enable_output (
    AudioProcessor & aproc,
    bool onoff
) 

function engine_stats_string

String Ase::AudioEngineThread::engine_stats_string (
    uint64_t stats
) const

function get_event_source

AudioProcessorP Ase::AudioEngineThread::get_event_source () 

function get_project

ProjectImplP Ase::AudioEngineThread::get_project () 

function ipc_dispatch

void Ase::AudioEngineThread::ipc_dispatch () 

function ipc_pending

bool Ase::AudioEngineThread::ipc_pending () 

function pcm_check_write

bool Ase::AudioEngineThread::pcm_check_write (
    bool write_buffer,
    int64 * timeout_usecs_p=nullptr
) 

function process_jobs

bool Ase::AudioEngineThread::process_jobs (
    AtomicIntrusiveStack < EngineJobImpl > & joblist
) 

function queue_user_note

void Ase::AudioEngineThread::queue_user_note (
    const String & channel,
    UserNote::Flags flags,
    const String & text
) 

function run

void Ase::AudioEngineThread::run (
    StartQueue * sq
) 

function schedule_add

void Ase::AudioEngineThread::schedule_add (
    AudioProcessor & aproc,
    uint level
) 

function schedule_clear

void Ase::AudioEngineThread::schedule_clear () 

function schedule_queue_update

void Ase::AudioEngineThread::schedule_queue_update () 

function schedule_render

void Ase::AudioEngineThread::schedule_render (
    uint64 frames
) 

function set_project

void Ase::AudioEngineThread::set_project (
    ProjectImplP project
) 

function start_threads_ml

void Ase::AudioEngineThread::start_threads_ml () 

function stop_threads_ml

void Ase::AudioEngineThread::stop_threads_ml () 

function update_driver_set

void Ase::AudioEngineThread::update_driver_set (
    DriverSet & dset
) 

function wakeup_thread_mt

void Ase::AudioEngineThread::wakeup_thread_mt () 

function ~AudioEngineThread

virtual Ase::AudioEngineThread::~AudioEngineThread () 


The documentation for this class was generated from the following file /__w/anklang/anklang/ase/engine.cc