dxd - dynax driver framework 2.6.0d205
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::coreaudio::pod::device< desc_t, preference_t, stream_t > Class Template Reference

CoreAudio stream client device. More...

#include <dx_coreaudio_pod_device.h>

Inheritance diagram for dx::coreaudio::pod::device< desc_t, preference_t, stream_t >:
Collaboration diagram for dx::coreaudio::pod::device< desc_t, preference_t, stream_t >:

Public Types

typedef dx::virtuel::stream::desc desc_t
typedef shared::event event
typedef dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream > > stream_t
typedef desc value_t

Public Member Functions

struct stream * align (struct stream *sync_reference)
uint32_t align (uint32_t sync_reference) const
 catch (...)
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
 catch (const std::exception &__std_exception)
virtual void conclude () noexcept
 conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there.
 device (decltype(super::driver)&driver, decltype(super::id)&id)
 dx_catchall_handler (this,) void conclude() noexcept override
uint32_t enumerate (const format &format=any) const
 enumerate typified pins
uint32_t enumerate (const format &format=any) const
 enumerate typified pins
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
struct stream * find (const decltype(stream::target.idx())&target)
struct stream * find (const format &format=any, enum direction::direction direction=direction::any)
struct stream * find (const target &target)
struct stream * find (uint32_t &pin, const format &format=any, enum direction::direction direction=direction::any)
 finds and returns the stream description and pin idx into this stream
struct stream * find (const format &format=any, enum direction::direction direction=direction::any)
struct stream * find (uint32_t &pin, const format &format=any, enum direction::direction direction=direction::any)
 finds and returns the stream description and pin idx into this stream
virtual uint64_t frame () const
DX_PRAGMA_IGNORE_RETURN_VALUE_END void halt () noexcept override try
virtual bool hw_clock () const noexcept
void hw_clock (abstract::event *hw_clock) override
void info (std::ostream &os) noexcept override
virtual void launch ()
 launch notification: object mounted and ready to use
bool operator== (const desc &desc) const
bool operator== (const desc &desc) const
virtual deviceoperator>> (std::ostream &) const
virtual _devicereset ()
virtual void sleep ()
 notify system will sleep stub
bool start (uint64_t frame=0, unsigned int started=1) override try
virtual unsigned int stop (bool force=false) noexcept
std::string string (uint8_t idx) try
uint32_t sync_reference (struct stream *sync_reference)
struct stream * sync_reference (uint32_t sync_reference)
void wake () override

Public Attributes

enum dx::stream::desc::bus bus
promoted::property< typename super::client_map, typename super::client_map::value_t, false > clients
abstract::eventclock
uint32_t clocks
 number of independent clocks [currenlty only single clock support]
promoted< uint32_t >::preference< decltype(dx::stream::control< dx::device<::AudioObjectID, cf::preference > >::preference)> clocksource
std::atomic< size_t > counter
promoted::property< desc_t, ::CFDictionaryRef > desc
bool dflt
 can be selected as default (OS audio) device
dx::driver< decltype(id), cf::preference > & driver
bool editable
 can be edited
bool hidden
 hide device
