50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
#ifndef A7586F47_A0A8_4B55_9701_8E79240D6736
|
|
#define A7586F47_A0A8_4B55_9701_8E79240D6736
|
|
/*
|
|
*******************************************************************************
|
|
* INCLUDE
|
|
*******************************************************************************
|
|
*/
|
|
#include "../core/AudioOutput.h"
|
|
#include "PCM.h"
|
|
#include "SoundCard.h"
|
|
#include "util/Task.h"
|
|
|
|
namespace Video
|
|
{
|
|
namespace ALSA
|
|
{
|
|
/*
|
|
*******************************************************************************
|
|
* CLASS DECLARE
|
|
*******************************************************************************
|
|
*/
|
|
class Output: public Core::AudioOutput
|
|
{
|
|
public:
|
|
Output(const std::string& arg);
|
|
~Output();
|
|
|
|
protected:
|
|
void initialize() override;
|
|
void deinitialize() override;
|
|
void onConfigChanged(ParameterNames& names) override;
|
|
void writeFrame(Core::Frame::Ptr pFrame) override;
|
|
|
|
SoundCard::Ptr getSoundCard();
|
|
bool tryEstablishSoundCard();
|
|
void runSearchTask();
|
|
|
|
PROPERTY_DECLARE(SoundCardEstablished, bool, false, protected, protected)
|
|
|
|
private:
|
|
std::string _soundCardID;
|
|
::Util::Task _searchTask;
|
|
PCM _pcm;
|
|
snd_pcm_access_t _access;
|
|
int _samples;
|
|
int _channels;
|
|
};
|
|
}
|
|
}
|
|
#endif
|