Festival: Fix volume/pitch/speed after preamble
Fix from Antonello: when we send a premable to Festival, we need to set the parameters afterwards. Re-order the code so this occurs automatically.
This commit is contained in:
parent
a9323432d0
commit
06bd0708b9
1 changed files with 11 additions and 8 deletions
|
@ -171,16 +171,19 @@ FGFestivalVoice::FGFestivalVoice(FGVoiceMgr *mgr, const SGPropertyNode_ptr node)
|
|||
|
||||
SG_LOG(SG_SOUND, SG_INFO, "VOICE: connection to Festival server on `"
|
||||
<< host << ':' << port << "' established");
|
||||
|
||||
setVolume(_volume = _volumeNode->getDoubleValue());
|
||||
setPitch(_pitch = _pitchNode->getDoubleValue());
|
||||
setSpeed(_speed = _speedNode->getDoubleValue());
|
||||
}
|
||||
|
||||
string preamble = node->getStringValue("preamble", "");
|
||||
if (!preamble.empty())
|
||||
pushMessage(preamble);
|
||||
node->getNode("text", true)->addChangeListener(this);
|
||||
const string preamble = node->getStringValue("preamble", "");
|
||||
if (!preamble.empty()) {
|
||||
pushMessage(preamble);
|
||||
}
|
||||
|
||||
// set these after sending any preamble, since it may reset them
|
||||
setVolume(_volume = _volumeNode->getDoubleValue());
|
||||
setPitch(_pitch = _pitchNode->getDoubleValue());
|
||||
setSpeed(_speed = _speedNode->getDoubleValue());
|
||||
|
||||
node->getNode("text", true)->addChangeListener(this);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue