|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
wavert::stream: cyclic WaveRT buffer with client notifications More...
#include <dxd_portcls_audio.h>
Public Types | |
| typedef stream_desc_t | stream_desc |
Public Member Functions | |
| void | advance(unsigned int frames) |
| backend clock: frames elapsed; signals every crossed notification boundary | |
| bool | exchange(dx::circular& circular, unsigned int frames, transfertransfer transfertransfer, volatile uint64_t& at) |
| moves the frames elapsing with this tick between the WaveRT buffer and a ring | |
| stream(::IPortWaveRTStream* port, const stream_desc_t& stream_descstream_desc, unsigned int idx, const ::WAVEFORMATEXTENSIBLE& wave) | |
| virtual | ~stream() |
| the derived stream stops itself before the buffer goes | |
Public Attributes | |
| os_result | status{not_initialized} |
Protected Types | |
| typedef decltype(&read) | transfer |
Protected Member Functions | |
| os_result | adopt(const dx::stream::format& ring) |
| pairs this endpoint's format with the ring's; called once the endpoint proposed its own and the ring answered | |
| ::NTSTATUS __stdcall | AllocateAudioBuffer(unsigned long requested, ::MDL** mdl, unsigned long* actual, unsigned long* offset, ::MEMORY_CACHING_TYPE* cache) override final |
| ::NTSTATUS __stdcall | AllocateBufferWithNotification(unsigned long notifications, unsigned long requested, ::MDL** mdl, unsigned long* actual, unsigned long* offset, ::MEMORY_CACHING_TYPE* cache) override final |
| void __stdcall | FreeAudioBuffer(::MDL* mdl, unsigned long size) override final |
| void __stdcall | FreeBufferWithNotification(::MDL *, unsigned long) override final |
| ::NTSTATUS __stdcall | GetClockRegister(::KSRTAUDIO_HWREGISTER *) override final |
| void __stdcall | GetHWLatency(::KSRTAUDIO_HWLATENCY* latency) override final |
| ::NTSTATUS __stdcall | GetPosition(::KSAUDIO_POSITION* position) override final |
| ::NTSTATUS __stdcall | GetPositionRegister(::KSRTAUDIO_HWREGISTER *) override final |
| ::NTSTATUS __stdcall | RegisterNotificationEvent(::KEVENT* event) override final |
| ::NTSTATUS __stdcall | SetFormat(::KSDATAFORMAT *) override final |
| ::NTSTATUS __stdcall | SetState(::KSSTATE state) override final |
| virtual os_result | start()= 0 |
| virtual void | stop()= 0 |
| ::NTSTATUS __stdcall | UnregisterNotificationEvent(::KEVENT* event) override final |
Static Protected Member Functions | |
| static bool | mix(dx::circular& circular, const dx::circular::conversion& conversion, volatile uint64_t& position, void* main, uint64_t frames, uint32_t channels, uint32_t index, uint32_t interleaved) |
| static bool | read(dx::circular& circular, const dx::circular::conversion& conversion, volatile uint64_t& position, void* main, uint64_t frames, uint32_t channels, uint32_t index, uint32_t interleaved) |
| static bool | write(dx::circular& circular, const dx::circular::conversion& conversion, volatile uint64_t& position, void* main, uint64_t frames, uint32_t channels, uint32_t index, uint32_t interleaved) |
| the WaveRT buffer's interleaved frames moved between the endpoint's format and the ring's, as the conversion adopt() resolved | |
Protected Attributes | |
| const unsigned int | channels |
| dx::circular::conversion | conversion{} |
| between what Windows negotiated and what the ring runs | |
| dx::stream::cursor | cursor{} |
| this endpoint's anchor in its ring as a client | |
| const dx::stream::format | format |
| what Windows negotiated for this endpoint | |
| const unsigned int | idx |
| const unsigned int | linesize |
| const unsigned int | samplerate |
| bool | started{} |
| bool | transport{} |
| this endpoint is its ring's transport | |
wavert::stream: cyclic WaveRT buffer with client notifications
The buffer is port-allocated and kernel-mapped; the byte position advances through advance(), driven by the backend's clock, signalling every registered notification event at each notification boundary. start()/stop() bind the stream to its backend.
| typedef stream_desc_t dxd::wavert::stream<stream_desc_t>::stream_desc |
|
protected |
|
inline |
|
inlinevirtual |
the derived stream stops itself before the buffer goes
Reimplemented in dxd::portcls::device< streaming_device_t >::stream.
|
inlineprotected |
pairs this endpoint's format with the ring's; called once the endpoint proposed its own and the ring answered
|
inline |
backend clock: frames elapsed; signals every crossed notification boundary
|
inlinefinaloverrideprotected |
|
inlinefinaloverrideprotected |
IMiniportWaveRTStreamNotification
|
inline |
moves the frames elapsing with this tick between the WaveRT buffer and a ring
A render endpoint's buffer feeds the ring, a capture endpoint's is fed from it, each wrapped at its own end, at the ring position given: the transport's index or this endpoint's own anchor. Without a transfer the buffer takes silence.
|
inlinefinaloverrideprotected |
|
inlinefinaloverrideprotected |
|
inlinefinaloverrideprotected |
|
inlinefinaloverrideprotected |
|
inlinefinaloverrideprotected |
|
inlinefinaloverrideprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinefinaloverrideprotected |
|
inlinefinaloverrideprotected |
IMiniportWaveRTStream
|
inlinefinaloverrideprotected |
|
protectedpure virtual |
|
protectedpure virtual |
|
inlinefinaloverrideprotected |
|
inlinestaticprotected |
the WaveRT buffer's interleaved frames moved between the endpoint's format and the ring's, as the conversion adopt() resolved
|
protected |
|
protected |
between what Windows negotiated and what the ring runs
|
protected |
this endpoint's anchor in its ring as a client
|
protected |
what Windows negotiated for this endpoint
|
protected |
|
protected |
|
protected |
|
protected |
| os_result dxd::wavert::stream<stream_desc_t>::status{not_initialized} |
|
protected |
this endpoint is its ring's transport