dxd - dynax driver framework 2.7.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::coreaudio::server::device< pin_t > Class Template Referenceabstract

CoreAudio server streaming device. More...

#include <dx_coreaudio_server_device.h>

Inheritance diagram for dx::coreaudio::server::device< pin_t >:
Collaboration diagram for dx::coreaudio::server::device< pin_t >:

Public Member Functions

 device (decltype(super::driver)&driver, decltype(super::id)&id)
 device (decltype(super::driver)&driver, decltype(super::id)&id, const typename super::desc_t &desc)
 dx_catchall_rethrow () virtual void add_client(const
 recompute sync.offset/sync.seed/per-pin cache.sync.offset from an already-valid (count, reference) cycle snapshot. Never waits: the caller (io_start(), or io_timestamp() on the RT thread) must supply a snapshot it already knows to be valid.
 dx_catchall_rethrow () virtual void create_pins() try
 dx_catchall_rethrow () void launch() override try
void io_timestamp (::Float64 &sampletime, ::UInt64 &host_time, ::UInt64 &seed) try
clientoperator[] (::UInt32 client) try
pin_t & pin (::AudioObjectID id)
pin_t & pin (target target)
void resync_reference () try

Public Attributes

dx_catchall_rethrow() virtual uint32_t property(std::map<::pid_t, clientclients
 generic device property handler
uint8_t idx = 0
std::deque< pin_t > pins
cf::string uid

Protected Member Functions

virtual eventinitialize (bool signalled=false)
superinitialize (const std::string &name, bool signalled=false) override try
virtual eventreset (uint64_t count=0)=0
virtual eventsignal (uint64_t count=1)=0
virtual eventwait (bool reset=false)=0

Protected Attributes

std::atomic< int > io_started
const ::AudioServerPlugInHostInterface * plugin

Detailed Description

template<typename pin_t>
class dx::coreaudio::server::device< pin_t >

CoreAudio server streaming device.

In contrast to the hierarchical dx device tree design the device keeps a list of all pins and all streams to better reflect the CoreAudio architecture.

Constructor & Destructor Documentation

◆ device() [1/2]

template<typename pin_t>
dx::coreaudio::server::device< pin_t >::device ( decltype(super::driver)& driver,
decltype(super::id)& id )
inline
Here is the caller graph for this function:

◆ device() [2/2]

template<typename pin_t>
dx::coreaudio::server::device< pin_t >::device ( decltype(super::driver)& driver,
decltype(super::id)& id,
const typename super::desc_t & desc )
inline

Member Function Documentation

◆ dx_catchall_rethrow() [1/3]

template<typename pin_t>
dx::coreaudio::server::device< pin_t >::dx_catchall_rethrow ( ) const
inline

recompute sync.offset/sync.seed/per-pin cache.sync.offset from an already-valid (count, reference) cycle snapshot. Never waits: the caller (io_start(), or io_timestamp() on the RT thread) must supply a snapshot it already knows to be valid.

◆ dx_catchall_rethrow() [2/3]

template<typename pin_t>
dx::coreaudio::server::device< pin_t >::dx_catchall_rethrow ( )
inline

creates pins from dx::device description and adds it as CoreAudio entity to the CoreAudio device

Todo
coreaudio::server::device::create_pins(): not yet filtered by negotiated sample rate for devices with multiple alternate settings per stream

register all audio pins across all streams

◆ dx_catchall_rethrow() [3/3]

template<typename pin_t>
dx::coreaudio::server::device< pin_t >::dx_catchall_rethrow ( )
inlineoverride
Todo
coreaudio::server::device::launch():

remove clocksource pre-initialization hack to avoid hang at pin::property() kAudioStreamPropertyAvailablePhysicalFormats request

◆ initialize() [1/2]

virtual event & dx::abstract::event::initialize ( bool signalled = false)
inlinevirtualinherited

◆ initialize() [2/2]

super & dx::shared::event::initialize ( const std::string & name,
bool signalled = false )
inlineoverridevirtualinherited

Reimplemented from dx::abstract::event.

Here is the caller graph for this function:

◆ io_timestamp()

template<typename pin_t>
void dx::coreaudio::server::device< pin_t >::io_timestamp ( ::Float64 & sampletime,
::UInt64 & host_time,
::UInt64 & seed )
inline
Here is the call graph for this function:

◆ operator[]()

template<typename pin_t>
client & dx::coreaudio::server::device< pin_t >::operator[] ( ::UInt32 client)
inline

◆ pin() [1/2]

template<typename pin_t>
pin_t & dx::coreaudio::server::device< pin_t >::pin ( ::AudioObjectID id)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pin() [2/2]

template<typename pin_t>
pin_t & dx::coreaudio::server::device< pin_t >::pin ( target target)
inline
Here is the call graph for this function:

◆ reset()

virtual event & dx::abstract::event::reset ( uint64_t count = 0)
pure virtualinherited

Implemented in dx::event< user >.

Here is the caller graph for this function:

◆ resync_reference()

template<typename pin_t>
void dx::coreaudio::server::device< pin_t >::resync_reference ( )
inline

(re)computes sync.reference/cycle.lines/linesize/safety_offset from the current pins; callable as soon as pins exist (create_pins()), not just at io_start(), so kAudioDevicePropertyZeroTimeStampPeriod is answerable before the first StartIO

Here is the call graph for this function:

◆ signal()

virtual event & dx::abstract::event::signal ( uint64_t count = 1)
pure virtualinherited

Implemented in dx::event< user >.

Here is the caller graph for this function:

◆ wait()

virtual event & dx::abstract::event::wait ( bool reset = false)
pure virtualinherited

Implemented in dx::event< user >.

Here is the call graph for this function:

Member Data Documentation

◆ circular

template<typename pin_t>
pin_t::circular_t* dx::coreaudio::server::device< pin_t >::circular

◆ clients

template<typename pin_t>
dx_catchall_rethrow () virtual uint32_t property( std::map<::pid_t, client> dx::coreaudio::server::device< pin_t >::clients

generic device property handler

  • has property (property= null)
  • get property
  • get property size (property= null)
  • set property (set= true)
  • is property settable (property= null, set= true)

configure: handle device configuration change requests configure will only receive requests targetted to the device

◆ count

template<typename pin_t>
uint64_t dx::coreaudio::server::device< pin_t >::count

cached sync cycle count to evaluate timesamp generation

◆ [struct]

struct { ... } dx::coreaudio::server::device< pin_t >::cycle

◆ direction

template<typename pin_t>
dx::stream::direction::direction dx::coreaudio::server::device< pin_t >::direction

◆ epoch

template<typename pin_t>
int64_t dx::coreaudio::server::device< pin_t >::epoch

host ticks at cycle.reference==0, cached once at io_start() (software-clocked devices only)

◆ idx

template<typename pin_t>
uint8_t dx::coreaudio::server::device< pin_t >::idx = 0

◆ io_started

template<typename pin_t>
std::atomic<int> dx::coreaudio::server::device< pin_t >::io_started
protected

◆ lines

template<typename pin_t>
uint32_t dx::coreaudio::server::device< pin_t >::lines

sample lines per sync cycle (per timestamp generation)

◆ linesize

template<typename pin_t>
uint32_t dx::coreaudio::server::device< pin_t >::linesize

size of all channels in bytes per sample

◆ offset

template<typename pin_t>
uint32_t dx::coreaudio::server::device< pin_t >::offset

timestamp generation offset to zero reference on seed change

◆ pins

template<typename pin_t>
std::deque<pin_t> dx::coreaudio::server::device< pin_t >::pins

◆ plugin

const ::AudioServerPlugInHostInterface* dx::coreaudio::server::host::plugin
protectedinherited

◆ [struct]

struct { ... } dx::coreaudio::server::device< pin_t >::reference

◆ safety_offset

template<typename pin_t>
uint32_t dx::coreaudio::server::device< pin_t >::safety_offset[2]

RX/TX safety offsets;.

◆ samplerate

template<typename pin_t>
uint32_t dx::coreaudio::server::device< pin_t >::samplerate

cached from the promoted<>::preference this->samplerate at resync_reference() time

◆ seed

template<typename pin_t>
uint64_t dx::coreaudio::server::device< pin_t >::seed

◆ ticks_per_cycle

template<typename pin_t>
int64_t dx::coreaudio::server::device< pin_t >::ticks_per_cycle

host ticks per sync.cycle.lines samples, cached at resync_reference() (software-clocked devices only)

◆ uid

template<typename pin_t>
cf::string dx::coreaudio::server::device< pin_t >::uid

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

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.