Inherits SpeechInterface.
Public Member Functions | |
| SpeechManager () | |
| virtual | ~SpeechManager () |
| virtual Bool | init (void) |
| Initlaizes the speech system. | |
| virtual void | deinit (void) |
| De-initlaizes the speech system. | |
| virtual void | update (void) |
| Services speech tasks. Called by AudioInterface. | |
| virtual void | reset (void) |
| Resets the speech system. | |
| virtual void | loseFocus (void) |
| Called when application loses focus. | |
| virtual void | regainFocus (void) |
| Called when application regains focus. | |
| virtual Int | numSpeeches (void) |
| Returns the number of speechs defined. | |
| virtual SpeechInfo * | getSpeechInfo (Speech *speech) |
| Returns speech info by speech. | |
| virtual Int | getSpeechIndex (Speech *speech) |
| Returns speech index. | |
| virtual ID | getSpeechID (Speech *speech) |
| Returns speech ID. | |
| virtual Speech * | getSpeech (Int index) |
| Converts index to speech. | |
| virtual Speech * | getSpeech (ID id) |
| Converts is to speech. | |
| virtual Speech * | getSpeech (const Char *speech_name) |
| Converts speech name to speech. | |
| virtual const Char * | getSpeechName (Speech *speech) |
| Converts speech to speech name. | |
| virtual void | fadeIn (void) |
| Fade all speech in. | |
| virtual void | fadeOut (void) |
| Fade all speech out. | |
| virtual void | fade (Real fade_value) |
| Fade all speech by a specified amout (1.0 .. 0.0 ) | |
| virtual Bool | isFading (void) |
| Returns whether or not any speech is in the process of a fade. | |
| virtual void | waitForFade (void) |
| Returns when all fading has finished. | |
| virtual void | setVolume (Real new_volume) |
| Set new volume level for all speech 1.0 (loudest) 0.0 (silent) | |
| virtual Real | getVolume (void) |
| Return current volume level for all speech. | |
| virtual SpeakerInterface * | createSpeaker (Char *name, Int priority, Int buffer_time, Int delay) |
| Speaker factory. | |
| virtual Speech * | addNewSpeech (SpeechInfo *pSpeechToAdd) |
| Create a speech specified by pSpeechToAdd. | |
| virtual Speech * | addTemporaryDialog (Speech &temporarySpeech) |
| Speech to be taken over by. | |
| virtual void | stop (void) |
| Stops all speech that's currently playing. | |
| virtual void | pause (void) |
| Pauses all speech. | |
| virtual void | resume (void) |
| Resumes all paused speech. | |
| virtual void | turnOff (void) |
| Turns off all speech. No more speech will play. | |
| virtual void | turnOn (void) |
| Turns speech on. | |
| virtual Bool | waitToStop (Int milliseconds) |
| Returns when all speech has completely stopped playing. | |
| virtual Bool | say (Speech *pSpeechToSay) |
| Attempts to add a speech to the speach queue. | |
| virtual Bool | say (AsciiString speechName) |
| Attempts to find and add a speech to the speech queue. | |
| virtual Bool | isOn (void) |
| Returns whether or not speech is turned on at present. | |
| virtual struct AudioAttribs * | getMasterAttribs (void) |
| Returns the master attribute control for all speech. | |
| virtual struct AudioAttribs * | getMasterFadeAttribs (void) |
| Returns the master fade control for all speech. | |
| virtual void | addDialogEvent (const AudioEventRTS *eventRTS, Speech *speech, AudioEventRTS *returnEvent) |
| Add an event. speech can be NULL. | |
| virtual void | removeDialogEvent (const AudioEventRTS *eventRTS, AudioEventRTS *eventToUse) |
| remove an event, eventToUse shouldn't be NULL. | |
| void | removeSpeaker (Speaker *speaker) |
| void | addSpeaker (Speaker *speaker) |
| virtual AsciiString | getFilenameForPlayFromAudioEvent (const AudioEventRTS *eventToGetFrom) |
Protected Member Functions | |
| AsciiString | getFilenameForPlay (Speech *speech) |
| Return the filename corresponding to this speech. | |
Protected Attributes | |
| struct AudioAttribs * | m_masterAttribs |
| Attribs for all speech. | |
| struct AudioAttribs * | m_masterFadeAttribs |
| Fade attribs for all speech. | |
| Real | m_volume |
| Current speech volume. | |
| Bool | m_on |
| Is speech turned on? | |
| Int | m_count |
| Number of speeches in the table. | |
| struct AudioDeviceTag * | m_device |
| The audio device we were initilaized with. | |
| LList | m_speakers |
| list of speakers created by this manager | |
| HashSpeech | m_speech |
| This is a hash table of all speeches we currently have loaded. | |
| VecAsciiString | m_speechNames |
| The purpose of this is to return to someone asking for the name of some element. | |
| VecSpeech | m_temporarySpeeches |
| This is a vector of speeches that are like something in the hash, but differ by priority. | |
Actual implementation od SpeechInterface
Definition at line 212 of file GameSpeech.cpp.
| SpeechManager::SpeechManager | ( | ) |
Definition at line 355 of file GameSpeech.cpp.
|
virtual |
Definition at line 379 of file GameSpeech.cpp.
|
virtual |
Add an event. speech can be NULL.
Definition at line 913 of file GameSpeech.cpp.
|
virtual |
Create a speech specified by pSpeechToAdd.
Definition at line 860 of file GameSpeech.cpp.
| void SpeechManager::addSpeaker | ( | Speaker * | speaker | ) |
Definition at line 833 of file GameSpeech.cpp.
Speech to be taken over by.
Definition at line 884 of file GameSpeech.cpp.
|
virtual |
Speaker factory.
Definition at line 844 of file GameSpeech.cpp.
|
virtual |
De-initlaizes the speech system.
Definition at line 421 of file GameSpeech.cpp.
|
virtual |
Fade all speech by a specified amout (1.0 .. 0.0 )
Definition at line 626 of file GameSpeech.cpp.
|
virtual |
Fade all speech in.
Definition at line 602 of file GameSpeech.cpp.
|
virtual |
Fade all speech out.
Definition at line 614 of file GameSpeech.cpp.
|
protected |
Return the filename corresponding to this speech.
Definition at line 1024 of file GameSpeech.cpp.
|
virtual |
Definition at line 1007 of file GameSpeech.cpp.
|
virtual |
Returns the master attribute control for all speech.
Definition at line 895 of file GameSpeech.cpp.
|
virtual |
Returns the master fade control for all speech.
Definition at line 904 of file GameSpeech.cpp.
Converts speech name to speech.
Definition at line 544 of file GameSpeech.cpp.
|
virtual |
Converts is to speech.
Definition at line 557 of file GameSpeech.cpp.
|
virtual |
Returns speech ID.
Definition at line 530 of file GameSpeech.cpp.
Returns speech index.
Definition at line 516 of file GameSpeech.cpp.
|
virtual |
Returns speech info by speech.
Definition at line 502 of file GameSpeech.cpp.
Converts speech to speech name.
Definition at line 589 of file GameSpeech.cpp.
|
virtual |
Return current volume level for all speech.
Definition at line 674 of file GameSpeech.cpp.
|
virtual |
Initlaizes the speech system.
Definition at line 392 of file GameSpeech.cpp.
|
virtual |
Returns whether or not any speech is in the process of a fade.
Definition at line 638 of file GameSpeech.cpp.
|
virtual |
Returns whether or not speech is turned on at present.
Definition at line 809 of file GameSpeech.cpp.
|
virtual |
Called when application loses focus.
Definition at line 475 of file GameSpeech.cpp.
|
virtual |
Returns the number of speechs defined.
Definition at line 493 of file GameSpeech.cpp.
|
virtual |
Pauses all speech.
Definition at line 700 of file GameSpeech.cpp.
|
virtual |
Called when application regains focus.
Definition at line 484 of file GameSpeech.cpp.
|
virtual |
remove an event, eventToUse shouldn't be NULL.
Definition at line 967 of file GameSpeech.cpp.
| void SpeechManager::removeSpeaker | ( | Speaker * | speaker | ) |
Definition at line 818 of file GameSpeech.cpp.
|
virtual |
Resets the speech system.
Definition at line 467 of file GameSpeech.cpp.
|
virtual |
Resumes all paused speech.
Definition at line 721 of file GameSpeech.cpp.
|
virtual |
Attempts to find and add a speech to the speech queue.
Definition at line 794 of file GameSpeech.cpp.
Attempts to add a speech to the speach queue.
Definition at line 770 of file GameSpeech.cpp.
|
virtual |
Set new volume level for all speech 1.0 (loudest) 0.0 (silent)
Definition at line 660 of file GameSpeech.cpp.
|
virtual |
Stops all speech that's currently playing.
Definition at line 679 of file GameSpeech.cpp.
|
virtual |
Turns off all speech. No more speech will play.
Definition at line 742 of file GameSpeech.cpp.
|
virtual |
Turns speech on.
Definition at line 752 of file GameSpeech.cpp.
|
virtual |
Services speech tasks. Called by AudioInterface.
Definition at line 445 of file GameSpeech.cpp.
|
virtual |
Returns when all fading has finished.
Definition at line 651 of file GameSpeech.cpp.
Returns when all speech has completely stopped playing.
Definition at line 760 of file GameSpeech.cpp.
|
protected |
Number of speeches in the table.
Definition at line 221 of file GameSpeech.cpp.
|
protected |
The audio device we were initilaized with.
Definition at line 223 of file GameSpeech.cpp.
|
protected |
Attribs for all speech.
Definition at line 217 of file GameSpeech.cpp.
|
protected |
Fade attribs for all speech.
Definition at line 218 of file GameSpeech.cpp.
|
protected |
Is speech turned on?
Definition at line 220 of file GameSpeech.cpp.
|
protected |
list of speakers created by this manager
Definition at line 225 of file GameSpeech.cpp.
|
protected |
This is a hash table of all speeches we currently have loaded.
Definition at line 226 of file GameSpeech.cpp.
|
protected |
The purpose of this is to return to someone asking for the name of some element.
Definition at line 227 of file GameSpeech.cpp.
|
protected |
This is a vector of speeches that are like something in the hash, but differ by priority.
Definition at line 228 of file GameSpeech.cpp.
|
protected |
Current speech volume.
Definition at line 219 of file GameSpeech.cpp.