dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::wavert::stream< stream_desc_t > Class Template Referenceabstract

wavert::stream: cyclic WaveRT buffer with client notifications More...

#include <dxd_portcls_audio.h>

Inheritance diagram for dxd::wavert::stream< stream_desc_t >:
Collaboration diagram for dxd::wavert::stream< stream_desc_t >:

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, transfer transfer, 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 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

Protected Attributes

const unsigned int channels
converter conversion {}
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

Detailed Description

template<typename stream_desc_t>
class dxd::wavert::stream< stream_desc_t >

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.

Member Typedef Documentation

◆ stream_desc

template<typename stream_desc_t>
typedef stream_desc_t dxd::wavert::stream< stream_desc_t >::stream_desc

Constructor & Destructor Documentation

◆ stream()

template<typename stream_desc_t>
dxd::wavert::stream< stream_desc_t >::stream ( ::IPortWaveRTStream * port,
const stream_desc_t & stream_desc,
unsigned int idx,
const ::WAVEFORMATEXTENSIBLE & wave )
inline

◆ ~stream()

template<typename stream_desc_t>
virtual dxd::wavert::stream< stream_desc_t >::~stream ( )
inlinevirtual

the derived stream stops itself before the buffer goes

Reimplemented in dxd::portcls::device< streaming_device_t >::stream.

Member Function Documentation

◆ adopt()

template<typename stream_desc_t>
os_result dxd::wavert::stream< stream_desc_t >::adopt ( const dx::stream< stream_desc_t >::format & ring)
inlineprotected

pairs this endpoint's format with the ring's; called once the endpoint proposed its own and the ring answered

◆ advance()

template<typename stream_desc_t>
void dxd::wavert::stream< stream_desc_t >::advance ( unsigned int frames)
inline

backend clock: frames elapsed; signals every crossed notification boundary

◆ AllocateAudioBuffer()

template<typename stream_desc_t>
::NTSTATUS __stdcall dxd::wavert::stream< stream_desc_t >::AllocateAudioBuffer ( unsigned long requested,
::MDL ** mdl,
unsigned long * actual,
unsigned long * offset,
::MEMORY_CACHING_TYPE * cache )
inlinefinaloverrideprotected

◆ AllocateBufferWithNotification()

template<typename stream_desc_t>
::NTSTATUS __stdcall dxd::wavert::stream< stream_desc_t >::AllocateBufferWithNotification ( unsigned long notifications,
unsigned long requested,
::MDL ** mdl,
unsigned long * actual,
unsigned long * offset,
::MEMORY_CACHING_TYPE * cache )
inlinefinaloverrideprotected

IMiniportWaveRTStreamNotification

◆ exchange()

template<typename stream_desc_t>
bool dxd::wavert::stream< stream_desc_t >::exchange ( dx::circular & circular,
unsigned int frames,
transfer transfer,
volatile uint64_t & at )
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.

◆ FreeAudioBuffer()

template<typename stream_desc_t>
void __stdcall dxd::wavert::stream< stream_desc_t >::FreeAudioBuffer ( ::MDL * mdl,
unsigned long size )
inlinefinaloverrideprotected

◆ FreeBufferWithNotification()

template<typename stream_desc_t>
void __stdcall dxd::wavert::stream< stream_desc_t >::FreeBufferWithNotification ( ::MDL * ,
unsigned long  )
inlinefinaloverrideprotected

◆ GetClockRegister()

template<typename stream_desc_t>
::NTSTATUS __stdcall dxd::wavert::stream< stream_desc_t >::GetClockRegister ( ::KSRTAUDIO_HWREGISTER * )
inlinefinaloverrideprotected

◆ GetHWLatency()

template<typename stream_desc_t>
void __stdcall dxd::wavert::stream< stream_desc_t >::GetHWLatency ( ::KSRTAUDIO_HWLATENCY * latency)
inlinefinaloverrideprotected

◆ GetPosition()

template<typename stream_desc_t>
::NTSTATUS __stdcall dxd::wavert::stream< stream_desc_t >::GetPosition ( ::KSAUDIO_POSITION * position)
inlinefinaloverrideprotected

◆ GetPositionRegister()

template<typename stream_desc_t>
::NTSTATUS __stdcall dxd::wavert::stream< stream_desc_t >::GetPositionRegister ( ::KSRTAUDIO_HWREGISTER * )
inlinefinaloverrideprotected

◆ RegisterNotificationEvent()

template<typename stream_desc_t>
::NTSTATUS __stdcall dxd::wavert::stream< stream_desc_t >::RegisterNotificationEvent ( ::KEVENT * event)
inlinefinaloverrideprotected

◆ SetFormat()

template<typename stream_desc_t>
::NTSTATUS __stdcall dxd::wavert::stream< stream_desc_t >::SetFormat ( ::KSDATAFORMAT * )
inlinefinaloverrideprotected

IMiniportWaveRTStream

◆ SetState()

template<typename stream_desc_t>
::NTSTATUS __stdcall dxd::wavert::stream< stream_desc_t >::SetState ( ::KSSTATE state)
inlinefinaloverrideprotected

◆ start()

template<typename stream_desc_t>
virtual os_result dxd::wavert::stream< stream_desc_t >::start ( )
protectedpure virtual

◆ stop()

template<typename stream_desc_t>
virtual void dxd::wavert::stream< stream_desc_t >::stop ( )
protectedpure virtual

◆ UnregisterNotificationEvent()

template<typename stream_desc_t>
::NTSTATUS __stdcall dxd::wavert::stream< stream_desc_t >::UnregisterNotificationEvent ( ::KEVENT * event)
inlinefinaloverrideprotected

Member Data Documentation

◆ channels

template<typename stream_desc_t>
const unsigned int dxd::wavert::stream< stream_desc_t >::channels
protected

◆ conversion

template<typename stream_desc_t>
converter dxd::wavert::stream< stream_desc_t >::conversion {}
protected

◆ cursor

template<typename stream_desc_t>
dx::stream::cursor dxd::wavert::stream< stream_desc_t >::cursor {}
protected

this endpoint's anchor in its ring as a client

◆ format

template<typename stream_desc_t>
const dx::stream::format dxd::wavert::stream< stream_desc_t >::format
protected

what Windows negotiated for this endpoint

◆ idx

template<typename stream_desc_t>
const unsigned int dxd::wavert::stream< stream_desc_t >::idx
protected

◆ linesize

template<typename stream_desc_t>
const unsigned int dxd::wavert::stream< stream_desc_t >::linesize
protected

◆ samplerate

template<typename stream_desc_t>
const unsigned int dxd::wavert::stream< stream_desc_t >::samplerate
protected

◆ started

template<typename stream_desc_t>
bool dxd::wavert::stream< stream_desc_t >::started {}
protected

◆ status

template<typename stream_desc_t>
os_result dxd::wavert::stream< stream_desc_t >::status {not_initialized}

◆ transport

template<typename stream_desc_t>
bool dxd::wavert::stream< stream_desc_t >::transport {}
protected

this endpoint is its ring's transport


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.