dxd - dynax driver framework  2979
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dx::coreaudio::device< io_t, bus_t, desc_t > Class Template Reference

#include <dx_coreaudio.h>

+ Inheritance diagram for dx::coreaudio::device< io_t, bus_t, desc_t >:
+ Collaboration diagram for dx::coreaudio::device< io_t, bus_t, desc_t >:

Public Member Functions

void conclude () noexceptoverride
 conclude notification: device will be removed from tree More...
 
virtual void configure (unsigned int pin,::UInt64 action)
 
void ctl (unsigned int ioctl) const
 
 device (::io_service_t io_service)
 
::CFTypeRef get (::CFStringRef key) const
 
::CFTypeRef get (::CFStringRef key,::CFTypeRef dflt) const noexcept
 
template<typename value_t , typename = typename cf::enable_if_convertible<value_t>::type>
value_t get (::CFStringRef key) const
 
template<typename value_t , typename = typename cf::enable_if_convertible<value_t>::type>
value_t get (::CFStringRef key,::CFTypeRef dflt) const noexcept
 
template<typename value_t , typename = typename cf::enable_if_convertible<value_t>::type>
value_t get (::CFStringRef key, value_t dflt) const noexcept
 
template<typename key_t , typename = typename cf::enable_if_convertible<key_t>::type>
::CFTypeRef get (key_t key) const
 
template<typename key_t , typename value_t , typename = typename cf::enable_if_convertible<key_t>::type, typename = typename cf::enable_if_convertible<value_t>::type>
value_t get (key_t key) const
 
template<typename rx_t >
rx_t ictl (unsigned int ioctl) const
 Windows: member ioctl. More...
 
template<typename rx_t >
size_t ictl (unsigned int ioctl, rx_t &rx) const
 
tx_t size_t ioctl (unsigned int ioctl, const tx_t &tx, rx_t &rx) const
 
template<typename rx_t , typename tx_t >
rx_t ioctl (unsigned int ioctl, const tx_t &tx) const
 
size_t ioctl (unsigned int ioctl, const void *tx=nullptr, size_t tx_size=0, void *rx=nullptr, size_t rx_size=0) const
 
template<typename tx_t , typename rx_t >
size_t ioctl (unsigned int ioctl, const tx_t &tx, rx_t &rx) const
 
template<typename rx_t , typename tx_t >
rx_t ioctl (unsigned int ioctl, const tx_t &tx) const
 
void launch () override
 launch notification: device mounted in tree and ready to use More...
 
template<typename tx_t >
void octl (unsigned int ioctl, const tx_t &tx) const
 
 operator const io_registry_entry_t & () const
 auto converter into const object More...
 
 operator io_registry_entry_t & ()
 auto converter into object More...
 
 operator uint64_t () const
 
 operator::CFMutableDictionaryRef () const
 
 operator::HANDLE () const
 
void operator= (::AudioServerPlugInHostRef host) noexcept
 attaches CoreAudio plugin parent More...
 
bool operator== (io_registry_entry_tobject) const noexcept
 
::CFTypeRef operator[] (::CFStringRef key) const
 
template<typename key_t , typename = typename std::enable_if<std::is_pod<key_t>::value>>
::CFTypeRef operator[] (key_t key) const
 
pin< stream, struct
desc_t::stream::pin > & 
pin (::AudioObjectID id)
 
virtual void property (unsigned int trgt, const ::AudioObjectPropertyAddress *address, void *property,::UInt32 &size, bool set=false) const
 generic device/stream/cntrl property handler More...
 
registryset (::CFTypeRef properties)
 Setting properties in a registry entry is not generally supported, it is more common to support setting of properties of the connection based property setting of dx::device. More...
 
registryset (::CFStringRef key,::CFTypeRef value) noexcept
 
template<typename value_t , typename = typename cf::enable_if_convertible<value_t>::type>
registryset (::CFStringRef key, value_t value)
 
template<typename key_t , typename = typename cf::enable_if_convertible<key_t>::type>
registryset (key_t key,::CFTypeRef value)
 
template<typename key_t , typename value_t , typename = typename cf::enable_if_convertible<key_t>::type, typename = typename cf::enable_if_convertible<value_t>::type>
registryset (key_t key, value_t value)
 

Public Attributes

typedef::io_service_t creator
 
unsigned short id =0
 
std::deque< pin< stream,
struct desc_t::stream::pin > > 
pins
 
bool removed =false
 
std::deque< stream > streams
 
struct mach_timebase_info timebase
 
 typename
 
 value_t
 

Protected Attributes

