//
// $Id$
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <Main/globals.hxx>
#include <sstream>
#include <simgear/compiler.h>
#define VOICE "/sim/sound/voices"
+using std::string;
/// MANAGER ///
_host(fgGetString(VOICE "/host", "localhost")),
_port(fgGetString(VOICE "/port", "1314")),
_enabled(fgGetBool(VOICE "/enabled", false)),
- _pausedNode(fgGetNode("/sim/sound/pause", true))
+ _pausedNode(fgGetNode("/sim/sound/working", true))
{
#if defined(ENABLE_THREADS)
if (!_enabled)
return;
_thread->cancel();
_thread->join();
+ delete _thread;
#endif
}
try {
for (unsigned int i = 0; i < voices.size(); i++)
_voices.push_back(new FGVoice(this, voices[i]));
- } catch (const string& s) {
- SG_LOG(SG_IO, SG_ALERT, "VOICE: " << s);
+ } catch (const std::string& s) {
+ SG_LOG(SG_SOUND, SG_ALERT, "VOICE: " << s);
}
#if defined(ENABLE_THREADS)
if (!_enabled)
return;
- _paused = _pausedNode->getBoolValue();
+ _paused = !_pausedNode->getBoolValue();
for (unsigned int i = 0; i < _voices.size(); i++) {
_voices[i]->update();
#if !defined(ENABLE_THREADS)
_festival(node->getBoolValue("festival", true)),
_mgr(mgr)
{
- SG_LOG(SG_IO, SG_INFO, "VOICE: adding `" << node->getStringValue("desc", "<unnamed>")
+ SG_LOG(SG_SOUND, SG_INFO, "VOICE: adding `" << node->getStringValue("desc", "<unnamed>")
<< "' voice");
const string &host = _mgr->_host;
const string &port = _mgr->_port;
+ "'. Either it's not\n Festival listening,"
" or Festival couldn't open a sound device.";
- SG_LOG(SG_IO, SG_INFO, "VOICE: connection to Festival server on `"
+ SG_LOG(SG_SOUND, SG_INFO, "VOICE: connection to Festival server on `"
<< host << ':' << port << "' established");
setVolume(_volume = _volumeNode->getDoubleValue());