Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)
« « « Anklang Documentation |
Base class for a PCM devices. More...
#include "driver.hh"
Public Types | |
typedef std::shared_ptr< PcmDriver > | PcmDriverP |
![]() | |
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< Driver > | DriverP |
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 |
![]() | |
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 |
![]() | |
T | enable_shared_from_this (T... args) |
T | operator= (T... args) |
T | shared_from_this (T... args) |
T | weak_from_this (T... args) |
T | ~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 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 |
![]() | |
Driver (const String &driver, const String &devid) | |
template<class Derived > | |
std::shared_ptr< Derived > | shared_from_base () |
Additional Inherited Members | |
![]() | |
const String | driver_ |
const String | devid_ |
size_t | flags_ |
|
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().
|
static |