mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:17:58 +02:00
Fake faceshift connection while playing back
This commit is contained in:
parent
3826ed0d69
commit
dda02b5dcf
2 changed files with 9 additions and 3 deletions
|
@ -135,10 +135,10 @@ QByteArray AvatarData::toByteArray() {
|
||||||
// lazily allocate memory for HeadData in case we're not an Avatar instance
|
// lazily allocate memory for HeadData in case we're not an Avatar instance
|
||||||
if (!_headData) {
|
if (!_headData) {
|
||||||
_headData = new HeadData(this);
|
_headData = new HeadData(this);
|
||||||
|
}
|
||||||
if (_forceFaceshiftConnected) {
|
if (_forceFaceshiftConnected) {
|
||||||
_headData->_isFaceshiftConnected = true;
|
_headData->_isFaceshiftConnected = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray avatarDataByteArray;
|
QByteArray avatarDataByteArray;
|
||||||
avatarDataByteArray.resize(MAX_PACKET_SIZE);
|
avatarDataByteArray.resize(MAX_PACKET_SIZE);
|
||||||
|
|
|
@ -229,6 +229,9 @@ void Player::startPlaying() {
|
||||||
_audioThread->start();
|
_audioThread->start();
|
||||||
QMetaObject::invokeMethod(_injector.data(), "injectAudio", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(_injector.data(), "injectAudio", Qt::QueuedConnection);
|
||||||
|
|
||||||
|
// Fake faceshift connection
|
||||||
|
_avatar->setForceFaceshiftConnected(true);
|
||||||
|
|
||||||
_timer.start();
|
_timer.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -253,6 +256,9 @@ void Player::stopPlaying() {
|
||||||
_injector.clear();
|
_injector.clear();
|
||||||
_audioThread = NULL;
|
_audioThread = NULL;
|
||||||
|
|
||||||
|
// Turn off fake faceshift connection
|
||||||
|
_avatar->setForceFaceshiftConnected(false);
|
||||||
|
|
||||||
qDebug() << "Recorder::stopPlaying()";
|
qDebug() << "Recorder::stopPlaying()";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue