Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

clSoundSrvA Class Reference

SoundServer for ALSA. More...

#include <SoundSrvA.hh>

Collaboration diagram for clSoundSrvA:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 clSoundSrvA ()
 ~clSoundSrvA ()
int Main (int, char **)
void * AudioInThread (void *)
void * ServeClientThread (void *)
void Stop ()

Public Attributes

clLogFile Log

Private Member Functions

bool GetAudioCfg (int *, int *, int *, int *, int *, int *, int *, int *)
bool InitCompress (int, int, int, int, int)

Private Attributes

volatile bool bRun
volatile int iAudioBufSize
volatile int iBlockCntr
stSoundStart sHdr
clAlloc AudioBuf
clAlloc CompHead
clAlloc FLACFrame
clMutex MtxAudio
clCondition CndAudio
clCfgFile Cfg

Detailed Description

SoundServer for ALSA.

Note:
See soundsrv2 for architecture description.

Definition at line 58 of file SoundSrvA.hh.


Constructor & Destructor Documentation

clSoundSrvA::clSoundSrvA  ) 
 

Definition at line 276 of file SoundSrvA.cc.

References clLogFile::Add(), bRun, Cfg, iAudioBufSize, iBlockCntr, Log, clLogFile::Open(), clCfgFile::SetFileName(), SSA_CFGFILE, and SSA_LOGFILE.

clSoundSrvA::~clSoundSrvA  ) 
 

Definition at line 290 of file SoundSrvA.cc.

References clLogFile::Add(), and Log.


Member Function Documentation

bool clSoundSrvA::GetAudioCfg int *  ,
int *  ,
int *  ,
int *  ,
int *  ,
int *  ,
int *  ,
int * 
[private]
 

Definition at line 110 of file SoundSrvA.cc.

References clLogFile::Add(), Cfg, clCfgFile::GetInt(), Log, and SSA_FRAG_SIZE_DEFAULT.

Referenced by AudioInThread().

bool clSoundSrvA::InitCompress int  ,
int  ,
int  ,
int  ,
int 
[private]
 

Definition at line 152 of file SoundSrvA.cc.

References clLogFile::Add(), Cfg, FLACFrame, clCfgFile::GetInt(), Log, and MSG_SOUND_COMPRESS_FLAC.

Referenced by AudioInThread().

int clSoundSrvA::Main int  ,
char ** 
 

Definition at line 303 of file SoundSrvA.cc.

References clLogFile::Add(), bDaemon, clSockServ::Bind(), bRun, Cfg, clCfgFile::GetInt(), GLOBAL_VERSMAJ, GLOBAL_VERSMIN, GLOBAL_VERSPL, Log, SigHandler(), SSA_CONNECT_TIMEOUT, SSA_SHUTDOWNFILE, Stop(), clSockServ::WaitForConnect(), WrapAudioInThread(), and WrapServeClientThread().

Referenced by main().

void * clSoundSrvA::AudioInThread void *   ) 
 

Definition at line 379 of file SoundSrvA.cc.

References clLogFile::Add(), AudioBuf, bRun, Cfg, CndAudio, _stSoundStart::dSampleRate, FLACFrame, GDT, GetAudioCfg(), clCfgFile::GetInt(), iAudioBufSize, iBlockCntr, _stSoundStart::iChannels, _stSoundStart::iCompress, _stSoundStart::iFragmentSize, InitCompress(), Log, MSG_SOUND_COMPRESS_FLAC, MSG_SOUND_COMPRESS_NONE, MtxAudio, clSoundMsg::SetData(), sHdr, SSA_FRAG_SIZE_DEFAULT, SSA_INTHREAD_PRIORITY, SSA_LOGENTRY_SIZE, and Stop().

Referenced by WrapAudioInThread().

void * clSoundSrvA::ServeClientThread void *   ) 
 

Definition at line 664 of file SoundSrvA.cc.

References clLogFile::Add(), AudioBuf, bRun, Cfg, CndAudio, CompHead, clSockOp::DisableNagle(), clCfgFile::GetInt(), clSockOp::GetPeerName(), GLOBAL_HEADER_LEN, iAudioBufSize, iBlockCntr, _stSoundStart::iCompress, Log, MtxAudio, clSockOp::SetSendBufSize(), clSoundMsg::SetStart(), clSockOp::SetTypeOfService(), sHdr, SOp, SSA_LOGENTRY_SIZE, SSA_OUTTHREAD_PRIORITY, SSA_SOCKET_BUF_FRAGS, and clSockOp::WriteN().

Referenced by WrapServeClientThread().

void clSoundSrvA::Stop  )  [inline]
 

Definition at line 89 of file SoundSrvA.hh.

References bRun.

Referenced by AudioInThread(), Main(), and SigHandler().


Member Data Documentation

volatile bool clSoundSrvA::bRun [private]
 

Definition at line 60 of file SoundSrvA.hh.

Referenced by AudioInThread(), clSoundSrvA(), Main(), ServeClientThread(), and Stop().

volatile int clSoundSrvA::iAudioBufSize [private]
 

Definition at line 61 of file SoundSrvA.hh.

Referenced by AudioInThread(), clSoundSrvA(), and ServeClientThread().

volatile int clSoundSrvA::iBlockCntr [private]
 

Definition at line 62 of file SoundSrvA.hh.

Referenced by AudioInThread(), clSoundSrvA(), and ServeClientThread().

stSoundStart clSoundSrvA::sHdr [private]
 

Definition at line 63 of file SoundSrvA.hh.

Referenced by AudioInThread(), and ServeClientThread().

clAlloc clSoundSrvA::AudioBuf [private]
 

Definition at line 67 of file SoundSrvA.hh.

Referenced by AudioInThread(), and ServeClientThread().

clAlloc clSoundSrvA::CompHead [private]
 

Definition at line 68 of file SoundSrvA.hh.

Referenced by ServeClientThread().

clAlloc clSoundSrvA::FLACFrame [private]
 

Definition at line 69 of file SoundSrvA.hh.

Referenced by AudioInThread(), and InitCompress().

clMutex clSoundSrvA::MtxAudio [private]
 

Definition at line 70 of file SoundSrvA.hh.

Referenced by AudioInThread(), and ServeClientThread().

clCondition clSoundSrvA::CndAudio [private]
 

Definition at line 74 of file SoundSrvA.hh.

Referenced by AudioInThread(), and ServeClientThread().

clCfgFile clSoundSrvA::Cfg [private]
 

Definition at line 75 of file SoundSrvA.hh.

Referenced by AudioInThread(), clSoundSrvA(), GetAudioCfg(), InitCompress(), Main(), and ServeClientThread().

clLogFile clSoundSrvA::Log
 

Definition at line 83 of file SoundSrvA.hh.

Referenced by AudioInThread(), clSoundSrvA(), GetAudioCfg(), InitCompress(), Main(), ServeClientThread(), SigHandler(), and ~clSoundSrvA().


The documentation for this class was generated from the following files:
Generated on Sun Oct 26 19:12:24 2003 for HASAS by doxygen 1.3.3