dxd - dynax driver framework  2675
cross platform open source driver development framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dxd::engine Class Reference

#include <dxd_audio.h>

+ Inheritance diagram for dxd::engine:
+ Collaboration diagram for dxd::engine:

Public Member Functions

::IOReturn clipOutputSamples (const void *src, void *dst, UInt32 offset, UInt32 frames, const ::IOAudioStreamFormat *fmt,::IOAudioStream *stream)
 
::IOReturn convertInputSamples (const void *src, void *dst, UInt32 offset, UInt32 frames, const ::IOAudioStreamFormat *fmt,::IOAudioStream *stream)
 
UInt32 getCurrentSampleFrame ()
 realtime sample frame hardware position More...
 
::IOReturn getLoopCountAndTimeStamp (UInt32 *loops,::AbsoluteTime *timestamp)
 
bool initHardware (::IOService *provider)
 configure IOAudioEngine and setup streams More...
 
::IOReturn performAudioEngineStart ()
 
::IOReturn performAudioEngineStop ()
 
::IOReturn performFormatChange (::IOAudioStream *stream, const ::IOAudioStreamFormat *fmt, const ::IOAudioSampleRate *clk)
 

Public Attributes

dxd::devicedevice
 

Private Types

enum  bus { bus::usb ='usb\0', bus::pci ='pci\0' }
 

Private Member Functions

unsigned int enumerate (enum class stream::pin::format format=stream::pin::format::any) const
 enumerate typified pins More...
 
const struct streamfind (unsigned int &pin, enum class stream::pin::format format=stream::pin::format::any, enum direction direction=direction::any) const
 finds and returns the stream description and pin idx into this stream More...
 

Private Attributes

enum dx::stream::desc::bus bus
 
char model [0x60]
 
struct dx::stream::desc::stream stream [max_streams]
 
unsigned int streams
 number of streams More...
 
char vendor [0x60]
 

Member Function Documentation

::IOReturn dxd::engine::clipOutputSamples ( const void *  src,
void *  dst,
UInt32  offset,
UInt32  frames,
const ::IOAudioStreamFormat *  fmt,
::IOAudioStream *  stream 
)
inline

+ Here is the call graph for this function:

::IOReturn dxd::engine::convertInputSamples ( const void *  src,
void *  dst,
UInt32  offset,
UInt32  frames,
const ::IOAudioStreamFormat *  fmt,
::IOAudioStream *  stream 
)
inline

+ Here is the call graph for this function:

UInt32 dxd::engine::getCurrentSampleFrame ( )
inline

realtime sample frame hardware position

::IOReturn dxd::engine::getLoopCountAndTimeStamp ( UInt32 *  loops,
::AbsoluteTime *  timestamp 
)
inline

+ Here is the call graph for this function:

bool dxd::engine::initHardware ( ::IOService *  provider)
inline

configure IOAudioEngine and setup streams

retrieve support range of sample rates retrieved from the device driver Create an IOAudioStream for each buffer and add it to this audio engine iterate thru all format descriptions from USB bus driver, select and add to CoreAudio's list of available formats

creates and initializes the IOAudioStream

set latencies and CoreAudio safty offsets

Todo:
compute latencies and CoreAudio safty offsets
Todo:
release audiostream

+ Here is the call graph for this function:

::IOReturn dxd::engine::performAudioEngineStart ( )
inline
::IOReturn dxd::engine::performAudioEngineStop ( )
inline
::IOReturn dxd::engine::performFormatChange ( ::IOAudioStream *  stream,
const ::IOAudioStreamFormat *  fmt,
const ::IOAudioSampleRate *  clk 
)
inline

Member Data Documentation

dxd::device* dxd::engine::device

The documentation for this class was generated from the following file:

(c) copyright 2009 dynamic acoustics e.U. generated on Tue Dec 4 2018

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.