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

clSaveSrv Class Reference

Save server. More...

#include <SaveSrv.hh>

Collaboration diagram for clSaveSrv:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 clSaveSrv ()
 ~clSaveSrv ()
int Main (int, char **)
void Stop ()

Public Attributes

clLogFile Log

Private Member Functions

bool Initialize ()
bool ConnectStream ()
bool CreateFile ()
bool CreateFile2 ()
void CreateFileName (char *)
void ProcessLoop ()
void Dither ()
bool WriteData ()
bool WriteData2 ()

Private Attributes

bool bRun
int iFormat
int iType
int iBits
int iDither
int iFileTime
int iFileH
unsigned int uiRndSeed
long lFrameLen
long lFrameSize
char cpSockName [_POSIX_PATH_MAX+1]
char cpSavePath [_POSIX_PATH_MAX+1]
time_t ttFileStarted
stRawDataFirst sDataHdr
SNDFILE * spSndFile
clAlloc InFrame
clAlloc OutFrame
clAlloc NoiseFrame
clAlloc FLACFrame
clCfgFile Cfg
clDSPOp DSP
clSockOp SOp

Detailed Description

Save server.

Definition at line 79 of file SaveSrv.hh.


Constructor & Destructor Documentation

clSaveSrv::clSaveSrv  ) 
 

Definition at line 718 of file SaveSrv.cc.

References clLogFile::Add(), bRun, iFileH, Log, clLogFile::Open(), SAVS_LOGFILE, and spSndFile.

clSaveSrv::~clSaveSrv  ) 
 

Definition at line 734 of file SaveSrv.cc.

References clLogFile::Add(), iFileH, Log, and spSndFile.


Member Function Documentation

bool clSaveSrv::Initialize  )  [private]
 

Definition at line 126 of file SaveSrv.cc.

References clLogFile::Add(), Cfg, cpSavePath, cpSockName, FLACFrame, GDT, clCfgFile::GetInt(), clCfgFile::GetStr(), iBits, iDither, iFileTime, iFormat, InFrame, iType, lFrameLen, lFrameSize, Log, NoiseFrame, OutFrame, SAVS_CFGFILE, SAVS_DEF_FILETIME, SAVS_DEF_FRAMELEN, SAVS_SNDFILE_MSGLEN, SD_CFGFILE, clCfgFile::SetFileName(), and uiRndSeed.

Referenced by Main().

bool clSaveSrv::ConnectStream  )  [private]
 

Definition at line 236 of file SaveSrv.cc.

References clLogFile::Add(), clSockClie::Connect(), cpSockName, _stRawDataFirst::dSampleRate, clSockOp::GetErrno(), clSockClie::GetErrno(), _stRawDataReq::iChannel, _stRawDataFirst::iChannels, Log, clSockOp::ReadN(), SAVS_LOGENTRY_SIZE, sDataHdr, clSockOp::SetHandle(), SOp, and clSockOp::WriteN().

Referenced by Main().

bool clSaveSrv::CreateFile  )  [private]
 

Definition at line 268 of file SaveSrv.cc.

References clLogFile::Add(), CreateFileName(), _stRawDataFirst::dSampleRate, iBits, _stRawDataFirst::iChannels, iDither, iFormat, iType, Log, SAVS_FORMAT_AIFF, SAVS_FORMAT_WAV, SAVS_TYPE_ADPCM, SAVS_TYPE_FLOAT, SAVS_TYPE_MSADPCM, SAVS_TYPE_PCM, sDataHdr, and spSndFile.

Referenced by ProcessLoop().

bool clSaveSrv::CreateFile2  )  [private]
 

Definition at line 353 of file SaveSrv.cc.

References clLogFile::Add(), Cfg, CreateFileName(), _stRawDataFirst::dSampleRate, clCfgFile::GetInt(), iBits, _stRawDataFirst::iChannels, iFileH, lFrameLen, Log, and sDataHdr.

Referenced by ProcessLoop().

void clSaveSrv::CreateFileName char *   )  [private]
 

Definition at line 456 of file SaveSrv.cc.

References cpFileExt, cpSavePath, iFileTime, iFormat, SAVS_TIMELEN, and ttFileStarted.

Referenced by CreateFile(), and CreateFile2().

void clSaveSrv::ProcessLoop  )  [private]
 

Definition at line 475 of file SaveSrv.cc.

References clLogFile::Add(), bRun, CreateFile(), CreateFile2(), clSockOp::GetErrno(), iFileTime, iFormat, InFrame, lFrameSize, Log, clSockOp::ReadN(), SAVS_FORMAT_AIFF, SAVS_FORMAT_FLAC, SAVS_FORMAT_WAV, SAVS_SHUTDOWNFILE, SOp, Stop(), ttFileStarted, WriteData(), and WriteData2().

Referenced by Main().

void clSaveSrv::Dither  )  [private]
 

Definition at line 529 of file SaveSrv.cc.

References GDT, iBits, InFrame, lFrameLen, NoiseFrame, and OutFrame.

Referenced by WriteData(), and WriteData2().

bool clSaveSrv::WriteData  )  [private]
 

Definition at line 607 of file SaveSrv.cc.

