mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
use invokeMethod for Audio reset
This commit is contained in:
parent
ab1cd7bd2c
commit
0e3cb11863
2 changed files with 8 additions and 4 deletions
|
@ -4023,14 +4023,18 @@ void Application::resetSensors() {
|
|||
_webcam.reset();
|
||||
_faceshift.reset();
|
||||
LeapManager::reset();
|
||||
OculusManager::reset();
|
||||
|
||||
if (OculusManager::isConnected()) {
|
||||
OculusManager::reset();
|
||||
}
|
||||
|
||||
QCursor::setPos(_headMouseX, _headMouseY);
|
||||
_myAvatar.reset();
|
||||
_myTransmitter.resetLevels();
|
||||
_myAvatar.setVelocity(glm::vec3(0,0,0));
|
||||
_myAvatar.setThrust(glm::vec3(0,0,0));
|
||||
|
||||
_audio.reset();
|
||||
QMetaObject::invokeMethod(&_audio, "reset", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
static void setShortcutsEnabled(QWidget* widget, bool enabled) {
|
||||
|
|
|
@ -39,8 +39,7 @@ class Audio : public QObject {
|
|||
public:
|
||||
// setup for audio I/O
|
||||
Audio(int16_t initialJitterBufferSamples, QObject* parent = 0);
|
||||
|
||||
void reset();
|
||||
|
||||
void render(int screenWidth, int screenHeight);
|
||||
|
||||
void addReceivedAudioToBuffer(unsigned char* receivedData, int receivedBytes);
|
||||
|
@ -67,6 +66,7 @@ public:
|
|||
public slots:
|
||||
void start();
|
||||
void handleAudioInput();
|
||||
void reset();
|
||||
|
||||
private:
|
||||
QAudioInput* _audioInput;
|
||||
|
|
Loading…
Reference in a new issue