struct { 
   abstract::event *   clock 
   std::atomic< size_t >   counter 
   uint32_t   iosize 
hw
promoted::property< icon, ::CFURLRef, false > icon
dx::coreaudio::_device::clocksource id
promoted< uint32_t >::preference< decltype(dx::stream::control< dx::device<::AudioObjectID, cf::preference > >::preference)> iosize
uint32_t iosize
bool launched
struct dx::stream::desc::name_id model
dx::stream::device::monitor monitor
std::deque< std::function< void(control &)> > notify
bool persistence
 device has capability to store persistent settings (i.e. sample rate; clock source; etc.)
cf::preference preference
std::string puid
 persistent UID - system unique - could change with location
std::string puuid
 persistent universal UID - universally unique ID (i.e. serial number)
promoted< uint32_t >::preference< decltype(dx::stream::control< dx::device<::AudioObjectID, cf::preference > >::preference)> safety_offset [direction::directions]
promoted::property<::Float64 > samplerate
direction::direction start_stop_order
std::atomic< unsigned int > started
struct dx::stream::desc::stream stream [max_streams]
std::map< decltype(dx::virtuel::stream::desc::stream::target.idx()), std::weak_ptr< dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream > > > > streams
promoted< uint32_t >::preference< decltype(dx::stream::control< dx::device<::AudioObjectID, cf::preference > >::preference)> sync_cycle_ticks
promoted< structdesc_t::stream * >::template preference< decltype(dx::stream::control< dx::device<::AudioObjectID, cf::preference > >::preference), uint32_tsync_reference
struct dx::stream::desc::name_id vendor
dx::stream::device::monitor version

Protected Member Functions

virtual void flush ()

Protected Attributes

std::recursive_mutex start_stop_in_progress
 start/stop operation in progress

Detailed Description

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
class dx::coreaudio::pod::device< desc_t, preference_t, stream_t >

CoreAudio stream client device.

Member Typedef Documentation

◆ desc_t

◆ event

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
typedef shared::event dx::coreaudio::pod::device< desc_t, preference_t, stream_t >::event

◆ stream_t

◆ value_t

typedef desc dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::value_t
inherited

Constructor & Destructor Documentation

◆ device()

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
dx::coreaudio::pod::device< desc_t, preference_t, stream_t >::device ( decltype(super::driver)& driver,
decltype(super::id)& id )
inline

Member Function Documentation

◆ align() [1/2]

struct stream * dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::align ( struct stream * sync_reference)
inlineinherited

◆ align() [2/2]

uint32_t dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::align ( uint32_t sync_reference) const
inlineinherited

◆ catch() [1/3]

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
dx::coreaudio::pod::device< desc_t, preference_t, stream_t >::catch ( ...)
inline

◆ catch() [2/3]

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN dx::coreaudio::pod::device< desc_t, preference_t, stream_t >::catch ( const dx::exception & __dx_exception)
inline

◆ catch() [3/3]

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
dx::coreaudio::pod::device< desc_t, preference_t, stream_t >::catch ( const std::exception & __std_exception)
inline

◆ conclude()

virtual void dx::object::conclude ( )
inlinevirtualnoexceptinherited

conclude notification: object will be removed. If you overwrite conclude() you also need to overwrite destructor and check if its needed to be called from there.

◆ dx_catchall_handler()

dx::stream::control< object_t >::dx_catchall_handler ( this )
inlineoverridenoexceptinherited

◆ enumerate() [1/2]

uint32_t dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::enumerate ( const format & format = any) const
inlineinherited

enumerate typified pins

◆ enumerate() [2/2]

uint32_t dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::enumerate ( const format & format = any) const
inlineinherited

enumerate typified pins

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exception()

void dx::device< ::AudioObjectID, cf::preference >::exception ( const dx::exception & exception,
bool filtered = false ) const
inlineoverridenoexceptinherited

notification exception handler

◆ find() [1/6]

struct stream * dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::find ( const decltype(stream::target.idx())& target)
inlineinherited

◆ find() [2/6]

struct stream * dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::find ( const format & format = any,
enum direction::direction direction = direction::any )
inlineinherited
Parameters
formatsearch stream format filter
directionsearch stream direction filter

◆ find() [3/6]

struct stream * dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::find ( const target & target)
inlineinherited

◆ find() [4/6]

struct stream * dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::find ( uint32_t & pin,
const format & format = any,
enum direction::direction direction = direction::any )
inlineinherited

finds and returns the stream description and pin idx into this stream

Returns
stream description of indexed pin, pin idx will be altered on return!
Parameters
pinin: global pin index, out: pin index into returned stream description
formatsearch stream format filter
directionsearch stream direction filter

◆ find() [5/6]

struct stream * dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::find ( const format & format = any,
enum direction::direction direction = direction::any )
inlineinherited
Parameters
formatsearch stream format filter
directionsearch stream direction filter
Here is the call graph for this function:

◆ find() [6/6]

struct stream * dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::find ( uint32_t & pin,
const format & format = any,
enum direction::direction direction = direction::any )
inlineinherited

finds and returns the stream description and pin idx into this stream

Returns
stream description of indexed pin, pin idx will be altered on return!
Parameters
pinin: global pin index, out: pin index into returned stream description
formatsearch stream format filter
directionsearch stream direction filter
Here is the caller graph for this function:

◆ flush()

virtual void dx::stream::control< object_t >::flush ( )
inlineprotectedvirtualinherited

◆ frame()

Here is the caller graph for this function:

◆ halt()

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::coreaudio::pod::device< desc_t, preference_t, stream_t >::halt ( )
inlineoverridevirtualnoexcept

Reimplemented from dx::coreaudio::_device< dx::virtuel::stream::desc, cf::preference, stream< device< dx::virtuel::stream::desc, cf::preference, stream > > >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hw_clock() [1/2]

◆ hw_clock() [2/2]

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
void dx::coreaudio::pod::device< desc_t, preference_t, stream_t >::hw_clock ( abstract::event * hw_clock)
inlineoverridevirtual
Todo
: coreaudio::pod::device::hw_clock(): change reinterpret_cast to dynamic_cast - investigate why LLVM is not able to dynamically cast

Reimplemented from dx::stream::device< dx::stream::control< dx::device<::AudioObjectID, cf::preference > >, dx::virtuel::stream::desc, stream< device< dx::virtuel::stream::desc, cf::preference, stream > > >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ info()

◆ launch()

virtual void dx::object::launch ( )
inlinevirtualinherited

launch notification: object mounted and ready to use

◆ operator==() [1/2]

bool dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::operator== ( const desc & desc) const
inlineinherited

◆ operator==() [2/2]

bool dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::operator== ( const desc< target, 2, 2 > & desc) const
inlineinherited

◆ operator>>()

virtual device & dx::device< ::AudioObjectID, cf::preference >::operator>> ( std::ostream & ) const
inlinevirtualinherited

◆ reset()

◆ sleep()

virtual void dx::device< ::AudioObjectID, cf::preference >::sleep ( )
inlinevirtualinherited

notify system will sleep stub

◆ start()

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
bool dx::coreaudio::pod::device< desc_t, preference_t, stream_t >::start ( uint64_t frame = 0,
unsigned int started = 1 )
inlineoverridevirtual

result indicates if start changed the state.

Reimplemented from dx::coreaudio::_device< dx::virtuel::stream::desc, cf::preference, stream< device< dx::virtuel::stream::desc, cf::preference, stream > > >.

Here is the call graph for this function:

◆ stop()

virtual unsigned int dx::stream::control< object_t >::stop ( bool force = false)
inlinevirtualnoexceptinherited

result indicates the amount of stopped start references

◆ string()

◆ sync_reference() [1/2]

uint32_t dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::sync_reference ( struct stream * sync_reference)
inlineinherited

◆ sync_reference() [2/2]

struct stream * dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::sync_reference ( uint32_t sync_reference)
inlineinherited

◆ wake()

Member Data Documentation

◆ bus

enum dx::stream::desc::bus dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::bus
inherited

◆ clients

◆ clock

◆ clocks

uint32_t dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::clocks
inherited

number of independent clocks [currenlty only single clock support]

◆ clocksource

◆ counter

◆ desc

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream>
promoted::property<desc_t, ::CFDictionaryRef> dx::coreaudio::pod::device< desc_t, preference_t, stream_t >::desc
Initial value:
{this->id, {.mSelector= property::device::desc},
[this](const desc_t& desc){static_cast<desc_t&>(*this)= desc;}}
promoted::property< desc_t, ::CFDictionaryRef > desc
Definition dx_coreaudio_pod_device.h:98
dx::virtuel::stream::desc desc_t
Definition dx_stream_device.h:75
static constexpr auto desc
Definition dx_coreaudio_property.h:136

◆ dflt

bool dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::dflt
inherited

can be selected as default (OS audio) device

◆ driver

dx::driver<decltype(id), cf::preference>& dx::device< ::AudioObjectID, cf::preference >::driver
inherited

◆ editable

bool dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::editable
inherited

can be edited

◆ hidden

bool dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::hidden
inherited

hide device

◆ [struct]

◆ icon

◆ id

◆ iosize [1/2]

◆ iosize [2/2]

◆ launched

bool dx::object::launched
inherited

◆ model

struct dx::stream::desc::name_id dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::model
inherited

◆ monitor

◆ notify

std::deque<std::function<void(control&)> > dx::stream::control< object_t >::notify
inherited

◆ persistence

bool dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::persistence
inherited

device has capability to store persistent settings (i.e. sample rate; clock source; etc.)

◆ preference

cf::preference dx::device< ::AudioObjectID, cf::preference >::preference
inherited

◆ puid

std::string dx::device< ::AudioObjectID, cf::preference >::puid
inherited

persistent UID - system unique - could change with location

◆ puuid

std::string dx::device< ::AudioObjectID, cf::preference >::puuid
inherited

persistent universal UID - universally unique ID (i.e. serial number)

◆ safety_offset

◆ samplerate

◆ start_stop_in_progress

std::recursive_mutex dx::stream::control< object_t >::start_stop_in_progress
protectedinherited

start/stop operation in progress

◆ start_stop_order

direction::direction dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::start_stop_order
inherited

◆ started

std::atomic<unsigned int> dx::stream::control< object_t >::started
inherited

◆ stream

struct dx::stream::desc::stream dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::stream[max_streams]
inherited

◆ streams

◆ sync_cycle_ticks

◆ sync_reference

◆ vendor

struct dx::stream::desc::name_id dx::stream::desc< target, max_streams, max_pins, 1, 1, 1 >::vendor
inherited

◆ version


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.