dxd - dynax driver framework 2.3.0d118
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::coreaudio::driver< device_t > Class Template Referenceabstract

#include <dx_coreaudio_driver.h>

+ Inheritance diagram for dx::coreaudio::driver< device_t >:
+ Collaboration diagram for dx::coreaudio::driver< device_t >:

Public Member Functions

virtual bool boot () try
 
void exception (const class exception &exception, bool filtered=false) const noexcept override try
 notification exception handler
 
virtual void exception (const exception &exception, bool filtered=false) const noexcept=0
 notification exception handler
 
virtual void info (std::ostream &os) noexcept
 log object class information
 
virtual bool shutdown () try
 client driver::shutdown/boot(): override to shutdown/boot host driver
 

Public Attributes

elements
 STL member.
 
keys
 STL member.
 
bool launched {}
 
const log log
 
const char * product_id
 
uint32_t version
 

Protected Member Functions

void add (const device_id_t &device_id) override try
 adds a new device to the device list
 
dx_catchall_rethrow() using super void add (const std::string &id, const typename device_t::desc &desc) try
 
virtual void arrived ()
 notify device arrivals completed stub
 
dx_catchall_rethrow() using super void arrived (device_t &device) override try
 notify specific device arrival stub
 
 catch (...)
 
 catch (...)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const dx::exception &__dx_exception)
 
 catch (const std::exception &__std_exception)
 
 catch (const std::exception &__std_exception)
 
void clear () noexcept try
 replaces std::map::clear to call virtual notification methods
 
void conclude () noexcept override try
 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.
 
 driver (const match &matching_ids, const char *product_id, dx::log log={})
 the driver interface class constructor
 
 dx_catchall_rethrow () bool connect() try
 
 dx_catchall_rethrow () void launch() override try
 
void launch () override
 launch notification: object mounted and ready to use
 
virtual void notify (::AudioObjectID id, const property::addresses &addresses) try
 
dx::log operator= (const dx::log &log) override try
 
dx_catchall_rethrow() using typename super std::shared_ptr< device_t > operator[] (const std::string &id) try
 
void remove (const device_id_t &device_id) override try
 finds and removes a device from the device list
 
dx_catchall_rethrow() using super void remove (const std::string &id) try
 
virtual void removed () noexcept
 notify device removals completed stub
 
virtual void removed (device_t &) noexcept
 notify specific device removal stub
 
virtual void scan () try
 

Protected Attributes

dx_catchall_rethrow() std std::map<::AudioObjectPropertySelector, property::listenlisten
 
dx_catchall_handler(this,) public typedef std::map< device_id_t, std::shared_ptr< device_t > > map
 
dx_catchall_rethrow() public ::AudioObjectID plugin = 0
 

Constructor & Destructor Documentation

◆ driver()

template<class device_t >
dx::coreaudio::driver< device_t >::driver ( const match & matching_ids,
const char * product_id,
dx::log log = {} )
inlineprotected

the driver interface class constructor

Todo
handle kext blocking https://developer.apple.com/library/content/technotes/tn2459/_index.html
Parameters
matching_idsthe matching dictionaries identifying the driver interface
product_iddrivers bundle ID

Member Function Documentation

◆ add() [1/2]

template<typename device_t >
void dx::map::driver< device_t >::add ( const device_id_t & device_id)
inlineoverrideprotectedvirtualinherited

adds a new device to the device list

Exceptions
dx::exception

Implements dx::driver< decltype(device_t::id)>.

Reimplemented in dx::virtuel::driver< device_t >.

+ Here is the call graph for this function:

◆ add() [2/2]

template<class device_t >
dx_catchall_rethrow() using super void dx::coreaudio::driver< device_t >::add ( const std::string & id,
const typename device_t::desc & desc )
inlineprotected
+ Here is the caller graph for this function:

◆ arrived() [1/2]

◆ arrived() [2/2]

