Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Ase::AudioEngineThread Class Reference
Inheritance diagram for Ase::AudioEngineThread:
[legend]

Classes

struct  UserNoteJob
 

Public Member Functions

 AudioEngineThread (const VoidF &, uint, SpeakerArrangement, const FastMemory::Block &)
 
void schedule_clear ()
 
void schedule_add (AudioProcessor &aproc, uint level)
 
void schedule_queue_update ()
 
void schedule_render (uint64 frames)
 
void enable_output (AudioProcessor &aproc, bool onoff)
 
void wakeup_thread_mt ()
 
void capture_start (const String &filename, bool needsrunning)
 
void capture_stop ()
 
bool ipc_pending ()
 
void ipc_dispatch ()
 
AudioProcessorP get_event_source ()
 
void add_job_mt (EngineJobImpl *aejob, const AudioEngine::JobQueue *jobqueue)
 
bool pcm_check_write (bool write_buffer, int64 *timeout_usecs_p=nullptr)
 
bool driver_dispatcher (const LoopState &state)
 
bool process_jobs (AtomicIntrusiveStack< EngineJobImpl > &joblist)
 
void run (StartQueue *sq)
 
void queue_user_note (const String &channel, UserNote::Flags flags, const String &text)
 
void set_project (ProjectImplP project)
 
ProjectImplP get_project ()
 
void update_driver_set (DriverSet &dset)
 
void start_threads_ml ()
 
void stop_threads_ml ()
 
void create_processors_ml ()
 
String engine_stats_string (uint64_t stats) const
 
- Public Member Functions inherited from Ase::AudioEngine
void start_threads ()
 
void stop_threads ()
 
void wakeup_thread_mt ()
 
bool ipc_pending ()
 
void ipc_dispatch ()
 
AudioProcessorP get_event_source ()
 
void set_project (ProjectImplP project)
 
ProjectImplP get_project ()
 
uint64_t frame_counter () const
 
uint64_t block_size () const
 
const AudioTransporttransport () const
 
uint sample_rate () const
 
uint nyquist () const
 
double inyquist () const
 
SpeakerArrangement speaker_arrangement () const
 
void set_autostop (uint64_t nsamples)
 
void queue_capture_start (CallbackS &, const String &filename, bool needsrunning)
 
void queue_capture_stop (CallbackS &)
 
bool update_drivers (const String &pcm, uint latency_ms, const StringS &midis)
 
String engine_stats (uint64_t stats) const
 

Public Attributes

PcmDriverP null_pcm_driver_
 
PcmDriverP pcm_driver_
 
std::atomic< uint64_tbuffer_size_
 
float chbuffer_data_ [MAX_BUFFER_SIZE *fixed_n_channels]
 
uint64 write_stamp_
 
std::vector< AudioProcessor * > schedule_
 
EngineMidiInputP midi_proc_
 
bool schedule_invalid_
 
bool output_needsrunning_
 
AtomicIntrusiveStack< EngineJobImplasync_jobs_
 
AtomicIntrusiveStack< EngineJobImplconst_jobs_
 
AtomicIntrusiveStack< EngineJobImpltrash_jobs_
 
const VoidF owner_wakeup_
 
std::threadthread_
 
MainLoopP event_loop_
 
AudioProcessorS oprocs_
 
ProjectImplP project_
 
WaveWriterP wwriter_
 
FastMemory::Block transport_block_
 
DriverSet driver_set_ml
 
std::atomic< uint64autostop_
 
AtomicIntrusiveStack< UserNoteJobuser_notes_
 
- Public Attributes inherited from Ase::AudioEngine
JobQueue async_jobs
 Executed asynchronously, may modify AudioProcessor objects.
 
JobQueue const_jobs
 Blocks during execution, must treat AudioProcessor objects read-only.
 

Static Public Attributes

static constexpr uint fixed_n_channels
 
static constexpr size_t MAX_BUFFER_SIZE
 
- Static Public Attributes inherited from Ase::AudioEngine
static const ThreadIdthread_id
 

Additional Inherited Members

- Static Public Member Functions inherited from Ase::AudioEngine
static bool thread_is_engine ()
 
- Protected Member Functions inherited from Ase::AudioEngine
 AudioEngine (AudioEngineThread &, AudioTransport &)
 
void enable_output (AudioProcessor &aproc, bool onoff)
 
void schedule_queue_update ()
 
void schedule_add (AudioProcessor &aproc, uint level)
 
- Protected Attributes inherited from Ase::AudioEngine
std::atomic< size_tprocessor_count_
 
std::atomic< uint64_trender_stamp_
 
AudioTransporttransport_
 
JobQueue synchronized_jobs
 

Detailed Description

Definition at line 53 of file engine.cc.


Class Documentation

◆ Ase::AudioEngineThread::UserNoteJob

struct Ase::AudioEngineThread::UserNoteJob

Definition at line 75 of file engine.cc.

Class Members
atomic< UserNoteJob * > next
UserNote note

Constructor & Destructor Documentation

◆ ~AudioEngineThread()

Ase::AudioEngineThread::~AudioEngineThread ( )
virtual

Definition at line 542 of file engine.cc.

◆ AudioEngineThread()

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

Definition at line 548 of file engine.cc.

Member Function Documentation

◆ add_job_mt()

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

Definition at line 464 of file engine.cc.

◆ capture_start()

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

Definition at line 250 of file engine.cc.

◆ capture_stop()

void Ase::AudioEngineThread::capture_stop ( )

