Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Ase::PcmDriver Class Referenceabstract

Base class for a PCM devices. More...

#include "driver.hh"

Inheritance diagram for Ase::PcmDriver:
[legend]

Public Types

typedef std::shared_ptr< PcmDriverPcmDriverP
 
- Public Types inherited from Ase::Driver
enum  {
  SURROUND , HEADSET , RECORDER , MIDI_THRU ,
  JACK , ALSA_USB , ALSA_KERN , OSS ,
  PULSE , ALSA_USER , PSEUDO , PAUTO ,
  PNULL , WCARD , WDEV , WSUB
}
 
enum  IODir { READONLY , WRITEONLY , READWRITE }
 
typedef std::shared_ptr< DriverDriverP
 
using Entry = DriverEntry
 
using EntryVec = DriverEntryS
 

Public Member Functions

virtual uint pcm_n_channels () const =0
 
virtual uint pcm_mix_freq () const =0
 
virtual uint pcm_block_length () const =0
 
virtual void pcm_latency (uint *rlatency, uint *wlatency) const =0
 
virtual bool pcm_check_io (int64 *timeoutp)=0
 
virtual size_t pcm_read (size_t n, float *values)=0
 
virtual void pcm_write (size_t n, const float *values)=0
 
- Public Member Functions inherited from Ase::Driver
bool opened () const
 
bool readable () const
 
bool writable () const
 
String devid () const
 Return a string which uniquely identifies this driver and device.
 
virtual void close ()=0
 
- Public Member Functions inherited from std::enable_shared_from_this< Driver >
enable_shared_from_this (T... args)
 
operator= (T... args)
 
shared_from_this (T... args)
 
weak_from_this (T... args)
 
~enable_shared_from_this (T... args)
 

Static Public Member Functions

static PcmDriverP open (const String &devid, IODir desired, IODir required, const PcmDriverConfig &config, Ase::Error *ep)
 Open PCM device and return a pointer to it, or nullptr with *ep set on error.
 
static EntryVec list_drivers ()
 
static String register_driver (const String &driverid, const std::function< PcmDriverP(const String &)> &create, const std::function< void(EntryVec &)> &list)
 
- Static Public Member Functions inherited from Ase::Driver
static String priority_string (uint priority)
 Return string which represents the given priority mask.
 

Protected Member Functions

 PcmDriver (const String &driver, const String &devid)
 
virtual Ase::Error open (IODir iodir, const PcmDriverConfig &config)=0
 
- Protected Member Functions inherited from Ase::Driver
 Driver (const String &driver, const String &devid)
 
template<class Derived >
std::shared_ptr< Derivedshared_from_base ()
 

Additional Inherited Members

- Protected Attributes inherited from Ase::Driver
const String driver_
 
const String devid_
 
size_t flags_
 

Detailed Description

Base class for a PCM devices.

Definition at line 99 of file driver.hh.

Member Typedef Documentation

◆ PcmDriverP

Definition at line 104 of file driver.hh.

Constructor & Destructor Documentation

◆ PcmDriver()

Ase::PcmDriver::PcmDriver ( const String driver,
const String devid 
)
explicitprotected

Definition at line 168 of file driver.cc.

Member Function Documentation

◆ list_drivers()

Driver::EntryVec Ase::PcmDriver::list_drivers ( )
static

Definition at line 215 of file driver.cc.

◆ open()

PcmDriverP Ase::PcmDriver::open ( const String devid,
IODir  desired,
IODir  required,
const PcmDriverConfig config,
Ase::Error ep 
)
static

Open PCM device and return a pointer to it, or nullptr with *ep set on error.

Definition at line 174 of file driver.cc.

References Ase::ase_error_blurb(), Ase::Driver::devid(), and log().

◆ register_driver()

String Ase::PcmDriver::register_driver ( const String driverid,
const std::function< PcmDriverP(const String &)> &  create,
const std::function< void(EntryVec &)> &  list 
)
static

Definition at line 207 of file driver.cc.


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