template<class device_t >
dx_catchall_rethrow() using super void dx::coreaudio::driver< device_t >::arrived ( device_t & )
inlineoverrideprotectedvirtual

notify specific device arrival stub

Reimplemented from dx::map::driver< device_t >.

◆ boot()

virtual bool dx::driver< decltype(device_t::id) >::boot ( )
inlinevirtualinherited

◆ catch() [1/6]

template<typename device_t >
dx::map::driver< device_t >::catch ( ...)
inlineprotectedinherited

◆ catch() [2/6]

template<typename device_t >
dx::map::driver< device_t >::catch ( ...)
inlineprotectedinherited

◆ catch() [3/6]

template<typename device_t >
dx::map::driver< device_t >::catch ( const dx::exception & __dx_exception)
inlineprotectedinherited

◆ catch() [4/6]

template<typename device_t >
dx::map::driver< device_t >::catch ( const dx::exception & __dx_exception)
inlineprotectedinherited

◆ catch() [5/6]

template<typename device_t >
dx::map::driver< device_t >::catch ( const std::exception & __std_exception)
inlineprotectedinherited

◆ catch() [6/6]

template<typename device_t >
dx::map::driver< device_t >::catch ( const std::exception & __std_exception)
inlineprotectedinherited

◆ clear()

template<typename device_t >
void dx::map::driver< device_t >::clear ( )
inlineprotectednoexceptinherited

replaces std::map::clear to call virtual notification methods

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

◆ conclude()

template<typename device_t >
void dx::map::driver< device_t >::conclude ( )
inlineoverrideprotectedvirtualnoexceptinherited

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 from dx::object.

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

◆ dx_catchall_rethrow() [1/2]

template<class device_t >
dx::coreaudio::driver< device_t >::dx_catchall_rethrow ( )
inlineprotected

◆ dx_catchall_rethrow() [2/2]

template<class device_t >
dx::coreaudio::driver< device_t >::dx_catchall_rethrow ( )
inlineoverrideprotected

◆ exception() [1/2]

void dx::driver< decltype(device_t::id) >::exception ( const class exception & exception,
bool filtered = false ) const
inlineoverridenoexceptinherited

notification exception handler

◆ exception() [2/2]

virtual void dx::object::exception ( const exception & exception,
bool filtered = false ) const
pure virtualnoexceptinherited

notification exception handler

Implemented in dx::device< std::string >, dx::device<::AudioObjectID >, dx::device<::io_service_t >, dx::device< id_t >, dx::stream::pin< device_t, _circular_t >, dx::virtuel::stream::_device< desc_t, preference_t, stream_t >, dx::proxy::device, dx::usb::platform::device, and dx::proxy::device.

+ Here is the caller graph for this function:

◆ info()

virtual void dx::object::info ( std::ostream & os)
inlinevirtualnoexceptinherited

log object class information

