|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
CoreAudio client device. More...
#include <dx_coreaudio_device.h>
Classes | |
| class | clocksource |
| the clock source as the HAL models it: a selector control object beside the device, its current item an ::AudioObjectID. The promoted carries the index into the available items instead, which is what a desc's clock settings are numbered by More... | |
| class | icon |
| the device's icon as a file system path; the HAL states it as a URL More... | |
Public Types | |
| typedef desc_t | desc_t |
| typedef event | event_t |
| typedef promoted<uint32_t>::template preference<decltype(super_device_t::preference)> | source_t |
| typedef stream_t | stream_t |
| typedef dx::device<::AudioObjectID, preference_t> | super_device_t |
| the device this streaming device sits on: its own operations of a name this class takes for itself (a USB device's configuration()) are reached through it | |
Public Member Functions | |
| _device(decltype(super::driver)& driver, decltype(super::id)& id) | |
| virtual desc_t::configuration | align(const typename desc_t::configuration& value, const typename desc_t::configuration &) |
| a configuration the device can run: every stream's index within its configurations, one past them the stream off - a bus device narrows it to what its bus carries, the streams value leaves as current has them standing | |
| void | attach(void** io[dx::stream::direction::directions][2], const std::vector<bool>(& channel_map)[2], const dx::stream::format(& format)[2]) |
| the consumer's planar channel buffers in the format each direction's buffers carry | |
| virtual uint64_t | budget(const typename desc_t::configuration &) |
| the periodic bus time the configuration takes, in ns - a bus device with a periodic budget states it | |
| void | conclude() noexcept override |
| ends every group's session before the device's resources go; the start counts stay with their holders | |
| void | exception(const dx::exception& exception, bool filtered= false) const noexcept override |
| notification exception handler | |
| virtual uint64_t | frame() const |
| virtual bool | hw_clock() const noexcept |
| virtual void | hw_clock(abstract::event* hw_clock, uint32_t iosize) |
| registers a consumer with the device's clock: it is signalled every iosize samples of the clock's own advance. A bus whose driver owns the clock hands the registration on instead | |
| std::shared_ptr<stream_t> | open(const typename desc_t::stream::desc& desc, bool client= false) |
| the desc's stream: the registered one, else created, registered and launched - a host's client takes a data driven stream alone, its ring has one writer and one reader | |
| const struct desc_t::stream::config& | operator ()(const struct desc_t::stream& stream) |
| the stream configuration the device runs the stream in: the stream is one of the desc's | |
| virtual device& | operator >>(std::ostream &) const |
| the device's own diagnostics, beyond its operator << | |
| group_t& | operator [](const typename desc_t::stream::desc& stream) |
| the stream's group, created on first use | |
| virtual _device& | reset() |
| void | setting(dx::stream::setting setting, uint32_t index, f_t&& f) |
| the setting a host keeps for its clients handed to f as its promoted: the transport settings the sync reference's group's, the source the one of the stream whose target index is index | |
| virtual void | sleep() |
| notify system will sleep stub | |
| virtual std::pair<source_t &, bool> | source(const struct desc_t::stream& stream) |
| the stream's source selector, created on first use: the preference by stream target, the value an index into the stream's sources | |
| std::string | string(uint8_t idx) |
| bool | try_conclude() noexcept |
| atomically conclude()s if currently launched; returns whether this call did it | |
| bool | try_launch() |
| atomically launch()es if not already launched; returns whether this call did it. A launch() that throws is concluded before the exception leaves: the object never claims a launch it did not finish | |
| void | wake() override |
| ~_device() override | |
| the device class destructor | |
Public Attributes | |
| promoted::property<typename super::client_map, typename super::client_map::value_t, false> | clients{this->id, {.mSelector= property::device::clients}} |
| promoted<uint32_t>::preference<decltype(super::preference)> | clocksource |
| promoted<typenamedesc_t::configuration>::template preference<decltype(super::preference)> | configuration |
| the device's configuration: per stream the stream configuration it runs, the richest by default - a bus device narrows it to what its bus carries (align()), and it stands while a group is started | |
| dx::driver<decltype(id), preference_t>& | driver |
| std::map<decltype(desc_t::stream::group), group_t> | group |
| struct dx::stream::device:: { ... } | hw |
| promoted::property<icon, ::CFURLRef, false> | icon{this->id, {.mSelector= ::kAudioDevicePropertyIcon}} |
| dx::coreaudio::_device::clocksource | id |
| promoted<uint32_t>::preference<decltype(super::preference)> | iosize |
| std::atomic<bool> | launched{} |
| dx::stream::device::monitor | monitor |
| preference_t | preference{driver.preference[puuid]} |
| std::string | puid |
| persistent UID - system unique - could change with location | |
| std::string | puuid |
| persistent universal UID - universally unique ID (i.e. serial number) | |
| promoted::property<::Float64> | samplerate{this->id, {.mSelector= ::kAudioDevicePropertyNominalSampleRate}} |
| std::map<decltype(desc_t::stream::target.idx()), source_t> | sources |
| promoted<structdesc_t::stream *>::template preference<decltype(super::preference), uint32_t> | sync_reference |
| dx::stream::device::monitor | version |
Static Public Attributes | |
| static constexpr bool | hosted |
| the transport's settings belong to another process' device: a hosted device mirrors them through its chains, it keeps no store of them | |
Protected Member Functions | |
| virtual void | grouped(group_t &) |
| operator[](): a group just came into existence, a host wires its per-group transports here | |
| virtual void | launch() |
| launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy. | |
| virtual void | process(const ::AudioTimeStamp *, const ::AudioBufferList *, const ::AudioTimeStamp *, ::AudioBufferList *, const ::AudioTimeStamp *) |
Protected Attributes | |
| std::vector<std::shared_ptr<typename super::stream_t>> | io_streams |
| the streams process() iterates: fixed between AudioDeviceStart and AudioDeviceStop and held for it, so the IOProc never touches the mutable streams map nor a stream its client let go | |
Friends | |
| template<typename, typename> | |
| class | coreaudio::group |
| the app wraps this bus's own group, so friendship has to name it, not just the device's group_t | |
CoreAudio client device.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
the device this streaming device sits on: its own operations of a name this class takes for itself (a USB device's configuration()) are reached through it
|
inline |
|
inlineoverride |
the device class destructor
|
inlinevirtualinherited |
a configuration the device can run: every stream's index within its configurations, one past them the stream off - a bus device narrows it to what its bus carries, the streams value leaves as current has them standing
|
inlineinherited |
the consumer's planar channel buffers in the format each direction's buffers carry
|
inlinevirtualinherited |
the periodic bus time the configuration takes, in ns - a bus device with a periodic budget states it
|
inlineoverridevirtualnoexceptinherited |
ends every group's session before the device's resources go; the start counts stay with their holders
Reimplemented from dx::object.
|
inlineoverridevirtualnoexceptinherited |
notification exception handler
Implements dx::object.
Reimplemented in dx::proxy::device< preference_t >, dx::proxy::device< preference_t >, dx::proxy::device< dx::preference >, dx::proxy::device<>, dx::registry::device< preference_t >, dx::registry::device< dx::preference >, dx::service::client::_device< desc_t, preference_t, stream_t, group_t >, dx::service::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::service::client::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::usb::device< preference_t >, dx::usb::device< dx::preference >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< dx::preference >, dx::usb::platform::device< preference_t >, dx::usb::platform::device< preference_t >, dx::virtuel::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::virtuel::stream::_device< desc, dx::preference, dx::stream::shared::stream< device< desc, dx::preference, dx::stream::shared::stream, group > >, group< device< desc, dx::preference, dx::stream::shared::stream, group > > >, dx::virtuel::stream::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, and dx::wasapi::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >.
|
inlinevirtual |
|
inlineprotectedvirtualinherited |
operator[](): a group just came into existence, a host wires its per-group transports here
|
inlinevirtualnoexceptinherited |
|
inlinevirtualinherited |
registers a consumer with the device's clock: it is signalled every iosize samples of the clock's own advance. A bus whose driver owns the clock hands the registration on instead
|
inlineprotectedvirtualinherited |
launch notification: object mounted and ready to use. Called only through try_launch() - never call this directly from outside the class hierarchy.
Reimplemented in dx::asio::client::driver< device_t, devices >, dx::coreaudio::driver< device_t >, dx::coremidi::driver< device_t >, dx::map::driver< _device_t, holder_t >, dx::map::driver< device<> >, dx::map::driver< device_t >, dx::map::driver< device_t, dx::apartment< device_t > >, dx::midi::services::driver< device_t >, dx::proxy::device< preference_t >, dx::proxy::device< preference_t >, dx::proxy::device< dx::preference >, dx::proxy::device<>, dx::proxy::driver< device_t >, dx::proxy::driver< device_t >, dx::service::app, dx::service::app, dx::service::client::_device< desc_t, preference_t, stream_t, group_t >, dx::service::client::_device< desc, preference, stream< device< desc, preference, stream, group > >, group< device< desc, preference, stream, group > > >, dx::service::client::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::service::client::driver< device_t >, dx::stream::stream< device_t, dx::circular, usb::pipe< device_t > >, dx::usb::stream::_device< desc_t, preference_t, stream_t, group_t >, dx::usb::stream::_device< desc_t, dx::preference, pipe< device< desc_t, dx::preference, pipe, group > >, group< device< desc_t, dx::preference, pipe, group > > >, dx::usb::stream::_device< desc_t, preference_t, stream_t< device< desc_t, preference_t, stream_t, group_t > >, group_t< device< desc_t, preference_t, stream_t, group_t > > >, dx::virtuel::driver< device_t >, and dx::wasapi::client::driver< device_t >.
|
inlineinherited |
the desc's stream: the registered one, else created, registered and launched - a host's client takes a data driven stream alone, its ring has one writer and one reader
|
inlineinherited |
the stream configuration the device runs the stream in: the stream is one of the desc's
|
inlinevirtualinherited |
the device's own diagnostics, beyond its operator <<
|
inlineinherited |
the stream's group, created on first use
|
inlineprotectedvirtual |
Reimplemented in dx::coreaudio::stream::device< desc_t, preference_t, stream_t, group_t >.
|
inlinevirtual |
|
inlineinherited |
the setting a host keeps for its clients handed to f as its promoted: the transport settings the sync reference's group's, the source the one of the stream whose target index is index
|
inlinevirtualinherited |
notify system will sleep stub
|
inlinevirtualinherited |
the stream's source selector, created on first use: the preference by stream target, the value an index into the stream's sources
|
inline |
|
inlinenoexceptinherited |
atomically conclude()s if currently launched; returns whether this call did it
|
inlineinherited |
|
inlineoverridevirtualinherited |
Reimplemented from dx::device< id_t, preference_t >.
|
friend |
the app wraps this bus's own group, so friendship has to name it, not just the device's group_t
| promoted::property<typename super::client_map, typename super::client_map::value_t, false> dx::coreaudio::_device<desc_t, preference_t, stream_t, group_t>::clients{this->id,{.mSelector= property::device::clients}} |
|
inherited |
|
inherited |
the device's configuration: per stream the stream configuration it runs, the richest by default - a bus device narrows it to what its bus carries (align()), and it stands while a group is started
|
inherited |
|
inherited |
streaming groups by desc::stream::group id: every stream of this device is registered with its group - behind the settings its groups listen to, so they go first
|
staticconstexprinherited |
the transport's settings belong to another process' device: a hosted device mirrors them through its chains, it keeps no store of them
| struct { ... } dx::stream::device<dx::device<::AudioObjectID, preference_t>, desc_t, stream_t, group_t>::hw |
| promoted::property<icon, ::CFURLRef, false> dx::coreaudio::_device<desc_t, preference_t, stream_t, group_t>::icon{this->id,{.mSelector= ::kAudioDevicePropertyIcon}} |
| dx::coreaudio::_device::clocksource dx::coreaudio::_device<desc_t, preference_t, stream_t, group_t>::id |
|
protected |
the streams process() iterates: fixed between AudioDeviceStart and AudioDeviceStop and held for it, so the IOProc never touches the mutable streams map nor a stream its client let go
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
persistent UID - system unique - could change with location
|
inherited |
persistent universal UID - universally unique ID (i.e. serial number)
| promoted::property<::Float64> dx::coreaudio::_device<desc_t, preference_t, stream_t, group_t>::samplerate{this->id,{.mSelector= ::kAudioDevicePropertyNominalSampleRate}} |
|
inherited |
source selectors by stream target: a stream with sources gets its own on first use
|
inherited |
|
inherited |