Fake faceshift connection while playing back

This commit is contained in:
Atlante45 2014-08-26 15:39:57 -07:00
parent 3826ed0d69
commit dda02b5dcf
2 changed files with 9 additions and 3 deletions

View file

@ -135,9 +135,9 @@ 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) { }
_headData->_isFaceshiftConnected = true; if (_forceFaceshiftConnected) {
} _headData->_isFaceshiftConnected = true;
} }
QByteArray avatarDataByteArray; QByteArray avatarDataByteArray;

View file

@ -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()";
} }