整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
43
video/alsa/PCM.h
Normal file
43
video/alsa/PCM.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef F1145346_5CCE_48F8_8398_073AFB8758C6
|
||||
#define F1145346_5CCE_48F8_8398_073AFB8758C6
|
||||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "SoundCard.h"
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
namespace Video
|
||||
{
|
||||
namespace ALSA
|
||||
{
|
||||
/*
|
||||
*******************************************************************************
|
||||
* CLASS DECLARE
|
||||
*******************************************************************************
|
||||
*/
|
||||
class PCM
|
||||
{
|
||||
public:
|
||||
PCM();
|
||||
~PCM();
|
||||
|
||||
public:
|
||||
int open(SoundCard::Ptr pSoundCard, snd_pcm_stream_t st);
|
||||
int close();
|
||||
|
||||
int config(snd_pcm_access_t access, snd_pcm_format_t format, int channels, int rate, int framesz, int samplesz);
|
||||
|
||||
int write(const void* data, uint32_t framesz);
|
||||
int write(void** datas, uint32_t framesz);
|
||||
int read(void* buffer, uint32_t framesz);
|
||||
int read(void** buffers, uint32_t framesz);
|
||||
|
||||
private:
|
||||
void* _pPCM;
|
||||
snd_pcm_stream_t _stream;
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue