#include <Main/fg_props.hxx>
#if defined(ENABLE_THREADS)
-# include <simgear/threads/SGThread.hxx>
+# include <OpenThreads/Thread>
+# include <OpenThreads/Mutex>
+# include <OpenThreads/ScopedLock>
+# include <OpenThreads/Condition>
# include <simgear/threads/SGQueue.hxx>
#else
# include <queue>
- SG_USING_STD(queue);
#endif // ENABLE_THREADS
-SG_USING_STD(vector);
+using std::vector;
FGVoiceThread *_thread;
#endif
- string _host;
- string _port;
+ std::string _host;
+ std::string _port;
bool _enabled;
SGPropertyNode_ptr _pausedNode;
bool _paused;
- vector<FGVoice *> _voices;
+ std::vector<FGVoice *> _voices;
};
#if defined(ENABLE_THREADS)
-class FGVoiceMgr::FGVoiceThread : public SGThread {
+class FGVoiceMgr::FGVoiceThread : public OpenThreads::Thread {
public:
FGVoiceThread(FGVoiceMgr *mgr) : _mgr(mgr) {}
void run();
void wake_up() { _jobs.signal(); }
private:
- void wait_for_jobs() { SGGuard<SGMutex> g(_mutex); _jobs.wait(_mutex); }
- SGPthreadCond _jobs;
- SGMutex _mutex;
+ void wait_for_jobs() { OpenThreads::ScopedLock<OpenThreads::Mutex> g(_mutex); _jobs.wait(&_mutex); }
+ OpenThreads::Condition _jobs;
+ OpenThreads::Mutex _mutex;
FGVoiceMgr *_mgr;
};
#endif
void setVolume(double);
void setPitch(double);
void setSpeed(double);
- void pushMessage(string);
+ void pushMessage(std::string);
private:
class FGVoiceListener;
FGVoiceMgr *_mgr;
#if defined(ENABLE_THREADS)
- SGLockedQueue<string> _msg;
+ SGLockedQueue<std::string> _msg;
#else
- queue<string> _msg;
+ std::queue<std::string> _msg;
#endif
};