49 template<
typename FRAME_TYPE>
72 Eigen::Array<FRAME_TYPE, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
inputAudio;
74 Eigen::Array<FRAME_TYPE, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
outputAudio;
117 if (inputAudio.rows()!=outputAudio.rows())
119 if (inputAudio.cols()==0 || outputAudio.cols()==0)
239 #endif //FULLDUPLEX_H int setSampleRate(unsigned int rrate, int dir=0)
int setSampleRate(unsigned int rrate, int dir=0)
#define ALSA_FRAME_MISMATCH_ERROR
error when frame sizes are incorrect
int setAccess(snd_pcm_access_t access)
int setBufSize(snd_pcm_uframes_t bufSize)
int setBufSize(snd_pcm_uframes_t bufSize)
int setChannels(unsigned int cnt)
int setFormat(snd_pcm_format_t format)
FullDuplex(const char *devName)
#define ALSA_FORMAT_MISMATCH_ERROR
error when comparing bits sizes of two words
virtual snd_pcm_t * getPCM()
int readBuf(char *buffer, size_t len)
Eigen::Array< FRAME_TYPE, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > outputAudio
The output audio variable, columns are channels, rows are frames (samples).
#define ALSA_YOUR_PROCESS_FN_ERROR
error when calling the user's process function
int setAccess(snd_pcm_access_t access)
virtual int evaluateError(int errorNum)
int getFormatPhysicalWidth()
#define ALSA_NO_CHANNELS_ERROR
error when channel cnt is zero
Eigen::Array< FRAME_TYPE, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > inputAudio
The input audio variable, columns are channels, rows are frames (samples).
FullDuplex(const char *playDevName, const char *captureDevName)
int setFormat(snd_pcm_format_t format)
virtual ~FullDuplex(void)
int setChannels(unsigned int cnt)
int writeBuf(void **buffers, size_t len, int ch)