Reimplemented in dx::device< std::string >, dx::device<::AudioObjectID >, dx::device<::io_service_t >, dx::device< id_t >, dx::proxy::stream::_device< desc_t, preference_t, stream_t >, dx::stream::engine< device_t, pin_t, driver_t, io_t, circular_t >, dx::stream::engine< device< super_device_t >, audio_pin_t, dx::proxy::driver< device< super_device_t > >, int32_t >, dx::stream::engine< dx::test::device< super_device_t >, audio_pin_t, dx::proxy::driver< dx::test::device< super_device_t > >, int32_t >, dx::stream::engine< dx::test::device< super_device_t >, audio_pin_t, dx::virtuel::driver< dx::test::device< super_device_t > >, int32_t >, dx::stream::engine< dx::test::midi::device< super_device_t >, audio_pin_t, dx::proxy::driver< dx::test::midi::device< super_device_t > >, int32_t >, dx::usb::pipe< device_t >, dx::usb::pipe< device_t >, dx::usb::stream::_device< desc_t, preference_t, stream_t >, dx::virtuel::driver< device_t >, dx::virtuel::stream::_device< desc_t, preference_t, stream_t >, dx::coreaudio::pod::device< desc_t, preference_t, stream_t >, dx::proxy::device, dx::proxy::driver< device< pin_t > >, dx::proxy::driver< device< stream_pin_t > >, dx::proxy::driver< device< super_device_t > >, dx::proxy::driver< device_t >, dx::proxy::driver< dx::test::device< super_device_t > >, dx::proxy::driver< dx::test::midi::device< super_device_t > >, dx::proxy::driver< device_t >, dx::usb::platform::device, dx::proxy::device, dx::stream::object< _device_t >, dx::stream::object< device >, dx::stream::object< device_t >, dx::stream::control< dx::device< std::string > >, dx::stream::control< dx::device<::AudioObjectID > >, dx::stream::control< dx::proxy::device >, dx::stream::control< dx::stream::object< device > >, dx::stream::control< dx::stream::object< device_t > >, dx::stream::control< object< device_t > >, dx::stream::control< stream::object< device > >, dx::stream::control< stream::object< device_t > >, dx::stream::control< usb::device >, dx::stream::device< dx::stream::control< dx::device< std::string > >, desc, dx::preference, dx::stream::shared::stream< device< desc, dx::preference, dx::stream::shared::stream > > >, dx::stream::device< dx::stream::control< dx::device< std::string > >, desc_t, preference_t, stream_t >, dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > >, desc_t, preference_t, stream_t >, dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > >, dx::virtuel::stream::desc, cf::preference, dx::stream::stream< device< dx::virtuel::stream::desc, cf::preference, dx::stream::stream > > >, dx::stream::device< dx::stream::control< dx::device<::AudioObjectID > >, dx::virtuel::stream::desc, cf::preference, stream< device< dx::virtuel::stream::desc, cf::preference, stream > > >, dx::stream::device< dx::stream::control< dx::proxy::device >, desc_t, preference_t, stream_t >, dx::stream::device< dx::stream::control< dx::proxy::device >, dx::stream::desc<>, dx::preference, stream< device< dx::stream::desc<>, dx::preference, stream > > >, dx::stream::device< dx::stream::control< usb::device >, desc_t, dx::preference, pipe< device< desc_t, dx::preference, pipe > > >, dx::stream::device< dx::stream::control< usb::device >, desc_t, preference_t, stream_t >, dx::stream::pin< device_t, _circular_t >, dx::stream::stream< device< desc_t, dx::preference, pipe >, dx::circular, usb::pipe< device< desc_t, dx::preference, pipe > > >, dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, dx::test::driver< super_device_t, audio_pin_t, int32_t, dx::test::device< super_device_t >, dx::proxy::driver< dx::test::device< super_device_t > >, dx::stream::engine< dx::test::device< super_device_t >, audio_pin_t, dx::proxy::driver< dx::test::device< super_device_t > >, int32_t > >, dx::test::driver< super_device_t, audio_pin_t, int32_t, dx::test::device< super_device_t >, dx::virtuel::driver< dx::test::device< super_device_t > >, dx::stream::engine< dx::test::device< super_device_t >, audio_pin_t, dx::virtuel::driver< dx::test::device< super_device_t > >, int32_t > >, dx::test::driver< super_device_t, audio_pin_t, int32_t, dx::test::midi::device< super_device_t >, dx::proxy::driver< dx::test::midi::device< super_device_t > >, dx::stream::engine< dx::test::midi::device< super_device_t >, audio_pin_t, dx::proxy::driver< dx::test::midi::device< super_device_t > >, int32_t > >, dx::test::driver< super_device_t, audio_pin_t, io_t, device_t, driver_t, engine_t >, and dx::test::usb::driver< super_device_t, audio_pin_t, io_t, device_t, driver_t, engine_t >.

+ Here is the caller graph for this function:

◆ launch()

template<typename device_t >
void dx::map::driver< device_t >::launch ( )
inlineoverrideprotectedvirtualinherited

launch notification: object mounted and ready to use

Reimplemented from dx::object.

Reimplemented in dx::virtuel::driver< device_t >, dx::proxy::driver< device_t >, and dx::proxy::driver< device_t >.

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

◆ notify()

template<class device_t >
virtual void dx::coreaudio::driver< device_t >::notify ( ::AudioObjectID id,
const property::addresses & addresses )
inlineprotectedvirtual
Todo
coreaudio::driver::notify(): evaluate other synchronization options
+ Here is the call graph for this function:

◆ operator=()

template<class device_t >
dx::log dx::coreaudio::driver< device_t >::operator= ( const dx::log & log)
inlineoverrideprotectedvirtual

◆ operator[]()

template<class device_t >
dx_catchall_rethrow() using typename super std::shared_ptr< device_t > dx::coreaudio::driver< device_t >::operator[] ( const std::string & id)
inlineprotected

◆ remove() [1/2]

template<typename device_t >
void dx::map::driver< device_t >::remove ( const device_id_t & device_id)
inlineoverrideprotectedvirtualinherited

finds and removes a device from the device list

Exceptions
dx::exception

Implements dx::driver< decltype(device_t::id)>.

Reimplemented in dx::proxy::driver< device_t >.

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

◆ remove() [2/2]

template<class device_t >
dx_catchall_rethrow() using super void dx::coreaudio::driver< device_t >::remove ( const std::string & id)
inlineprotected
+ Here is the caller graph for this function:

◆ removed() [1/2]

template<typename device_t >
virtual void dx::driver< device_id_t >::removed ( )
inlineprotectedvirtualnoexceptinherited

notify device removals completed stub

Reimplemented from dx::driver< decltype(device_t::id)>.

+ Here is the caller graph for this function:

◆ removed() [2/2]

template<typename device_t >
virtual void dx::map::driver< device_t >::removed ( device_t & )
inlineprotectedvirtualnoexceptinherited

notify specific device removal stub

Reimplemented in dx::stream::engine< device_t, pin_t, driver_t, io_t, circular_t >.

◆ scan()

template<class device_t >
virtual void dx::coreaudio::driver< device_t >::scan ( )
inlineprotectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shutdown()

virtual bool dx::driver< decltype(device_t::id) >::shutdown ( )
inlinevirtualinherited

client driver::shutdown/boot(): override to shutdown/boot host driver

Member Data Documentation

◆ elements

T std::map< K, T >::elements
inherited

STL member.

◆ keys

K std::map< K, T >::keys
inherited

STL member.

◆ launched

bool dx::object::launched {}
inherited

◆ listen

template<class device_t >
dx_catchall_rethrow () std std::map<::AudioObjectPropertySelector, property::listen> dx::coreaudio::driver< device_t >::listen
protected
Initial value:
{
{::kAudioHardwarePropertyPlugInList,
{kAudioObjectSystemObject, {.mSelector= ::kAudioHardwarePropertyPlugInList},
std::bind(&driver::notify, this, std::placeholders::_1, std::placeholders::_2)}},
{::kAudioHardwarePropertyDevices,
{::kAudioObjectSystemObject, {.mSelector= ::kAudioHardwarePropertyDevices},
std::bind(&driver::notify, this, std::placeholders::_1, std::placeholders::_2)}},
}
virtual void notify(::AudioObjectID id, const property::addresses &addresses) try
Definition dx_coreaudio_driver.h:74

◆ log

const log dx::driver< decltype(device_t::id) >::log
inherited

◆ map

template<typename device_t >
dx_catchall_handler (this,) public typedef std::map<device_id_t, std::shared_ptr<device_t> > dx::map::driver< device_t >::map
protectedinherited

◆ plugin

template<class device_t >
dx_catchall_rethrow () public ::AudioObjectID dx::coreaudio::driver< device_t >::plugin = 0
protected

◆ product_id

const char* dx::driver< decltype(device_t::id) >::product_id
inherited

◆ version

uint32_t dx::driver< decltype(device_t::id) >::version
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri May 16 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.