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

the puppet endpoint's client device: it announces its own session to the counterpart, whose streaming is what animates it More...

#include <dx_coreaudio_pod_device.h>

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

Public Types

typedef dx::virtuel::stream::desc desc_t
typedef shared::event event_t
typedef promoted< uint32_t >::template preference< decltype(dx::device<::AudioObjectID, cf::preference >::preference)> source_t
typedef dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > > stream_t
typedef desc value_t

Public Member Functions

struct stream * align (struct stream *sync_reference)
uint32_t align (uint32_t sync_reference) const
void attach (channel_t **io[dx::stream::direction::directions][2], const std::vector< bool >(&channel_map)[2])
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN catch (const dx::exception &__dx_exception)
void conclude () noexcept override
 ends every group's session before the device's resources go; the start counts stay with their holders
 device (decltype(super::driver)&driver, decltype(super::id)&id)
 dx_catchall_handler (this,) protected
 operator[](): a group just came into existence, a host wires its per-group transports here
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 DX_PRAGMA_IGNORE_RETURN_VALUE_END uint64_t frame () const
virtual bool hw_clock () const noexcept
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN DX_PRAGMA_IGNORE_RETURN_VALUE_END void hw_clock (abstract::event *hw_clock, uint32_t iosize) override
void info (std::ostream &os) noexcept override
 log object class information
bool operator== (const desc &desc) const
bool operator== (const desc &desc) const
virtual deviceoperator>> (std::ostream &) const
groupoperator[] (const typename dx::virtuel::stream::desc::stream::desc &stream)
 the stream's group, created on first use
virtual _devicereset ()
virtual void sleep ()
 notify system will sleep stub
virtual std::pair< source_t &, bool > source (const struct dx::virtuel::stream::desc::stream &stream)
 the stream's source selector, created on first use: the preference by stream target, the value an index into the stream's sources
std::string string (uint8_t idx) try
uint32_t sync_reference (struct stream *sync_reference)
struct stream * sync_reference (uint32_t sync_reference)
bool try_conclude () noexcept
 atomically conclude()s if currently launched; returns whether this call did it
bool try_launch ()
 atomically launch()es if not already launched; returns whether this call did it
void wake () override

Public Attributes

dx::stream::bus::bus bus
 the bus this device hangs on
promoted::property< typename super::client_map, typename super::client_map::value_t, false > clients
dx::shared::guard< std::map< abstract::event *, dx::stream::clock::consumer > > clock
 event -> its own iosize and sample counter
uint32_t clocks
 number of independent clocks [currenlty only single clock support]
promoted< uint32_t >::preference< decltype(dx::device<::AudioObjectID, cf::preference >::preference)> clocksource
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
struct dx::stream::desc::firmware firmware
std::map< decltype(dx::virtuel::stream::desc::stream::group), group > group
bool hidden
 hide device
