mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 09:15:34 +08:00
Small fixes in init voice context, found during "merge testing"
This commit is contained in:
@@ -46,8 +46,8 @@ namespace BlackCore
|
|||||||
connect(this->m_voice, &CVoiceVatlib::connectionStatusChanged, this, &CContextAudio::connectionStatusChanged);
|
connect(this->m_voice, &CVoiceVatlib::connectionStatusChanged, this, &CContextAudio::connectionStatusChanged);
|
||||||
if (this->getIContextApplication()) this->connect(this->m_voice, &IVoice::statusMessage, this->getIContextApplication(), &IContextApplication::sendStatusMessage);
|
if (this->getIContextApplication()) this->connect(this->m_voice, &IVoice::statusMessage, this->getIContextApplication(), &IContextApplication::sendStatusMessage);
|
||||||
|
|
||||||
// 5. load sounds (init)
|
// 5. load sounds (init), not possible in own thread
|
||||||
CSoundGenerator::playNotificationSound(0, CNotificationSounds::NotificationsLoadSounds);
|
QTimer::singleShot(10 * 1000, this, SLOT(initNotificationSounds()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -297,6 +297,15 @@ namespace BlackCore
|
|||||||
BlackSound::CSoundGenerator::playNotificationSound(90, notificationSound);
|
BlackSound::CSoundGenerator::playNotificationSound(90, notificationSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Notification
|
||||||
|
*/
|
||||||
|
void CContextAudio::initNotificationSounds()
|
||||||
|
{
|
||||||
|
// not possible in own thread
|
||||||
|
CSoundGenerator::playNotificationSound(0, CNotificationSounds::NotificationsLoadSounds);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mic test.
|
* Mic test.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -118,6 +118,9 @@ namespace BlackCore
|
|||||||
//! \sa IContextAudio::changedVoiceRooms
|
//! \sa IContextAudio::changedVoiceRooms
|
||||||
void connectionStatusChanged(IVoice::ComUnit comUnit, IVoice::ConnectionStatus oldStatus, IVoice::ConnectionStatus newStatus);
|
void connectionStatusChanged(IVoice::ComUnit comUnit, IVoice::ConnectionStatus oldStatus, IVoice::ConnectionStatus newStatus);
|
||||||
|
|
||||||
|
//! Init notification sounds
|
||||||
|
void initNotificationSounds();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Connection in transition
|
//! Connection in transition
|
||||||
bool inTransitionState() const;
|
bool inTransitionState() const;
|
||||||
|
|||||||
@@ -42,12 +42,6 @@ namespace BlackCore
|
|||||||
m_voice->GetInputDevices(onInputHardwareDeviceReceived, this);
|
m_voice->GetInputDevices(onInputHardwareDeviceReceived, this);
|
||||||
m_voice->GetOutputDevices(onOutputHardwareDeviceReceived, this);
|
m_voice->GetOutputDevices(onOutputHardwareDeviceReceived, this);
|
||||||
|
|
||||||
// TODO: read audio device settings here and init with the same devices
|
|
||||||
// If not, settings are there or it is the first run, use the default one
|
|
||||||
// TODO: KB, setting this kind of default device results in an error
|
|
||||||
// setInputDevice(defaultAudioInputDevice());
|
|
||||||
// setOutputDevice(defaultAudioOutputDevice());
|
|
||||||
|
|
||||||
connect(this, &CVoiceVatlib::userJoinedLeft, this, &CVoiceVatlib::onUserJoinedLeft, Qt::QueuedConnection);
|
connect(this, &CVoiceVatlib::userJoinedLeft, this, &CVoiceVatlib::onUserJoinedLeft, Qt::QueuedConnection);
|
||||||
|
|
||||||
this->m_voiceRooms.push_back(CVoiceRoom()); // COM1
|
this->m_voiceRooms.push_back(CVoiceRoom()); // COM1
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ namespace BlackCore
|
|||||||
*/
|
*/
|
||||||
static inline void cleanup(Cvatlib_Voice_Simple *pointer)
|
static inline void cleanup(Cvatlib_Voice_Simple *pointer)
|
||||||
{
|
{
|
||||||
pointer->Destroy();
|
if (pointer) pointer->Destroy();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user