Definition at line 278 of file engine.cc.

◆ create_processors_ml()

void Ase::AudioEngineThread::create_processors_ml ( )

Definition at line 817 of file engine.cc.

◆ driver_dispatcher()

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

Definition at line 344 of file engine.cc.

◆ enable_output()

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

Definition at line 230 of file engine.cc.

◆ engine_stats_string()

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

Definition at line 521 of file engine.cc.

◆ get_event_source()

AudioProcessorP Ase::AudioEngineThread::get_event_source ( )

Definition at line 832 of file engine.cc.

◆ get_project()

ProjectImplP Ase::AudioEngineThread::get_project ( )

Definition at line 537 of file engine.cc.

◆ ipc_dispatch()

void Ase::AudioEngineThread::ipc_dispatch ( )

Definition at line 404 of file engine.cc.

◆ ipc_pending()

bool Ase::AudioEngineThread::ipc_pending ( )

Definition at line 397 of file engine.cc.

◆ pcm_check_write()

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

Definition at line 322 of file engine.cc.

◆ process_jobs()

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

Definition at line 308 of file engine.cc.

◆ queue_user_note()

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

Definition at line 389 of file engine.cc.

◆ run()

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

Definition at line 288 of file engine.cc.

◆ schedule_add()

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

Definition at line 183 of file engine.cc.

◆ schedule_clear()

void Ase::AudioEngineThread::schedule_clear ( )

Definition at line 165 of file engine.cc.

◆ schedule_queue_update()

void Ase::AudioEngineThread::schedule_queue_update ( )

Definition at line 159 of file engine.cc.

◆ schedule_render()

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

Definition at line 197 of file engine.cc.

◆ set_project()

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

Definition at line 504 of file engine.cc.

◆ start_threads_ml()

void Ase::AudioEngineThread::start_threads_ml ( )

Definition at line 433 of file engine.cc.

◆ stop_threads_ml()

void Ase::AudioEngineThread::stop_threads_ml ( )

Definition at line 451 of file engine.cc.

◆ update_driver_set()

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

Definition at line 838 of file engine.cc.

◆ wakeup_thread_mt()

void Ase::AudioEngineThread::wakeup_thread_mt ( )

Definition at line 426 of file engine.cc.

Member Data Documentation

◆ async_jobs_

AtomicIntrusiveStack<EngineJobImpl> Ase::AudioEngineThread::async_jobs_

Definition at line 65 of file engine.cc.

◆ autostop_

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

Definition at line 74 of file engine.cc.

◆ buffer_size_

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

Definition at line 58 of file engine.cc.

◆ chbuffer_data_

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

Definition at line 59 of file engine.cc.

◆ const_jobs_

AtomicIntrusiveStack<EngineJobImpl> Ase::AudioEngineThread::const_jobs_

Definition at line 65 of file engine.cc.

◆ driver_set_ml

DriverSet Ase::AudioEngineThread::driver_set_ml

Definition at line 73 of file engine.cc.

◆ event_loop_

MainLoopP Ase::AudioEngineThread::event_loop_

Definition at line 68 of file engine.cc.

◆ fixed_n_channels

constexpr uint Ase::AudioEngineThread::fixed_n_channels
staticconstexpr

Definition at line 55 of file engine.cc.

◆ MAX_BUFFER_SIZE

constexpr size_t Ase::AudioEngineThread::MAX_BUFFER_SIZE
staticconstexpr

Definition at line 57 of file engine.cc.

◆ midi_proc_

EngineMidiInputP Ase::AudioEngineThread::midi_proc_

Definition at line 62 of file engine.cc.

◆ null_pcm_driver_

PcmDriverP Ase::AudioEngineThread::null_pcm_driver_

Definition at line 56 of file engine.cc.

◆ oprocs_

AudioProcessorS Ase::AudioEngineThread::oprocs_

Definition at line 69 of file engine.cc.

◆ output_needsrunning_

bool Ase::AudioEngineThread::output_needsrunning_

Definition at line 64 of file engine.cc.

◆ owner_wakeup_

const VoidF Ase::AudioEngineThread::owner_wakeup_

Definition at line 66 of file engine.cc.

◆ pcm_driver_

PcmDriverP Ase::AudioEngineThread::pcm_driver_

Definition at line 56 of file engine.cc.

◆ project_

ProjectImplP Ase::AudioEngineThread::project_

Definition at line 70 of file engine.cc.

◆ schedule_

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

Definition at line 61 of file engine.cc.

◆ schedule_invalid_

bool Ase::AudioEngineThread::schedule_invalid_

Definition at line 63 of file engine.cc.

◆ thread_

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

Definition at line 67 of file engine.cc.

◆ transport_block_

FastMemory::Block Ase::AudioEngineThread::transport_block_

Definition at line 72 of file engine.cc.

◆ trash_jobs_

AtomicIntrusiveStack<EngineJobImpl> Ase::AudioEngineThread::trash_jobs_

Definition at line 65 of file engine.cc.

◆ user_notes_

AtomicIntrusiveStack<UserNoteJob> Ase::AudioEngineThread::user_notes_

Definition at line 79 of file engine.cc.

◆ write_stamp_

uint64 Ase::AudioEngineThread::write_stamp_

Definition at line 60 of file engine.cc.

◆ wwriter_

WaveWriterP Ase::AudioEngineThread::wwriter_

Definition at line 71 of file engine.cc.


The documentation for this class was generated from the following file: