mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:31:13 +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();
|
_webcam.reset();
|
||||||
_faceshift.reset();
|
_faceshift.reset();
|
||||||
LeapManager::reset();
|
LeapManager::reset();
|
||||||
OculusManager::reset();
|
|
||||||
|
if (OculusManager::isConnected()) {
|
||||||
|
OculusManager::reset();
|
||||||
|
}
|
||||||
|
|
||||||
QCursor::setPos(_headMouseX, _headMouseY);
|
QCursor::setPos(_headMouseX, _headMouseY);
|
||||||
_myAvatar.reset();
|
_myAvatar.reset();
|
||||||
_myTransmitter.resetLevels();
|
_myTransmitter.resetLevels();
|
||||||
_myAvatar.setVelocity(glm::vec3(0,0,0));
|
_myAvatar.setVelocity(glm::vec3(0,0,0));
|
||||||
_myAvatar.setThrust(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) {
|
static void setShortcutsEnabled(QWidget* widget, bool enabled) {
|
||||||
|
|
|
@ -39,8 +39,7 @@ class Audio : public QObject {
|
||||||
public:
|
public:
|
||||||
// setup for audio I/O
|
// setup for audio I/O
|
||||||
Audio(int16_t initialJitterBufferSamples, QObject* parent = 0);
|
Audio(int16_t initialJitterBufferSamples, QObject* parent = 0);
|
||||||
|
|
||||||
void reset();
|
|
||||||
void render(int screenWidth, int screenHeight);
|
void render(int screenWidth, int screenHeight);
|
||||||
|
|
||||||
void addReceivedAudioToBuffer(unsigned char* receivedData, int receivedBytes);
|
void addReceivedAudioToBuffer(unsigned char* receivedData, int receivedBytes);
|
||||||
|
@ -67,6 +66,7 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
void start();
|
void start();
|
||||||
void handleAudioInput();
|
void handleAudioInput();
|
||||||
|
void reset();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QAudioInput* _audioInput;
|
QAudioInput* _audioInput;
|
||||||
|
|
Loading…
Reference in a new issue