SoundPlay Class Reference

#include <SoundPlay.h>

List of all members.

Public Member Functions

 SoundPlay ()
virtual ~SoundPlay ()
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 Ready (const OReadyEvent &event)

Public Attributes

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

Private Member Functions

void OpenSpeaker ()
void NewSoundVectorData ()
void LoadWAV ()
void SetPowerAndVolume ()
WAVError CopyWAVTo (RCRegion *region)
RCRegion * FindFreeRegion ()

Private Attributes

SoundPlayState soundPlayState
OPrimitiveID speakerID
ODesignDataID wavID
WAV wav
RCRegion * region [SOUND_NUM_BUFFER]

Static Private Attributes

const size_t SOUND_NUM_BUFFER = 2


Constructor & Destructor Documentation

SoundPlay::SoundPlay  ) 
 

Definition at line 17 of file SoundPlay.cc.

References region, and SPS_IDLE.

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

Definition at line 32 of file SoundPlay.h.


Member Function Documentation

WAVError SoundPlay::CopyWAVTo RCRegion *  region  )  [private]
 

Definition at line 231 of file SoundPlay.cc.

References WAV::CopyTo(), WAV::Rewind(), wav, and WAVError.

Referenced by DoStart(), and Ready().

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

Definition at line 74 of file SoundPlay.cc.

References wavID.

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

Definition at line 25 of file SoundPlay.cc.

References LoadWAV(), NewSoundVectorData(), OpenSpeaker(), and SetPowerAndVolume().

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

Definition at line 43 of file SoundPlay.cc.

References CopyWAVTo(), region, soundPlayState, and subject.

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

Definition at line 61 of file SoundPlay.cc.

References soundPlayState.

RCRegion * SoundPlay::FindFreeRegion  )  [private]
 

Definition at line 245 of file SoundPlay.cc.

References region.

Referenced by Ready().

void SoundPlay::LoadWAV  )  [private]
 

Definition at line 155 of file SoundPlay.cc.

References byte, WAV::Set(), wav, WAVError, and wavID.

Referenced by DoInit().

void SoundPlay::NewSoundVectorData  )  [private]
 

Definition at line 124 of file SoundPlay.cc.

References WAV::GetSoundUnitSize(), region, WAV::Set(), speakerID, and wav.

Referenced by DoInit().

void SoundPlay::OpenSpeaker  )  [private]
 

Definition at line 98 of file SoundPlay.cc.

References speakerID.

Referenced by DoInit().

void SoundPlay::Ready const OReadyEvent &  event  ) 
 

Definition at line 82 of file SoundPlay.cc.

References CopyWAVTo(), FindFreeRegion(), soundPlayState, and subject.

void SoundPlay::SetPowerAndVolume  )  [private]
 

Definition at line 178 of file SoundPlay.cc.

References WAV::GetBitsPerSample(), WAV::GetSamplingRate(), speakerID, and wav.

Referenced by DoInit().


Member Data Documentation

OObserver* SoundPlay::observer[numOfObserver]
 

Definition at line 35 of file SoundPlay.h.

RCRegion* SoundPlay::region[SOUND_NUM_BUFFER] [private]
 

Definition at line 58 of file SoundPlay.h.

Referenced by DoStart(), FindFreeRegion(), NewSoundVectorData(), and SoundPlay().

const size_t SoundPlay::SOUND_NUM_BUFFER = 2 [static, private]
 

Definition at line 45 of file SoundPlay.h.

SoundPlayState SoundPlay::soundPlayState [private]
 

Definition at line 54 of file SoundPlay.h.

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

OPrimitiveID SoundPlay::speakerID [private]
 

Definition at line 55 of file SoundPlay.h.

Referenced by NewSoundVectorData(), OpenSpeaker(), and SetPowerAndVolume().

OSubject* SoundPlay::subject[numOfSubject]
 

Definition at line 34 of file SoundPlay.h.

Referenced by DoStart(), and Ready().

WAV SoundPlay::wav [private]
 

Definition at line 57 of file SoundPlay.h.

Referenced by CopyWAVTo(), LoadWAV(), NewSoundVectorData(), and SetPowerAndVolume().

ODesignDataID SoundPlay::wavID [private]
 

Definition at line 56 of file SoundPlay.h.

Referenced by DoDestroy(), and LoadWAV().


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