dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::coreaudio::stream::stream< device_t, circular_t > Class Template Reference

a stream of a HAL device: the ring is the client's own, the latency the HAL's property of that direction More...

#include <dx_coreaudio_stream_device.h>

Inheritance diagram for dx::coreaudio::stream::stream< device_t, circular_t >:
Collaboration diagram for dx::coreaudio::stream::stream< device_t, circular_t >:

Public Types

typedef struct device_t::desc::stream desc
typedef event< user > event_t

Public Member Functions

stream & attach (channel_t **[2], const std::vector< bool > &, direction::direction)
 the pin passes its own direction: a stream shared by two pins carries none of its own
virtual bool encoder (dx::stream::encoder::index::type, unsigned int, float)
void exception (const class exception &exception, bool filtered=false) const noexcept override
void flush ()
void info (std::ostream &os) noexcept override
virtual void initialize ()
void launch () override
 operator dx::circular * () const noexcept
dx::circular * operator-> () const noexcept
virtual os_result status () noexcept
virtual bool submit (dx::stream::encoder::index::type, unsigned int, uint8_t)
 submit encoder stage to device return true if successfully submitted; if false is returned the encode state machine will not update the stage value (i.e. if the stage can't be submitted during streaming pause), given the chance to submit the stage at start().

Public Attributes

struct dx::stream::stream:: { ... }  cache
dx::stream::channel::control * control
 kernel streaming: the driver's buffer switch bookkeeping, set by attach()
event_t data [direction::directions]
 event signalising data arrival(in) or draining(out)
dx::promoted< dx::stream::format > format
 the container this stream's ring runs: class and width its participants agreed on
const decltype(desc::target.idx()) id
promoted::property< uint32_t > latency
decltype(device_t::samplerate) & samplerate
bool ticking
 the tick's own view of this stream's session: set by the run hook once the ring stands, cleared by the halt hook before the session ends - a plain flag, the tick must never block on a promoted's transition

Protected Member Functions

virtual void alloc (size_t size, bool free=true)
virtual void free () noexcept
 overrides may release further alloc()-acquired resources (request buffers, isoc pools, shared-memory attachments) alongside circular; called only from alloc()'s own self-cleanup or the destructor - never from halt()/stop(), so everything alloc() acquires stays live for the object's full lifetime

Protected Attributes

dx::circular * circular
 allocated once by initialize()/alloc(); released only by free()

Detailed Description

template<typename device_t, typename circular_t = dx::circular>
class dx::coreaudio::stream::stream< device_t, circular_t >

a stream of a HAL device: the ring is the client's own, the latency the HAL's property of that direction

Member Typedef Documentation

◆ desc

typedef struct device_t::desc::stream dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::desc
inherited

◆ event_t

typedef event<user> dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::event_t
inherited

Member Function Documentation

◆ alloc()

virtual void dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::alloc ( size_t size,
bool free = true )
inlineprotectedvirtualinherited

◆ attach()

stream & dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::attach ( channel_t ** [2],
const std::vector< bool > & ,
direction::direction  )
inlineinherited

the pin passes its own direction: a stream shared by two pins carries none of its own

◆ encoder()

virtual bool dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::encoder ( dx::stream< device_t, dx::circular >::encoder::index::type ,
unsigned int ,
float  )
inlinevirtualinherited

◆ exception()

void dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::exception ( const class exception & exception,
bool filtered = false ) const
inlineoverridenoexceptinherited

◆ flush()

void dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::flush ( )
inlineinherited

◆ free()

virtual void dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::free ( )
inlineprotectedvirtualnoexceptinherited

overrides may release further alloc()-acquired resources (request buffers, isoc pools, shared-memory attachments) alongside circular; called only from alloc()'s own self-cleanup or the destructor - never from halt()/stop(), so everything alloc() acquires stays live for the object's full lifetime

◆ info()

void dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::info ( std::ostream< device_t, dx::circular > & os)
inlineoverridenoexceptinherited

◆ initialize()

virtual void dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::initialize ( )
inlinevirtualinherited

< a shared ring takes the wider of its two directions

< this stream's own contribution: the frames its transport keeps ahead of/behind the ring

< a hosted device's ring is its host's (kernel, service, plugin) and attached as it stands - sizing it here would write the ring into a mapping of the host's making

< a fresh ring, zeroed by alloc(), takes its size here

◆ launch()

void dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::launch ( )
inlineoverrideinherited

◆ operator dx::circular *()

dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::operator dx::circular * ( ) const
inlinenoexceptinherited

◆ operator->()

dx::circular * dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::operator-> ( ) const
inlinenoexceptinherited

◆ status()

virtual os_result dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::status ( )
inlinevirtualnoexceptinherited

◆ submit()

virtual bool dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::submit ( dx::stream< device_t, dx::circular >::encoder::index::type ,
unsigned int ,
uint8_t  )
inlinevirtualinherited

submit encoder stage to device return true if successfully submitted; if false is returned the encode state machine will not update the stage value (i.e. if the stage can't be submitted during streaming pause), given the chance to submit the stage at start().

Member Data Documentation

◆ cache

struct { ... } dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::cache

◆ circular

dx::circular* dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::circular
protectedinherited

allocated once by initialize()/alloc(); released only by free()

◆ control

dx::stream::channel::control* dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::control
inherited

kernel streaming: the driver's buffer switch bookkeeping, set by attach()

◆ data

event_t dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::data[direction::directions]
inherited

event signalising data arrival(in) or draining(out)

◆ format

dx::promoted<dx::stream::format> dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::format
inherited

the container this stream's ring runs: class and width its participants agreed on

A bus that negotiates it installs its own server; without one the request stands. The seed is the desc's own pin format, so a stream that nobody contradicts runs what it was declared with.

◆ id

const decltype(desc::target.idx()) dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::id
inherited

◆ latency

template<typename device_t, typename circular_t = dx::circular>
promoted::property<uint32_t> dx::coreaudio::stream::stream< device_t, circular_t >::latency
Initial value:
{this->device.id,{
.mSelector= ::kAudioDevicePropertyLatency,
.mScope= dx::stream::direction::to::AudioObjectPropertyScope[this->target.direction]}}
CoreAudio stream client device.
Definition dx_coreaudio_stream_device.h:69
what an AudioObjectID of this plugin addresses: the device, its pin and, inside that pin,...
Definition dx_coreaudio_server.h:82

◆ samplerate

decltype(device_t::samplerate) & dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::samplerate
inherited

◆ ticking

bool dx::stream::stream< device_t, dx::circular, control<object<device_t>>, event<user> >::ticking
inherited

the tick's own view of this stream's session: set by the run hook once the ring stands, cleared by the halt hook before the session ends - a plain flag, the tick must never block on a promoted's transition


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.