SoundRec Class Reference

#include <SoundRec.h>

List of all members.

Public Member Functions

 SoundRec ()
virtual ~SoundRec ()
virtual OStatus DoInit (const OSystemEvent &event)
virtual OStatus DoStart (const OSystemEvent &event)
virtual OStatus DoStop (const OSystemEvent &event)
virtual OStatus DoDestroy (const OSystemEvent &event)
void Notify (const ONotifyEvent &event)

Public Attributes

OSubject * subject [numOfSubject]
OObserver * observer [numOfObserver]

Private Member Functions

void ChooseMic (OPrimitiveRequest req)
void NewSoundBuffer ()
void DeleteSoundBuffer ()
int CopyToSoundBuffer (OSoundVectorData *soundVecData)
void SaveSoundBufferAsWAV (char *path)

Private Attributes

SoundRecState soundRecState
bytesoundBuf
bytesoundBufPtr

Static Private Attributes

const size_t SOUND_BUFFER_SIZE = 1048576
const size_t WAVE_HEADER_SIZE = 4 + 8 + 16 + 8
const size_t FMTSIZE_WITHOUT_EXTINFO = 16


Constructor & Destructor Documentation

SoundRec::SoundRec  ) 
 

Definition at line 18 of file SoundRec.cc.

References SRS_IDLE.

virtual SoundRec::~SoundRec  )  [inline, virtual]
 

Definition at line 31 of file SoundRec.h.


Member Function Documentation

void SoundRec::ChooseMic OPrimitiveRequest  req  )  [private]
 

Definition at line 108 of file SoundRec.cc.

Referenced by DoInit().

int SoundRec::CopyToSoundBuffer OSoundVectorData *  soundVecData  )  [private]
 

Definition at line 151 of file SoundRec.cc.

References byte, memcpy(), and soundBufPtr.

Referenced by Notify().

void SoundRec::DeleteSoundBuffer  )  [private]
 

Definition at line 142 of file SoundRec.cc.

References soundBuf, and soundBufPtr.

Referenced by DoDestroy().

OStatus SoundRec::DoDestroy const OSystemEvent &  event  )  [virtual]
 

Definition at line 71 of file SoundRec.cc.

References DeleteSoundBuffer().

OStatus SoundRec::DoInit const OSystemEvent &  event  )  [virtual]
 

Definition at line 24 of file SoundRec.cc.

References ChooseMic(), and NewSoundBuffer().

OStatus SoundRec::DoStart const OSystemEvent &  event  )  [virtual]
 

Definition at line 48 of file SoundRec.cc.

References soundBuf, and soundRecState.

OStatus SoundRec::DoStop const OSystemEvent &  event  )  [virtual]
 

Definition at line 60 of file SoundRec.cc.

References soundRecState.

void SoundRec::NewSoundBuffer  )  [private]
 

Definition at line 130 of file SoundRec.cc.

References byte, SOUND_BUFFER_SIZE, soundBuf, and soundBufPtr.

Referenced by DoInit().

void SoundRec::Notify const ONotifyEvent &  event  ) 
 

Definition at line 79 of file SoundRec.cc.

References CopyToSoundBuffer(), observer, SaveSoundBufferAsWAV(), and soundRecState.

void SoundRec::SaveSoundBufferAsWAV char *  path  )  [private]
 

Definition at line 162 of file SoundRec.cc.

References longword, soundBuf, WAVE_HEADER_SIZE, and word.

Referenced by Notify().


Member Data Documentation

const size_t SoundRec::FMTSIZE_WITHOUT_EXTINFO = 16 [static, private]
 

Definition at line 61 of file SoundRec.h.

OObserver* SoundRec::observer[numOfObserver]
 

Definition at line 34 of file SoundRec.h.

Referenced by Notify().

const size_t SoundRec::SOUND_BUFFER_SIZE = 1048576 [static, private]
 

Definition at line 59 of file SoundRec.h.

Referenced by NewSoundBuffer().

byte* SoundRec::soundBuf [private]
 

Definition at line 64 of file SoundRec.h.

Referenced by DeleteSoundBuffer(), DoStart(), NewSoundBuffer(), and SaveSoundBufferAsWAV().

byte* SoundRec::soundBufPtr [private]
 

Definition at line 65 of file SoundRec.h.

Referenced by CopyToSoundBuffer(), DeleteSoundBuffer(), and NewSoundBuffer().

SoundRecState SoundRec::soundRecState [private]
 

Definition at line 63 of file SoundRec.h.

Referenced by DoStart(), DoStop(), and Notify().

OSubject* SoundRec::subject[numOfSubject]
 

Definition at line 33 of file SoundRec.h.

const size_t SoundRec::WAVE_HEADER_SIZE = 4 + 8 + 16 + 8 [static, private]
 

Definition at line 60 of file SoundRec.h.

Referenced by SaveSoundBufferAsWAV().


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 23:04:35 2007 for openSDK by  doxygen 1.3.9.1