34 |
class AlsaIO : public AudioIO, protected Thread { |
class AlsaIO : public AudioIO, protected Thread { |
35 |
public: |
public: |
36 |
AlsaIO(); |
AlsaIO(); |
37 |
int Initialize(uint Channels, uint Samplerate, uint Fragments, uint FragmentSize); |
int Initialize(uint Channels, uint Samplerate, uint Fragments, uint FragmentSize, String Card); |
38 |
void Activate(); |
void Activate(); |
39 |
void Close(); |
void Close(); |
40 |
void* GetInterleavedOutputBuffer(); |
void* GetInterleavedOutputBuffer(); |
42 |
protected: |
protected: |
43 |
int Main(); ///< Implementation of virtual method from class Thread |
int Main(); ///< Implementation of virtual method from class Thread |
44 |
private: |
private: |
|
typedef std::string String; |
|
|
|
|
45 |
int16_t* pOutputBuffer; ///< This is the buffer where the final mix will be copied to and send to the sound card |
int16_t* pOutputBuffer; ///< This is the buffer where the final mix will be copied to and send to the sound card |
46 |
String pcm_name; ///< Name of the PCM device, like plughw:0,0 the first number is the number of the soundcard, the second number is the number of the device. |
String pcm_name; ///< Name of the PCM device, like plughw:0,0 the first number is the number of the soundcard, the second number is the number of the device. |
47 |
snd_pcm_t* pcm_handle; ///< Handle for the PCM device |
snd_pcm_t* pcm_handle; ///< Handle for the PCM device |