1
0
Fork 0

Code at this level shouldn't care if the sound manager is paused or not.

Just forge ahead as if sound is playing, let the sound manger worry about
the details.
This commit is contained in:
curt 2004-05-14 15:49:10 +00:00
parent 410e02ceaf
commit ec8c167a27
3 changed files with 5 additions and 6 deletions

View file

@ -183,8 +183,7 @@ void FGAIPlane::ProcessCallback(int code) {
// The repeating flag indicates whether the message should be repeated continuously or played once. // The repeating flag indicates whether the message should be repeated continuously or played once.
void FGAIPlane::Render(string refname, bool repeating) { void FGAIPlane::Render(string refname, bool repeating) {
#ifdef ENABLE_AUDIO_SUPPORT #ifdef ENABLE_AUDIO_SUPPORT
voice = (voiceOK && fgGetBool("/sim/sound/audible") voice = (voiceOK && fgGetBool("/sim/sound/voice"));
&& fgGetBool("/sim/sound/voice"));
if(voice) { if(voice) {
int len; int len;
unsigned char* buf = vPtr->WriteMessage((char*)pending_transmission.c_str(), len, voice); unsigned char* buf = vPtr->WriteMessage((char*)pending_transmission.c_str(), len, voice);

View file

@ -217,8 +217,7 @@ void FGATC::SetData(ATCData* d) {
// The repeating flag indicates whether the message should be repeated continuously or played once. // The repeating flag indicates whether the message should be repeated continuously or played once.
void FGATC::Render(string msg, string refname, bool repeating) { void FGATC::Render(string msg, string refname, bool repeating) {
#ifdef ENABLE_AUDIO_SUPPORT #ifdef ENABLE_AUDIO_SUPPORT
voice = (voiceOK && fgGetBool("/sim/sound/audible") voice = (voiceOK && fgGetBool("/sim/sound/voice"));
&& fgGetBool("/sim/sound/voice"));
if(voice) { if(voice) {
int len; int len;
unsigned char* buf = vPtr->WriteMessage((char*)msg.c_str(), len, voice); unsigned char* buf = vPtr->WriteMessage((char*)msg.c_str(), len, voice);

View file

@ -117,9 +117,10 @@ void FGATCMgr::init() {
voiceOK = v1->LoadVoice("default"); voiceOK = v1->LoadVoice("default");
voice = true; voice = true;
/* I've loaded the voice even if /sim/sound/audible is false /* I've loaded the voice even if /sim/sound/pause is true
* since I know no way of forcing load of the voice if the user * since I know no way of forcing load of the voice if the user
* subsequently switches /sim/sound/audible to true. */ * subsequently switches /sim/sound/audible to true.
* (which is the right thing to do -- CLO) :-) */
#else #else
voice = false; voice = false;
#endif #endif