dxd - dynax driver framework 2.1.0d73
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::coreaudio::server::device< pin_t > Class Template Reference

streaming device representation of dxd kernel user client More...

#include <dx_coreaudio_server.h>

+ Inheritance diagram for dx::coreaudio::server::device< pin_t >:
+ Collaboration diagram for dx::coreaudio::server::device< pin_t >:

Public Member Functions

virtual void configure (target target, ::UInt64 action, void *info)
 configure: handle configuration change requests
 
 device (generic::driver &driver, ::io_service_t io_service)
 
void io_start ()
 
void io_stop ()
 
void io_timestamp (::Float64 &sampletime, ::UInt64 &host_time, ::UInt64 &seed)
 
void launch () override
 
void operator= (const ::AudioServerPlugInHostInterface *host) noexcept
 attaches CoreAudio plugin parent
 
pin_t & pin (::AudioObjectID id)
 
pin_t & pin (target target)
 
virtual uint32_t property (target target, const ::AudioObjectPropertyAddress &address, void *property, ::UInt32 &size, bool set=false)
 generic device property handler
 
uint32_t samplerate (uint32_t samplerate) override
 

Public Attributes

uint8_t id = 0
 
std::deque< pin_t > pins
 

Detailed Description

template<typename pin_t>
class dx::coreaudio::server::device< pin_t >

streaming device representation of dxd kernel user client

CoreAudio server plugin.

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.

Todo
static OSStatus deviceSampleRateChanged(AudioObjectID inObjectID, UInt32 inNumberAddresses, const AudioObjectPropertyAddress* inAddresses, void* __nullable inClientData) { cout << "callback" << endl; return noErr; }

AudioObjectPropertyAddress address; address.mSelector = kAudioDevicePropertyNominalSampleRate; address.mScope = kAudioObjectPropertyScopeGlobal; address.mElement = kAudioObjectPropertyElementMaster;

AudioObjectAddPropertyListener(unit, &address, &deviceSampleRateChanged, this);

Constructor & Destructor Documentation

◆ device()

template<typename pin_t >
dx::coreaudio::server::device< pin_t >::device ( generic::driver & driver,
::io_service_t io_service )
inline

Member Function Documentation

◆ configure()

template<typename pin_t >
virtual void dx::coreaudio::server::device< pin_t >::configure ( target target,
::UInt64 action,
void * info )
inlinevirtual

configure: handle configuration change requests

+ Here is the call graph for this function:

◆ io_start()

template<typename pin_t >
void dx::coreaudio::server::device< pin_t >::io_start ( )
inline
Todo
coreaudio::device::io_start(): check stream state while waiting for cycle switch
+ Here is the call graph for this function:

◆ io_stop()

template<typename pin_t >
void dx::coreaudio::server::device< pin_t >::io_stop ( )
inline

◆ io_timestamp()

template<typename pin_t >
void dx::coreaudio::server::device< pin_t >::io_timestamp ( ::Float64 & sampletime,
::UInt64 & host_time,
::UInt64 & seed )
inline
+ Here is the call graph for this function:

◆ launch()

template<typename pin_t >
void dx::coreaudio::server::device< pin_t >::launch ( )
inlineoverride

creates pins from dx::device description and adds it as CoreAudio entity to the CoreAudio device

register all audio pins across all streams

Todo
make sync ref stream selectable from stream::desc
+ Here is the call graph for this function:

◆ operator=()

template<typename pin_t >
void dx::coreaudio::server::device< pin_t >::operator= ( const ::AudioServerPlugInHostInterface * host)
inlinenoexcept

attaches CoreAudio plugin parent

◆ pin() [1/2]

template<typename pin_t >
pin_t & dx::coreaudio::server::device< pin_t >::pin ( ::AudioObjectID id)
inline
+ Here is the caller graph for this function:

◆ pin() [2/2]

template<typename pin_t >
pin_t & dx::coreaudio::server::device< pin_t >::pin ( target target)
inline

◆ property()

template<typename pin_t >
virtual uint32_t dx::coreaudio::server::device< pin_t >::property ( target target,
const ::AudioObjectPropertyAddress & address,
void * property,
::UInt32 & size,
bool set = false )
inlinevirtual

generic device 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
evaluate if setting of kAudioDevicePropertySafetyOffset should be supported
Todo
keep track and return running state of pin
Todo
kAudioSelectorControlPropertyAvailableItems: calc clock # settings offset for multiple clock support
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ samplerate()

template<typename pin_t >
uint32_t dx::coreaudio::server::device< pin_t >::samplerate ( uint32_t samplerate)
inlineoverride
+ Here is the call graph for this function:

Member Data Documentation

◆ [struct]

struct { ... } dx::coreaudio::server::device< pin_t >::clock

◆ [struct]

struct { ... } dx::coreaudio::server::device< pin_t >::config

◆ count

template<typename pin_t >
uint64_t dx::coreaudio::server::device< pin_t >::count

cached sync cycle count to evaluate timesamp generation

◆ [struct]

struct { ... } dx::coreaudio::server::device< pin_t >::cycle

◆ id

template<typename pin_t >
uint8_t dx::coreaudio::server::device< pin_t >::id = 0

◆ lines

template<typename pin_t >
uint32_t dx::coreaudio::server::device< pin_t >::lines

sample lines per sync cycle (per timestamp generation)

◆ linesize

template<typename pin_t >
uint32_t dx::coreaudio::server::device< pin_t >::linesize

size of all channels in bytes per sample

◆ offset

template<typename pin_t >
uint32_t dx::coreaudio::server::device< pin_t >::offset

timestamp generation offset to zero reference on seed change

◆ pins

template<typename pin_t >
std::deque<pin_t> dx::coreaudio::server::device< pin_t >::pins

◆ reference

template<typename pin_t >
pin_t::circular_t* dx::coreaudio::server::device< pin_t >::reference

◆ [struct]

struct { ... } dx::coreaudio::server::device< pin_t >::request

◆ safety_offset

template<typename pin_t >
uint32_t dx::coreaudio::server::device< pin_t >::safety_offset[2]

RX/TX safety offsets;.

◆ samplerate

template<typename pin_t >
uint32_t dx::coreaudio::server::device< pin_t >::samplerate

dispatch_async samplerate parameter storage location (stack not suitable)

◆ seed

template<typename pin_t >
uint64_t dx::coreaudio::server::device< pin_t >::seed

◆ source

template<typename pin_t >
target dx::coreaudio::server::device< pin_t >::source

dispatch_async clock::source parameter storage location (stack not suitable)


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

(c) copyright 2009 dynamic acoustics e.U. generated on Thu Nov 28 2024

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.