struct {
   cf::type< const char * >   bundle_id
 
   cf::type< const char * >   class_name
 
kernel
 
io::port port
 

Detailed Description

template<typename io_t, typename bus_t, typename desc_t>
class dx::coreaudio::device< io_t, bus_t, desc_t >

/brief streaming device representation of dxd kernel user client

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

template<typename io_t , typename bus_t , typename desc_t >
dx::coreaudio::device< io_t, bus_t, desc_t >::device ( ::io_service_t  io_service)
inline

+ Here is the call graph for this function:

Member Function Documentation

template<typename io_t , typename bus_t , typename desc_t >
void dx::coreaudio::device< io_t, bus_t, desc_t >::conclude ( )
inlineoverridevirtualnoexcept

conclude notification: device will be removed from tree

Reimplemented from dx::device.

+ Here is the call graph for this function:

template<typename io_t , typename bus_t , typename desc_t >
virtual void dx::coreaudio::device< io_t, bus_t, desc_t >::configure ( unsigned int  pin,
::UInt64  action 
)
inlinevirtual

+ Here is the call graph for this function:

void dx::device::ctl ( unsigned int  ioctl) const
inlineinherited
::CFTypeRef dx::io::registry::get ( ::CFStringRef  key) const
inlineinherited
::CFTypeRef dx::io::registry::get ( ::CFStringRef  key,
::CFTypeRef  dflt 
) const
inlinenoexceptinherited
template<typename value_t , typename = typename cf::enable_if_convertible<value_t>::type>
value_t dx::io::registry::get ( ::CFStringRef  key) const
inlineinherited
template<typename value_t , typename = typename cf::enable_if_convertible<value_t>::type>
value_t dx::io::registry::get ( ::CFStringRef  key,
::CFTypeRef  dflt 
) const
inlinenoexceptinherited
template<typename value_t , typename = typename cf::enable_if_convertible<value_t>::type>
value_t dx::io::registry::get ( ::CFStringRef  key,
value_t  dflt 
) const
inlinenoexceptinherited
template<typename key_t , typename = typename cf::enable_if_convertible<key_t>::type>
::CFTypeRef dx::io::registry::get ( key_t  key) const
inlineinherited
template<typename key_t , typename value_t , typename = typename cf::enable_if_convertible<key_t>::type, typename = typename cf::enable_if_convertible<value_t>::type>
value_t dx::io::registry::get ( key_t  key) const
inlineinherited
template<typename rx_t >
rx_t dx::device::ictl ( unsigned int  ioctl) const
inlineinherited

Windows: member ioctl.

this member retreives data from the device by providing an IOCTL code. the template argument defines the type of data to be retreived. this member is intended as a convinient way to retreive only small amounts of data since there is an intermediate stack copy involved in returning the data.

the underlaying windows API is DeviceIoControl(). for detailed information see http://msdn.microsoft.com/en-us/library/aa363216(VS.85).aspx

Exceptions
n/amicrosoft does not give information about what possible errors values are provided by its OS other than
ERROR_INSUFFICIENT_BUFFERif the output buffer is too small to receive any data

+ Here is the caller graph for this function:

template<typename rx_t >
size_t dx::device::ictl ( unsigned int  ioctl,
rx_t &  rx 
) const
inlineinherited
tx_t size_t dx::device::ioctl ( unsigned int  ioctl,
const tx_t &  tx,
rx_t &  rx 
) const
inlineinherited
template<typename rx_t , typename tx_t >
rx_t dx::device::ioctl ( unsigned int  ioctl,
const tx_t &  tx 
) const
inlineinherited
size_t dx::device::ioctl ( unsigned int  ioctl,
const void *  tx = nullptr,
size_t  tx_size = 0,
void *  rx = nullptr,
size_t  rx_size = 0 
) const
inlineinherited
template<typename tx_t , typename rx_t >
size_t dx::device::ioctl ( unsigned int  ioctl,
const tx_t &  tx,
rx_t &  rx 
) const
inlineinherited
template<typename rx_t , typename tx_t >
rx_t dx::device::ioctl ( unsigned int  ioctl,
const tx_t &  tx 
) const
inlineinherited
template<typename io_t , typename bus_t , typename desc_t >
void dx::coreaudio::device< io_t, bus_t, desc_t >::launch ( )
inlineoverridevirtual

launch notification: device mounted in tree and ready to use

creates pins from dxd::device description and adds it as CoreMIDI entity to the CoreMIDI device

register streams

register all pins across all streams

Reimplemented from dx::device.

+ Here is the call graph for this function:

template<typename tx_t >
void dx::device::octl ( unsigned int  ioctl,
const tx_t &  tx 
) const
inlineinherited
dx::io::reference< io_registry_entry_t >::operator const io_registry_entry_t & ( ) const
inlineinherited

auto converter into const object

dx::io::reference< io_registry_entry_t >::operator io_registry_entry_t & ( )
inlineinherited

auto converter into object

dx::io::registry::operator uint64_t ( ) const
inlineinherited
dx::io::registry::operator::CFMutableDictionaryRef ( ) const
inlineinherited
dx::device::operator::HANDLE ( ) const
inlineinherited

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename io_t , typename bus_t , typename desc_t >
void dx::coreaudio::device< io_t, bus_t, desc_t >::operator= ( ::AudioServerPlugInHostRef  host)
inlinenoexcept

attaches CoreAudio plugin parent

bool dx::io::reference< io_registry_entry_t >::operator== ( io_registry_entry_t  object) const
inlinenoexceptinherited
::CFTypeRef dx::io::registry::operator[] ( ::CFStringRef  key) const
inlineinherited
template<typename key_t , typename = typename std::enable_if<std::is_pod<key_t>::value>>
::CFTypeRef dx::io::registry::operator[] ( key_t  key) const
inlineinherited
template<typename io_t , typename bus_t , typename desc_t >
pin<stream,struct desc_t::stream::pin>& dx::coreaudio::device< io_t, bus_t, desc_t >::pin ( ::AudioObjectID  id)
inline

+ Here is the caller graph for this function:

template<typename io_t , typename bus_t , typename desc_t >
virtual void dx::coreaudio::device< io_t, bus_t, desc_t >::property ( unsigned int  trgt,
const ::AudioObjectPropertyAddress *  address,
void *  property,
::UInt32 &  size,
bool  set = false 
) const
inlinevirtual

generic device/stream/cntrl property handler

  • has property (property=null)
  • get property
  • get property size (property=null)
  • set property (set=true)
  • is property settable (property=null,set=true)
Todo:
provide channel names
Todo:
keep track and return running state of pin
Todo:
provide device icon

+ Here is the call graph for this function:

registry& dx::io::registry::set ( ::CFTypeRef  properties)
inlineinherited

Setting properties in a registry entry is not generally supported, it is more common to support setting of properties of the connection based property setting of dx::device.

+ Here is the caller graph for this function:

registry& dx::io::registry::set ( ::CFStringRef  key,
::CFTypeRef  value 
)
inlinenoexceptinherited
template<typename value_t , typename = typename cf::enable_if_convertible<value_t>::type>
registry& dx::io::registry::set ( ::CFStringRef  key,
value_t  value 
)
inlineinherited

+ Here is the call graph for this function:

template<typename key_t , typename = typename cf::enable_if_convertible<key_t>::type>
registry& dx::io::registry::set ( key_t  key,
::CFTypeRef  value 
)
inlineinherited

+ Here is the call graph for this function:

template<typename key_t , typename value_t , typename = typename cf::enable_if_convertible<key_t>::type, typename = typename cf::enable_if_convertible<value_t>::type>
registry& dx::io::registry::set ( key_t  key,
value_t  value 
)
inlineinherited

+ Here is the call graph for this function:

Member Data Documentation

cf::type<const char*> dx::device::bundle_id
inherited
cf::type<const char*> dx::device::class_name
inherited
typedef::io_service_t dx::device::creator
inherited
template<typename io_t , typename bus_t , typename desc_t >
unsigned short dx::coreaudio::device< io_t, bus_t, desc_t >::id =0
struct { ... } dx::device::kernel
template<typename io_t , typename bus_t , typename desc_t >
std::deque<pin<stream,struct desc_t::stream::pin> > dx::coreaudio::device< io_t, bus_t, desc_t >::pins
io::port dx::device::port
protectedinherited
bool dx::device::removed =false
inherited
template<typename io_t , typename bus_t , typename desc_t >
std::deque<stream> dx::coreaudio::device< io_t, bus_t, desc_t >::streams
template<typename io_t , typename bus_t , typename desc_t >
struct mach_timebase_info dx::coreaudio::device< io_t, bus_t, desc_t >::timebase
dx::device::typename
inherited
Initial value:
= typename cf::enable_if_convertible<value_t>::type>
registry& set (::CFStringRef key, value_t value) {
return set (key, cf::type<value_t>(value));
}
template<typename key_t
dx::device::value_t
inherited

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

(c) copyright 2009 dynamic acoustics e.U. generated on Fri Nov 8 2019

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.