EMIPLIB
|
An Advanced Linux Sound Architecture (ALSA) soundcard output component. More...
#include <mipalsaoutput.h>
Public Member Functions | |
bool | open (int sampRate, int channels, const std::string device=std::string("plughw:0,0"), MIPTime blockTime=MIPTime(0.020), MIPTime arrayTime=MIPTime(10.0), bool floatSamples=true) |
Opens the soundcard device. | |
bool | close () |
Closes the soundcard device. |
This component uses the Advanced Linux Sound Architecture (ALSA) system to provide soundcard output functions. The component accepts floating point raw audio messages or signed 16 bit integer encoded raw audio messages and does not generate any messages itself.
bool MIPAlsaOutput::close | ( | ) |
This function closes the previously opened soundcard device.
bool MIPAlsaOutput::open | ( | int | sampRate, |
int | channels, | ||
const std::string | device = std::string("plughw:0,0") , |
||
MIPTime | blockTime = MIPTime(0.020) , |
||
MIPTime | arrayTime = MIPTime(10.0) , |
||
bool | floatSamples = true |
||
) |
With this function, the soundcard output component opens and initializes the soundcard device.
sampRate | The sampling rate. |
channels | The number of channels. |
device | The name of the device to open. |
blockTime | Audio data with a length corresponding to this parameter is sent to the soundcard device during each iteration. |
arrayTime | The amount of memory allocated to internal buffers, specified as a time interval. Note that this does not correspond to the amount of buffering introduced by this component. |
floatSamples | Flag indicating if floating point samples or integer samples should be used. |