References clLogFile::Add(), Dither(), GDT, iBits, iDither, InFrame, lFrameLen, Log, OutFrame, SAVS_SNDFILE_MSGLEN, and spSndFile.

Referenced by ProcessLoop().

bool clSaveSrv::WriteData2  )  [private]
 

Definition at line 665 of file SaveSrv.cc.

References Dither(), DSP, FLACFrame, iBits, _stRawDataFirst::iChannels, iDither, InFrame, lFrameLen, OutFrame, and sDataHdr.

Referenced by ProcessLoop().

int clSaveSrv::Main int  ,
char ** 
 

Definition at line 755 of file SaveSrv.cc.

References bDaemon, ConnectStream(), Initialize(), ProcessLoop(), SAVS_VERSMAJ, SAVS_VERSMIN, and SAVS_VERSPL.

Referenced by main().

void clSaveSrv::Stop  )  [inline]
 

Definition at line 123 of file SaveSrv.hh.

References bRun.

Referenced by ProcessLoop(), and SigHandler().


Member Data Documentation

bool clSaveSrv::bRun [private]
 

Definition at line 81 of file SaveSrv.hh.

Referenced by clSaveSrv(), ProcessLoop(), and Stop().

int clSaveSrv::iFormat [private]
 

Definition at line 82 of file SaveSrv.hh.

Referenced by CreateFile(), CreateFileName(), Initialize(), and ProcessLoop().

int clSaveSrv::iType [private]
 

Definition at line 83 of file SaveSrv.hh.

Referenced by CreateFile(), and Initialize().

int clSaveSrv::iBits [private]
 

Definition at line 84 of file SaveSrv.hh.

Referenced by CreateFile(), CreateFile2(), Dither(), Initialize(), WriteData(), and WriteData2().

int clSaveSrv::iDither [private]
 

Definition at line 85 of file SaveSrv.hh.

Referenced by CreateFile(), Initialize(), WriteData(), and WriteData2().

int clSaveSrv::iFileTime [private]
 

Definition at line 86 of file SaveSrv.hh.

Referenced by CreateFileName(), Initialize(), and ProcessLoop().

int clSaveSrv::iFileH [private]
 

Definition at line 87 of file SaveSrv.hh.

Referenced by clSaveSrv(), CreateFile2(), and ~clSaveSrv().

unsigned int clSaveSrv::uiRndSeed [private]
 

Definition at line 88 of file SaveSrv.hh.

Referenced by Initialize().

long clSaveSrv::lFrameLen [private]
 

Definition at line 89 of file SaveSrv.hh.

Referenced by CreateFile2(), Dither(), Initialize(), WriteData(), and WriteData2().

long clSaveSrv::lFrameSize [private]
 

Definition at line 90 of file SaveSrv.hh.

Referenced by Initialize(), and ProcessLoop().

char clSaveSrv::cpSockName[_POSIX_PATH_MAX + 1] [private]
 

Definition at line 91 of file SaveSrv.hh.

Referenced by ConnectStream(), and Initialize().

char clSaveSrv::cpSavePath[_POSIX_PATH_MAX + 1] [private]
 

Definition at line 92 of file SaveSrv.hh.

Referenced by CreateFileName(), and Initialize().

time_t clSaveSrv::ttFileStarted [private]
 

Definition at line 93 of file SaveSrv.hh.

Referenced by CreateFileName(), and ProcessLoop().

stRawDataFirst clSaveSrv::sDataHdr [private]
 

Definition at line 94 of file SaveSrv.hh.

Referenced by ConnectStream(), CreateFile(), CreateFile2(), and WriteData2().

SNDFILE* clSaveSrv::spSndFile [private]
 

Definition at line 95 of file SaveSrv.hh.

Referenced by clSaveSrv(), CreateFile(), WriteData(), and ~clSaveSrv().

clAlloc clSaveSrv::InFrame [private]
 

Definition at line 99 of file SaveSrv.hh.

Referenced by Dither(), Initialize(), ProcessLoop(), WriteData(), and WriteData2().

clAlloc clSaveSrv::OutFrame [private]
 

Definition at line 100 of file SaveSrv.hh.

Referenced by Dither(), Initialize(), WriteData(), and WriteData2().

clAlloc clSaveSrv::NoiseFrame [private]
 

Definition at line 101 of file SaveSrv.hh.

Referenced by Dither(), and Initialize().

clAlloc clSaveSrv::FLACFrame [private]
 

Definition at line 102 of file SaveSrv.hh.

Referenced by Initialize(), and WriteData2().

clCfgFile clSaveSrv::Cfg [private]
 

Definition at line 103 of file SaveSrv.hh.

Referenced by CreateFile2(), and Initialize().

clDSPOp clSaveSrv::DSP [private]
 

Definition at line 104 of file SaveSrv.hh.

Referenced by WriteData2().

clSockOp clSaveSrv::SOp [private]
 

Definition at line 105 of file SaveSrv.hh.

Referenced by ConnectStream(), and ProcessLoop().

clLogFile clSaveSrv::Log
 

Definition at line 119 of file SaveSrv.hh.

Referenced by clSaveSrv(), ConnectStream(), CreateFile(), CreateFile2(), Initialize(), ProcessLoop(), SigHandler(), WriteData(), and ~clSaveSrv().


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