Relacs Core Library
0.9.8
|
#include <attsim.h>
Public Member Functions | |
AttSim (void) | |
~AttSim (void) | |
int | open (const string &device) override |
bool | isOpen (void) const |
void | close (void) |
virtual const Options & | settings (void) const |
virtual int | lines (void) const |
virtual double | minLevel (void) const |
virtual double | maxLevel (void) const |
virtual void | levels (vector< double > &l) const |
int | attenuate (int di, double &decibel) |
int | testAttenuate (int di, double &decibel) |
Public Member Functions inherited from Attenuator | |
Attenuator (void) | |
Attenuator (const string &deviceclass) | |
virtual | ~Attenuator (void) |
virtual int | mute (int di) |
virtual int | testMute (int di) |
virtual int | open (Device &device) |
Static Public Attributes | |
static const int | MaxDevices = 2 |
static double | Decibel [MaxDevices] = { 0, 0 } |
Static Public Attributes inherited from Attenuator | |
static const double | MuteAttenuationLevel |
static const int | Underflow |
static const int | Overflow |
Additional Inherited Members | |
Protected Member Functions inherited from Attenuator | |
void | setInfo (void) |
Implementation of the Attenuator class for simulating an attenuator.
~AttSim | ( | void | ) |
Close the attenuator simulation.
|
overridevirtual |
Open the attenuator device driver specified by device.
Reimplemented from Attenuator.
References Attenuator::setInfo().
|
virtual |
Returns true if the attenuator device driver was succesfully opened.
Implements Attenuator.
|
virtual |
Close the attenuator device driver.
Implements Attenuator.
|
virtual |
Returns the current settings of the attenuator.
References ConfigClass::addNumber(), ConfigClass::addText(), ConfigClass::clear(), AttSim::Decibel, and Attenuator::MuteAttenuationLevel.
|
virtual |
Returns the number of attenuator devices the driver handles.
Implements Attenuator.
References AttSim::MaxDevices.
|
virtual |
Returns the minimum possible attenuation level in decibel. This number can be negative, indicating amplification.
Implements Attenuator.
|
virtual |
Returns the maximum possible attenuation level in decibel.
Implements Attenuator.
|
virtual |
Returns in l all possible attenuation levels sorted by increasing attenuation levels (highest last).
Implements Attenuator.
References relacs::ceil().
|
virtual |
Set the attenuation level of the subdevice specified by its index di to decibel decibel. Returns the actually set level in decibel.
Implements Attenuator.
References AttSim::Decibel, relacs::floor(), AttSim::MaxDevices, Attenuator::MuteAttenuationLevel, Attenuator::Overflow, and Attenuator::Underflow.
|
virtual |
Tests setting the attenuation level of the subdevice specified by its index di to decibel decibel. Returns the actually set level in decibel.
Implements Attenuator.
References relacs::floor(), AttSim::MaxDevices, Attenuator::MuteAttenuationLevel, Attenuator::Overflow, and Attenuator::Underflow.
|
static |
Referenced by AttSim::attenuate(), AttSim::lines(), and AttSim::testAttenuate().
|
static |
Referenced by AttSim::attenuate(), and AttSim::settings().