dxd - dynax driver framework 2.2.0d91
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::coreaudio::stream::device< desc_t, stream_t > Class Template Reference

CoreAudio stream client device. More...

#include <dx_coreaudio_stream_device.h>

+ Inheritance diagram for dx::coreaudio::stream::device< desc_t, stream_t >:
+ Collaboration diagram for dx::coreaudio::stream::device< desc_t, stream_t >:

Public Types

typedef desc_t desc
 

Public Member Functions

 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (...)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
virtual uint32_t clocksource ()
 
virtual uint32_t clocksource (uint32_t clocksource) try
 
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
 
 dx_catchall_rethrow ()
 
 dx_catchall_rethrow () template< typename observer_t
 
 dx_catchall_rethrow (, "iosize: %d (current: %d)", iosize, this->hw.iosize) int32_t iosize() const override try
 
void exception (const dx::exception &exception, bool filtered=false) const noexcept override
 notification exception handler
 
virtual uint64_t frame () const
 
void info (std::ostream &os) noexcept override
 log object class information
 
virtual int32_t iosize () const try
 
int32_t iosize (uint32_t iosize) override try
 
virtual int32_t iosize (uint32_t iosize, dx::event< user > &hw_clock) try
 
virtual void launch ()
 launch notification: object mounted and ready to use
 
virtual bool monitor () noexcept
 
monitor_t * monitor (bool force=false)
 
virtual devicereset ()
 
virtual uint32_t safety_offset (dx::stream::direction::direction direction) const try
 obtain persistent number of rx safety offset ticks - defaults to stream desc config setting
 
virtual uint32_t safety_offset (dx::stream::direction::direction direction, uint32_t safety_offset) try
 set persistent number of rx/tx safety offset ticks
 
virtual uint32_t samplerate () const
 
uint32_t samplerate (uint32_t samplerate) override try
 
bool start (uint64_t frame=0, unsigned int started=1) override try
 
virtual unsigned int stop (bool force=false) noexcept
 
virtual uint32_t sync_cycle_ticks () const try
 obtain persistent number of ticks per sync cycle - defaults to sync_cycle.hw_min_ticks with an absolute minimum of 2 ticks
 
virtual int32_t sync_reference () const try
 
virtual int32_t sync_reference (uint32_t sync_reference) try
 

Public Attributes

dx::event< user > * clock
 
std::atomic< size_t > counter
 
dx::driver< decltype(id)> & driver
 
struct { 
 
   dx::event< user > *   clock 
 
   std::atomic< size_t >   counter 
 
   uint32_t   iosize 
 
hw 
 
const ::AudioObjectID id
 
uint32_t iosize
 
bool launched {}
 
std::deque< std::function< void(control &)> notify )
 
decltype(driver.preference) preference
 
std::string puid
 persistent UID (i.e. serial number)
 
std::string puuid
 persistent universal UID
 
shared::memory< dx::stream::clock::monitorshared_monitor
 
std::atomic< unsigned int > started
 
std::map< decltype(desc_t::stream::target.idx()), std::weak_ptr< stream_t > > streams
 
uint32_t version
 

Protected Member Functions

virtual void halt ()
 

Protected Attributes

std::recursive_mutex start_stop_in_progress
 start/stop operation in progress
 

Detailed Description

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

CoreAudio stream client device.

Member Typedef Documentation

◆ desc

typedef desc_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::desc
inherited

Constructor & Destructor Documentation

◆ device()

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

Member Function Documentation