struct { 
   dx::shared::guard< std::map< abstract::event *, dx::stream::clock::consumer > >   clock 
 event -> its own iosize and sample counter More...
   uint32_t   iosize 
 staging value for registration paths without their own iosize argument (macOS CF property bridge) More...
hw
promoted::property< icon, ::CFURLRef, false > icon
dx::coreaudio::_device::clocksource id
uint32_t iosize
 staging value for registration paths without their own iosize argument (macOS CF property bridge)
std::atomic< bool > launched
struct dx::stream::desc::name_id model
dx::stream::device::monitor monitor
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::property<::Float64 > samplerate
std::map< decltype(dx::virtuel::stream::desc::stream::target.idx()), source_tsources
direction::direction start_stop_order
struct dx::stream::desc::stream stream [max_streams]
uint32_t streams
 number of streams
promoted< structdesc_t::stream * >::template preference< decltype(dx::device<::AudioObjectID, cf::preference >::preference), uint32_tsync_reference
struct dx::stream::desc::name_id vendor
dx::stream::device::monitor version

Static Public Attributes

static constexpr bool hosted

Protected Member Functions

virtual void launch ()
 launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

Detailed Description

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

the puppet endpoint's client device: it announces its own session to the counterpart, whose streaming is what animates it

< the app's consumer group (dx::stream::engine::group) wraps this bus's own

Member Typedef Documentation

◆ desc_t

◆ event_t

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

◆ source_t

◆ stream_t

◆ value_t

typedef desc dx::stream::desc< target, max_streams, max_pins, 1, 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, template< typename ... > typename group_t = group>
dx::coreaudio::pod::device< desc_t, preference_t, stream_t, group_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, 1 >::align ( struct stream * sync_reference)
inlineinherited

◆ align() [2/2]

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

◆ attach()

void dx::stream::device< dx::device<::AudioObjectID, cf::preference >, dx::virtuel::stream::desc, dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > >, group< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > > >::attach ( channel_t ** io[dx::stream::direction::directions][2],
const std::vector< bool >(&) channel_map[2] )
inlineinherited

◆ catch()

◆ conclude()

ends every group's session before the device's resources go; the start counts stay with their holders

◆ dx_catchall_handler()

operator[](): a group just came into existence, a host wires its per-group transports here

◆ enumerate() [1/2]

uint32_t dx::stream::desc< target, max_streams, max_pins, 1, 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, 1 >::enumerate ( const format & format = any) const
inlineinherited

enumerate typified pins

Here is the call 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, 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, 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, 1 >::find ( const target & target)
inlineinherited

◆ find() [4/6]

struct stream * dx::stream::desc< target, max_streams, max_pins, 1, 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, 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, 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:

◆ frame()

◆ hw_clock() [1/2]

virtual bool dx::stream::device< dx::device<::AudioObjectID, cf::preference >, dx::virtuel::stream::desc, stream< device< dx::virtuel::stream::desc, cf::preference, stream, group, _hosted > >, group< device< dx::virtuel::stream::desc, cf::preference, stream, group, _hosted > > >::hw_clock ( ) const
inlinevirtualnoexceptinherited

◆ hw_clock() [2/2]

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream, template< typename ... > typename group_t = group>
DX_PRAGMA_IGNORE_RETURN_VALUE_BEGIN DX_PRAGMA_IGNORE_RETURN_VALUE_END void dx::coreaudio::pod::device< desc_t, preference_t, stream_t, group_t >::hw_clock ( abstract::event * hw_clock,
uint32_t iosize )
inlineoverridevirtual

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

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

◆ info()

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream, template< typename ... > typename group_t = group>
void dx::coreaudio::pod::device< desc_t, preference_t, stream_t, group_t >::info ( std::ostream & os)
inlineoverridevirtualnoexcept

log object class information

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

Here is the call graph for this function:

◆ launch()

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

launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.

◆ operator==() [1/2]

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

◆ operator==() [2/2]

bool dx::stream::desc< target, max_streams, max_pins, 1, 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

◆ operator[]()

group & dx::stream::device< dx::device<::AudioObjectID, cf::preference >, dx::virtuel::stream::desc, dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > >, group< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > > >::operator[] ( const typename dx::virtuel::stream::desc::stream::desc & stream)
inlineinherited

the stream's group, created on first use

◆ reset()

◆ sleep()

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

notify system will sleep stub

◆ source()

the stream's source selector, created on first use: the preference by stream target, the value an index into the stream's sources

◆ string()

◆ sync_reference() [1/2]

uint32_t dx::stream::desc< target, max_streams, max_pins, 1, 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, 1 >::sync_reference ( uint32_t sync_reference)
inlineinherited

◆ try_conclude()

bool dx::object::try_conclude ( )
inlinenoexceptinherited

atomically conclude()s if currently launched; returns whether this call did it

◆ try_launch()

bool dx::object::try_launch ( )
inlineinherited

atomically launch()es if not already launched; returns whether this call did it

◆ wake()

Member Data Documentation

◆ bus

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

the bus this device hangs on

◆ clients

◆ clock

◆ clocks

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

number of independent clocks [currenlty only single clock support]

◆ clocksource

◆ desc

template<typename desc_t = dx::virtuel::stream::desc, typename preference_t = cf::preference, template< typename ... > typename stream_t = stream, template< typename ... > typename group_t = group>
promoted::property<desc_t, ::CFDictionaryRef> dx::coreaudio::pod::device< desc_t, preference_t, stream_t, group_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:174
dx::virtuel::stream::desc desc_t
Definition dx_stream_device.h:101
static constexpr auto desc
Definition dx_coreaudio_property.h:137

◆ dflt

bool dx::stream::desc< target, max_streams, max_pins, 1, 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, 1 >::editable
inherited

can be edited

◆ firmware

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

◆ group

std::map<decltype(dx::virtuel::stream::desc::stream::group), group> dx::stream::device< dx::device<::AudioObjectID, cf::preference >, dx::virtuel::stream::desc, dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > >, group< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > > >::group
inherited

streaming groups by desc::stream::group id: every stream of this device is registered with its group

◆ hidden

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

hide device

◆ hosted

bool dx::coreaudio::device< dx::virtuel::stream::desc, cf::preference, stream, group, _hosted >::hosted
staticconstexprinherited

◆ [struct]

Todo
migrate hw clock generation/distribution into a dedicated clock class

◆ icon

◆ id

◆ iosize

staging value for registration paths without their own iosize argument (macOS CF property bridge)

◆ launched

std::atomic<bool> dx::object::launched
inherited

◆ model

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

◆ monitor

◆ persistence

bool dx::stream::desc< target, max_streams, max_pins, 1, 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)

◆ samplerate

◆ sources

std::map<decltype(dx::virtuel::stream::desc::stream::target.idx()), source_t> dx::stream::device< dx::device<::AudioObjectID, cf::preference >, dx::virtuel::stream::desc, dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > >, group< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream, group, false > > >::sources
inherited

source selectors by stream target: a stream with sources gets its own on first use

◆ start_stop_order

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

◆ stream

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

◆ streams

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

number of streams

◆ sync_reference

◆ vendor

struct dx::stream::desc::name_id dx::stream::desc< target, max_streams, max_pins, 1, 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.