|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
CoreAudio server streaming device. More...
#include <dx_coreaudio_server_device.h>
Classes | |
| struct | client |
| one process the HAL opened this device for: its bundle identifier, the HAL's client ids and the streams it holds - what a client leaves behind is released with it More... | |
Public Member Functions | |
| virtual void | add_client(const ::AudioServerPlugInClientInfo* info) |
| virtual void | configure(target target, ::UInt64 action, void* info) |
| configure: handle device configuration change requests configure will only receive requests targetted to the device | |
| virtual void | create_pins() |
| device(decltype(super::driver)& driver, decltype(super::id)& id) | |
| device(decltype(super::driver)& driver, decltype(super::id)& id, const typename super::desc_t& desc) | |
| virtual void | io_start(::UInt32 client) |
| virtual void | io_stop(::UInt32 client) |
| void | io_timestamp(::Float64& sampletime, ::UInt64& host_time, ::UInt64& seed) |
| void | launch() override |
| operator const ::AudioServerPlugInHostInterface*() const noexcept | |
| client& | operator [](::UInt32 client) |
| pin_t& | pin(::AudioObjectID id) |
| pin_t& | pin(target target) |
| virtual uint32_t | property(::pid_t pid, target target, const ::AudioObjectPropertyAddress& address, void* property, ::UInt32& size, bool set= false) |
| generic device property handler | |
| virtual void | remove_client(const ::AudioServerPlugInClientInfo* info) |
| void | resync(uint64_t count, uint64_t reference) |
| recompute sync.offset/sync.seed/per-pin cache.sync.offset from an already-valid (count, reference) cycle snapshot. Never waits: the caller (io_start(), or io_timestamp() on the RT thread) must supply a snapshot it already knows to be valid. | |
| void | resync_reference() |
| host& | submit(::AudioObjectID id, ::UInt64 action, uint64_t data= 0) |
| host& | submit(::AudioObjectID id, const ::AudioObjectPropertyAddress& address) |
| template<unsigned int count> | |
| host& | submit(::AudioObjectID id, const ::AudioObjectPropertyAddress(& addresses)[count]) |
Public Attributes | |
| std::map<::pid_t, client> | clients |
| uint8_t | idx= 0 |
| std::deque<pin_t> | pins |
| cf::string | uid |
Protected Member Functions | |
| event& | free() noexcept |
| virtual event& | initialize(bool signalled= false) |
| super& | initialize(const std::string& name, bool signalled= false) override |
| super& | reset(uint64_t= 0) noexcept override |
| super& | signal(uint64_t count= 1) override |
| super& | wait(bool reset= false) override |
Protected Attributes | |
| std::atomic<int> | io_started |
| const ::AudioServerPlugInHostInterface* | plugin |
| std::atomic<uint32_t> | wished{} |
| the nominal sample rate asked for while its configuration change is pending: one request in flight, carrying the latest wish | |
CoreAudio server streaming device.
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.
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
configure: handle device configuration change requests configure will only receive requests targetted to the device
|
inlinevirtual |
creates pins from dx::device description and adds it as CoreAudio entity to the CoreAudio device
register all audio pins across all streams
|
inlinenoexceptinherited |
|
inlinevirtualinherited |
Reimplemented in dx::event< kernel >.
|
inlineoverridevirtualinherited |
Reimplemented from dx::abstract::event.
|
inlinevirtual |
|
inlinevirtual |
|
inline |
|
inlineoverride |
remove clocksource pre-initialization hack to avoid hang at pin::property() kAudioStreamPropertyAvailablePhysicalFormats request
|
inlinenoexceptinherited |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
generic device property handler
< the client holds the stream only once it launched: a failed launch leaves no ring-less stream behind for its start/stop
|
inlinevirtual |
|
inlineoverridevirtualnoexceptinherited |
Implements dx::abstract::event.
|
inline |
recompute sync.offset/sync.seed/per-pin cache.sync.offset from an already-valid (count, reference) cycle snapshot. Never waits: the caller (io_start(), or io_timestamp() on the RT thread) must supply a snapshot it already knows to be valid.
< the device's sample time at the reference: the sync reference ring's lines past its origin
< one sample-time base per ring, every pin of it alike: the ring's origin in lines plus the device's time
|
inline |
(re)computes sync.reference/cycle.lines/linesize/safety_offset from the current pins; callable as soon as pins exist (create_pins()), not just at io_start(), so kAudioDevicePropertyZeroTimeStampPeriod is answerable before the first StartIO
|
inlineoverridevirtualinherited |
Implements dx::abstract::event.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineoverridevirtualinherited |
Implements dx::abstract::event.
| std::map<::pid_t, client> dx::coreaudio::server::device<pin_t>::clients |
| uint8_t dx::coreaudio::server::device<pin_t>::idx= 0 |
|
protected |
| std::deque<pin_t> dx::coreaudio::server::device<pin_t>::pins |
|
protectedinherited |
| cf::string dx::coreaudio::server::device<pin_t>::uid |
|
protected |
the nominal sample rate asked for while its configuration change is pending: one request in flight, carrying the latest wish