◆ catch() [1/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( ...)
inlineinherited

◆ catch() [2/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( ...)
inlineinherited

◆ catch() [3/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( ...)
inlineinherited

◆ catch() [4/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( ...)
inlineinherited

◆ catch() [5/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( ...)
inlineinherited

◆ catch() [6/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( ...)
inlineinherited

◆ catch() [7/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( ...)
inlineinherited

◆ catch() [8/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( ...)
inlineinherited

◆ catch() [9/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( ...)
inlineinherited

◆ catch() [10/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( ...)
inlineinherited

◆ catch() [11/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [12/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [13/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [14/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [15/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [16/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [17/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [18/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [19/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [20/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const dx::exception & __dx_exception)
inlineinherited

◆ catch() [21/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [22/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [23/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [24/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [25/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [26/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [27/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [28/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [29/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const std::exception & __std_exception)
inlineinherited

◆ catch() [30/30]

dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::catch ( const std::exception & __std_exception)
inlineinherited

◆ clocksource() [1/2]

virtual uint32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::clocksource ( )
inlinevirtualinherited

◆ clocksource() [2/2]

virtual uint32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::clocksource ( uint32_t clocksource)
inlinevirtualinherited

◆ 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.

Reimplemented in dx::proxy::stream::_device< desc_t, stream_t >, dx::usb::pipe< device_t >, dx::usb::pipe< device_t >, dx::proxy::device, dx::proxy::device, dx::map::driver< device >, and dx::map::driver< device_t >.

+ Here is the caller graph for this function:

◆ dx_catchall_handler()

dx::stream::control< dx::device<::AudioObjectID > >::dx_catchall_handler ( this )
inlineoverridenoexceptinherited

◆ dx_catchall_rethrow() [1/3]

template<typename desc_t , typename stream_t >
dx::coreaudio::_device< desc_t, stream_t >::dx_catchall_rethrow ( )
inherited

◆ dx_catchall_rethrow() [2/3]

template<typename desc_t , typename stream_t >
dx::coreaudio::_device< desc_t, stream_t >::dx_catchall_rethrow ( )
inherited

◆ dx_catchall_rethrow() [3/3]

template<typename desc_t , typename stream_t >
dx::coreaudio::_device< desc_t, stream_t >::dx_catchall_rethrow ( "iosize: %d (current: %d)" ,
iosize ,
this->hw. iosize ) const
inlineoverrideinherited

◆ exception()

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

notification exception handler

Implements dx::object.

◆ frame()

template<typename desc_t , typename stream_t >
virtual uint64_t dx::coreaudio::_device< desc_t, stream_t >::frame ( ) const
inlinevirtualinherited
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ halt()

virtual void dx::stream::control< dx::device<::AudioObjectID > >::halt ( )
inlineprotectedvirtualinherited

◆ info()

template<typename desc_t , typename stream_t >
void dx::coreaudio::_device< desc_t, stream_t >::info ( std::ostream & os)
inlineoverridevirtualnoexceptinherited

log object class information

Reimplemented from dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > >, desc_t, stream_t >.

+ Here is the call graph for this function:

◆ iosize() [1/3]

virtual int32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::iosize ( ) const
inlinevirtualinherited

<

Todo
stream::device calculate default iosize from desc

◆ iosize() [2/3]

template<typename desc_t , typename stream_t >
int32_t dx::coreaudio::_device< desc_t, stream_t >::iosize ( uint32_t iosize)
inlineoverridevirtualinherited

◆ iosize() [3/3]

virtual int32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::iosize ( uint32_t iosize,
dx::event< user > & hw_clock )
inlinevirtualinherited

◆ launch()

◆ monitor() [1/2]

virtual bool dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::monitor ( )
inlinevirtualnoexceptinherited

◆ monitor() [2/2]

monitor_t * dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::monitor ( bool force = false)
inlineinherited

◆ reset()

virtual device & dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::reset ( )
inlinevirtualinherited

◆ safety_offset() [1/2]

virtual uint32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::safety_offset ( dx::stream::direction::direction direction) const
inlinevirtualinherited

obtain persistent number of rx safety offset ticks - defaults to stream desc config setting

◆ safety_offset() [2/2]

virtual uint32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::safety_offset ( dx::stream::direction::direction direction,
uint32_t safety_offset )
inlinevirtualinherited

set persistent number of rx/tx safety offset ticks

◆ samplerate() [1/2]

virtual uint32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::samplerate ( ) const
inlinevirtualinherited
Todo
dedicated stream::device::clock class

◆ samplerate() [2/2]

template<typename desc_t , typename stream_t >
uint32_t dx::coreaudio::_device< desc_t, stream_t >::samplerate ( uint32_t samplerate)
inlineoverridevirtualinherited

Reimplemented from dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > >, desc_t, stream_t >.

+ Here is the call graph for this function:

◆ start()

template<typename desc_t = dx::virtuel::stream::desc, template< typename ... > typename stream_t = stream>
bool dx::coreaudio::stream::device< desc_t, stream_t >::start ( uint64_t = 0,
unsigned int starting = 1 )
inlineoverridevirtual

result indicates if start changed the state.

Reimplemented from dx::stream::control< dx::device<::AudioObjectID > >.

+ Here is the call graph for this function:

◆ stop()

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

result indicates the amount of stopped start references

◆ sync_cycle_ticks()

virtual uint32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::sync_cycle_ticks ( ) const
inlinevirtualinherited

obtain persistent number of ticks per sync cycle - defaults to sync_cycle.hw_min_ticks with an absolute minimum of 2 ticks

◆ sync_reference() [1/2]

virtual int32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::sync_reference ( ) const
inlinevirtualinherited

◆ sync_reference() [2/2]

virtual int32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::sync_reference ( uint32_t sync_reference)
inlinevirtualinherited

Member Data Documentation

◆ clock

dx::event<user>* dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::clock
inherited

◆ counter

std::atomic<size_t> dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::counter
inherited

◆ driver

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

◆ [struct]

struct { ... } dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::hw

◆ id

const ::AudioObjectID dx::device< ::AudioObjectID >::id
inherited

◆ iosize

uint32_t dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::iosize
inherited

◆ launched

bool dx::object::launched {}
inherited

◆ notify

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

◆ preference

decltype(driver.preference) dx::device< ::AudioObjectID >::preference
inherited

◆ puid

std::string dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::puid
inherited

persistent UID (i.e. serial number)

◆ puuid

std::string dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::puuid
inherited

persistent universal UID

◆ shared_monitor

shared::memory<dx::stream::clock::monitor> dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::shared_monitor
inherited

◆ start_stop_in_progress

std::recursive_mutex dx::stream::control< dx::device<::AudioObjectID > >::start_stop_in_progress
protectedinherited

start/stop operation in progress

◆ started

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

◆ streams

std::map<decltype(desc_t::stream::target.idx()), std::weak_ptr<stream_t> > dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > > , desc_t, stream_t >::streams
inherited

◆ version

uint32_t dx::device< ::AudioObjectID >::version
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on Tue Mar 11 2025

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.