refs #320 Porting voice channels to new API

This commit is contained in:
Roland Winklmeier
2014-12-25 20:50:15 +01:00
parent 7dc67a89c7
commit 3126067d31
12 changed files with 210 additions and 498 deletions

View File

@@ -8,6 +8,7 @@
#include "context_ownaircraft.h"
#include "context_application.h"
#include "voice_channel.h"
#include "voice_vatlib.h"
#include "blacksound/soundgenerator.h"
#include "blackmisc/notificationsounds.h"
@@ -38,14 +39,14 @@ namespace BlackCore
// 2. Register PTT hotkey function
m_inputManager = CInputManager::getInstance();
m_handlePtt = m_inputManager->registerHotkeyFunc(CHotkeyFunction::Ptt(), voice, &CVoiceVatlib::handlePushToTalk);
m_channelCom1 = m_voice->getVoiceChannel(0);
m_channelCom1 = m_voice->createVoiceChannel();
m_channelCom1->setMyAircraftCallsign(getIContextOwnAircraft()->getOwnAircraft().getCallsign());
connect(m_channelCom1.data(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::ps_com1ConnectionStatusChanged);
m_channelCom2 = m_voice->getVoiceChannel(1);
connect(m_channelCom1.get(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::ps_com1ConnectionStatusChanged);
m_channelCom2 = m_voice->createVoiceChannel();
m_channelCom2->setMyAircraftCallsign(getIContextOwnAircraft()->getOwnAircraft().getCallsign());
connect(m_channelCom2.data(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::ps_com2ConnectionStatusChanged);
connect(m_channelCom2.get(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::ps_com2ConnectionStatusChanged);
m_voiceInputDevice = m_voice->createInputDevice();
m_voiceOutputDevice = m_voice->createOutputDevice();