|
| FullDuplex (const char *devName) |
|
| FullDuplex (const char *playDevName, const char *captureDevName) |
|
virtual | ~FullDuplex (void) |
|
int | link () |
|
int | unLink () |
|
virtual int | go () |
|
int | resetParams () |
|
int | setFormat (snd_pcm_format_t format) |
|
int | setAccess (snd_pcm_access_t access) |
|
int | setSampleRate (unsigned int rrate, int dir=0) |
|
int | setBufSize (snd_pcm_uframes_t bufSize) |
|
int | setChannels (unsigned int cnt) |
|
| Capture (const char *devName) |
|
| Capture () |
| Constructor. More...
|
|
int | readBuf (char *buffer, size_t len) |
|
template<typename Derived > |
int | readBuf (const Eigen::DenseBase< Derived > &audioData) |
|
template<typename Derived > |
Capture & | operator>> (const Eigen::DenseBase< Derived > &audioData) |
|
| Stream () |
| Constructor. More...
|
|
int | init (const char *device, snd_pcm_stream_t streamType, bool blockIn) |
|
virtual | ~Stream () |
| Destructor. More...
|
|
const char * | getFormatName (const snd_pcm_format_t format) |
| get name of PCM sample format More...
|
|
int | open (const char *device, snd_pcm_stream_t streamType, const int block) |
|
int | setParams () |
|
int | setSilence (void *data, unsigned int samples) |
| Silence a PCM samples buffer. More...
|
|
int | link (Stream &s) |
|
int | wait (int timeOut=1000) |
|
int | getFormatBits () |
|
| Software (void) |
|
virtual | ~Software (void) |
|
int | getSWParams () |
|
int | setSWParams () |
|
int | setSWThreshold (snd_pcm_uframes_t thresh) |
|
int | setAvailMin (snd_pcm_uframes_t cnt) |
|
void * | getAddress (const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset) const |
|
template<typename SAMPLE_TYPE > |
int | getChannelCount (const snd_pcm_channel_area_t *areas) const |
|
int | dumpSWParams () |
|
int | getHWParams () |
|
int | fillParams () |
|
int | resetParams () |
|
| Hardware () |
|
virtual | ~Hardware () |
|
void | copyFrom (snd_pcm_hw_params_t *hParamsIn) |
|
int | rateResample (unsigned int state) |
|
int | setAccess (snd_pcm_access_t access) |
|
int | getAccess (void) |
|
int | setFormat (snd_pcm_format_t format) |
|
int | getFormat (snd_pcm_format_t &format) |
|
int | getFormatPhysicalWidth () |
|
int | setChannels (unsigned int cnt) |
|
int | getChannels () |
|
int | getMaxChannels () |
|
int | setSampleRate (unsigned int rrate, int dir=0) |
|
int | getSampleRate (int dir=0) |
|
int | getPeriodSize (snd_pcm_uframes_t *p, int *dir=NULL) |
|
int | getPeriodSize (int *dir=NULL) |
|
int | setPeriodSize (snd_pcm_uframes_t *p, int *dir=0) |
|
int | setBufSize (snd_pcm_uframes_t bufSize) |
|
const char * | formatDescription (const snd_pcm_format_t format) const |
|
const char * | getDeviceName () |
|
int | dumpHWParams () |
|
| PCM () |
|
virtual | ~PCM () |
|
virtual snd_pcm_t * | getPCM () |
|
snd_pcm_t ** | getPCMP () |
|
int | open (const char *device, snd_pcm_stream_t streamType, const int block) |
|
int | close () |
|
int | drop () |
|
int | drain () |
|
int | reset () |
|
void | enableLog () |
|
int | logEnabled () |
|
int | dumpStatus () |
|
int | dumpPCM () |
|
int | dumpSetup () |
|
int | dumpHWSetup () |
|
int | dumpSWSetup () |
|
int | start () |
|
snd_pcm_state_t | getState () |
|
const char * | getStateName () |
|
bool | prepared () |
|
bool | opened () |
|
bool | isSetup () |
|
bool | running () |
|
bool | hasXrun () |
|
bool | draining () |
|
bool | paused () |
|
bool | suspended () |
|
bool | disconnected () |
|
| Playback (const char *devName) |
|
| Playback () |
|
virtual | ~Playback (void) |
|
void | open (const char *devName="default") |
|
int | writeBuf (void **buffers, size_t len, int ch) |
|
template<typename Derived > |
int | writeBufN (const Eigen::DenseBase< Derived > &audioData) |
|
int | writeBuf (char *bufferIn, size_t len) |
|
template<typename Derived > |
int | writeBuf (const Eigen::DenseBase< Derived > &audioData) |
|
template<typename Derived > |
Playback & | operator<< (const Eigen::DenseBase< Derived > &audioData) |
|
|
Eigen::Array< FRAME_TYPE, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > | inputAudio |
| The input audio variable, columns are channels, rows are frames (samples). More...
|
|
Eigen::Array< FRAME_TYPE, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > | outputAudio |
| The output audio variable, columns are channels, rows are frames (samples). More...
|
|
bool | block |
| Whether to block or use NONBLOCK. More...
|
|
snd_output_t * | log |
| The log stream if enabled. More...
|
|
snd_pcm_t * | handle |
| PCM handle. More...
|
|
template<typename FRAME_TYPE>
class ALSA::FullDuplex< FRAME_TYPE >
Class to operate ALSA in a full duplex mode. The process is write out, read in and process. You implement the process method. An example is like so :
int ch;
}
return 0;
}
public:
FullDuplexTest(
const char*devName,
int latency) :
FullDuplex(devName){
ch=2;
N=latency;
}
};
- Examples:
- ALSAFullDuplexTest.C.
Definition at line 50 of file FullDuplex.H.