LostFoundSound Class Reference

#include <LostFoundSound.h>

List of all members.

Public Member Functions

 LostFoundSound ()
virtual ~LostFoundSound ()
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 NotifyCommand (const ONotifyEvent &event)
void ReadyPlay (const OReadyEvent &event)

Public Attributes

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

Private Member Functions

void Play (BallTrackingHeadCommand *cmd)
void OpenSpeaker ()
void NewSoundVectorData ()
void LoadWAV ()
void SetPowerAndVolume ()
WAVError CopyWAVTo (RCRegion *region)
RCRegion * FindFreeRegion ()
bool IsAllRegionFree ()

Private Attributes

LostFoundSoundState lfsoundState
OPrimitiveID speakerID
ODesignDataID foundSoundID
WAV foundWAV
ODesignDataID lostSoundID
WAV lostWAV
WAVplayingWAV
RCRegion * region [SOUND_NUM_BUFFER]

Static Private Attributes

const size_t SOUND_UNIT_SIZE = 256
const size_t SOUND_NUM_BUFFER = 2


Constructor & Destructor Documentation

LostFoundSound::LostFoundSound  ) 
 

Definition at line 17 of file LostFoundSound.cc.

References LFSS_IDLE, and region.

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

Definition at line 35 of file LostFoundSound.h.


Member Function Documentation

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

Definition at line 263 of file LostFoundSound.cc.

References WAV::CopyTo(), and playingWAV.

Referenced by Play(), and ReadyPlay().

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

Definition at line 71 of file LostFoundSound.cc.

References foundSoundID, and lostSoundID.

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

Definition at line 28 of file LostFoundSound.cc.

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

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

Definition at line 45 of file LostFoundSound.cc.

References lfsoundState.

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

Definition at line 58 of file LostFoundSound.cc.

References lfsoundState.

RCRegion * LostFoundSound::FindFreeRegion  )  [private]
 

Definition at line 270 of file LostFoundSound.cc.

References region.

Referenced by ReadyPlay().

bool LostFoundSound::IsAllRegionFree  )  [private]
 

Definition at line 280 of file LostFoundSound.cc.

References region.

Referenced by ReadyPlay().

void LostFoundSound::LoadWAV  )  [private]
 

Definition at line 193 of file LostFoundSound.cc.

References byte, foundSoundID, foundWAV, lostSoundID, lostWAV, and WAV::Set().

Referenced by DoInit().

void LostFoundSound::NewSoundVectorData  )  [private]
 

Definition at line 164 of file LostFoundSound.cc.

References region, WAV::Set(), SOUND_UNIT_SIZE, and speakerID.

Referenced by DoInit().

void LostFoundSound::NotifyCommand const ONotifyEvent &  event  ) 
 

Definition at line 80 of file LostFoundSound.cc.

References BTH_BUSY, BTH_INVALID_ARG, BTHCMD_PLAY_FOUND_SOUND, lfsoundState, observer, Play(), subject, and BallTrackingHeadCommand::type.

void LostFoundSound::OpenSpeaker  )  [private]
 

Definition at line 153 of file LostFoundSound.cc.

References speakerID.

Referenced by DoInit().

void LostFoundSound::Play BallTrackingHeadCommand cmd  )  [private]
 

Definition at line 134 of file LostFoundSound.cc.

References CopyWAVTo(), playingWAV, region, WAV::Rewind(), subject, and BallTrackingHeadCommand::type.

Referenced by NotifyCommand().

void LostFoundSound::ReadyPlay const OReadyEvent &  event  ) 
 

Definition at line 111 of file LostFoundSound.cc.

References BTH_SUCCESS, CopyWAVTo(), FindFreeRegion(), IsAllRegionFree(), lfsoundState, and subject.

void LostFoundSound::SetPowerAndVolume  )  [private]
 

Definition at line 221 of file LostFoundSound.cc.

References speakerID.

Referenced by DoInit().


Member Data Documentation

ODesignDataID LostFoundSound::foundSoundID [private]
 

Definition at line 66 of file LostFoundSound.h.

Referenced by DoDestroy(), and LoadWAV().

WAV LostFoundSound::foundWAV [private]
 

Definition at line 67 of file LostFoundSound.h.

Referenced by LoadWAV().

LostFoundSoundState LostFoundSound::lfsoundState [private]
 

Definition at line 64 of file LostFoundSound.h.

Referenced by DoStart(), DoStop(), NotifyCommand(), and ReadyPlay().

ODesignDataID LostFoundSound::lostSoundID [private]
 

Definition at line 68 of file LostFoundSound.h.

Referenced by DoDestroy(), and LoadWAV().

WAV LostFoundSound::lostWAV [private]
 

Definition at line 69 of file LostFoundSound.h.

Referenced by LoadWAV().

OObserver* LostFoundSound::observer[numOfObserver]
 

Definition at line 38 of file LostFoundSound.h.

Referenced by NotifyCommand().

WAV* LostFoundSound::playingWAV [private]
 

Definition at line 70 of file LostFoundSound.h.

Referenced by CopyWAVTo(), and Play().

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

Definition at line 71 of file LostFoundSound.h.

Referenced by FindFreeRegion(), IsAllRegionFree(), LostFoundSound(), NewSoundVectorData(), and Play().

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

Definition at line 62 of file LostFoundSound.h.

const size_t LostFoundSound::SOUND_UNIT_SIZE = 256 [static, private]
 

Definition at line 61 of file LostFoundSound.h.

Referenced by NewSoundVectorData().

OPrimitiveID LostFoundSound::speakerID [private]
 

Definition at line 65 of file LostFoundSound.h.

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

OSubject* LostFoundSound::subject[numOfSubject]
 

Definition at line 37 of file LostFoundSound.h.

Referenced by NotifyCommand(), Play(), and ReadyPlay().


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