Move VoiceVatlib into its own thread in ContextAudio

refs #183
This commit is contained in:
Roland Winklmeier
2014-04-13 18:50:10 +02:00
committed by Klaus Basan
parent c04e408844
commit 526149f94d
2 changed files with 10 additions and 1 deletions

View File

@@ -28,7 +28,10 @@ namespace BlackCore
m_keyboard(nullptr)
{
// 1. Init by "voice driver"
this->m_voice = new CVoiceVatlib(this);
this->m_voice = new CVoiceVatlib();
m_voice->moveToThread(&m_threadVoice);
m_threadVoice.start();
m_keyboard = IKeyboard::getInstance();
// 2. Signal / slots
@@ -42,6 +45,8 @@ namespace BlackCore
CContextAudio::~CContextAudio()
{
this->leaveAllVoiceRooms();
m_threadVoice.quit();
m_threadVoice.wait(1000);
}
/*