mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 20:22:27 +02:00
apply orientation change to listening position for audio
This commit is contained in:
parent
54660dd1a2
commit
d420674edd
8 changed files with 32 additions and 6 deletions
|
@ -9,7 +9,7 @@
|
|||
<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
|
||||
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation"
|
||||
android:name="org.qtproject.qt5.android.bindings.QtActivity"
|
||||
android:name="${ANDROID_ACTIVITY_NAME}"
|
||||
android:label="@string/AppDisplayName"
|
||||
android:screenOrientation="landscape"
|
||||
android:launchMode="singleTop"
|
||||
|
|
|
@ -19,6 +19,7 @@ set(ANDROID_SDK_ROOT $ENV{ANDROID_HOME})
|
|||
set(ANDROID_APP_DISPLAY_NAME Interface)
|
||||
set(ANDROID_API_LEVEL 19)
|
||||
set(ANDROID_APK_PACKAGE io.highfidelity.gvrinterface)
|
||||
set(ANDROID_ACTIVITY_NAME io.highfidelity.gvrinterface.InterfaceActivity)
|
||||
|
||||
find_package(LibOVR REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} ${LIBOVR_LIBRARIES} ${LIBOVR_ANDROID_LIBRARIES})
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <QtCore/QThread>
|
||||
|
||||
#include <AccountManager.h>
|
||||
#include <AddressManager.h>
|
||||
#include <HifiSockAddr.h>
|
||||
#include <NodeList.h>
|
||||
|
@ -28,6 +29,9 @@ Client::Client(QObject* parent) :
|
|||
}
|
||||
|
||||
void Client::setupNetworking() {
|
||||
// once Application order of instantiation is fixed this should be done from AccountManager
|
||||
AccountManager::getInstance().setAuthURL(DEFAULT_NODE_AUTH_URL);
|
||||
|
||||
// setup the NodeList for this client
|
||||
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
|
||||
auto nodeList = DependencyManager::set<NodeList>(NodeType::Agent, 0);
|
||||
|
|
|
@ -79,7 +79,7 @@ void GVRInterface::idle() {
|
|||
|
||||
auto ovrOrientation = sensor.Predicted.Pose.Orientation;
|
||||
glm::quat newOrientation(ovrOrientation.w, ovrOrientation.x, ovrOrientation.y, ovrOrientation.z);
|
||||
// _client->setOrientation(newOrientation);
|
||||
_client->setOrientation(newOrientation);
|
||||
|
||||
if (counter++ % 100000 == 0) {
|
||||
qDebug() << "GetSensorState in frame" << counter << "-"
|
||||
|
|
|
@ -74,7 +74,6 @@ void RenderingClient::processVerifiedPacket(const HifiSockAddr& senderSockAddr,
|
|||
Qt::QueuedConnection,
|
||||
Q_ARG(QByteArray, incomingPacket));
|
||||
} else {
|
||||
qDebug() << "Processing received audio of" << incomingPacket.size();
|
||||
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), "addReceivedAudioToStream",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG(QByteArray, incomingPacket));
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
//
|
||||
// InterfaceActivity.java
|
||||
// gvr-interface/java
|
||||
//
|
||||
// Created by Stephen Birarda on 1/26/15.
|
||||
// Copyright 2015 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
package io.highfidelity.gvrinterface;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.WindowManager;
|
||||
import org.qtproject.qt5.android.bindings.QtActivity;
|
||||
|
||||
public class InterfaceActivity extends QtActivity {
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
}
|
||||
}
|
|
@ -227,7 +227,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
|||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
Model::setAbstractViewStateInterface(this); // The model class will sometimes need to know view state details from us
|
||||
|
||||
|
||||
// read the ApplicationInfo.ini file for Name/Version/Domain information
|
||||
QSettings applicationInfo(PathUtils::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
|
||||
|
||||
|
|
|
@ -74,8 +74,6 @@ AccountManager::AccountManager() :
|
|||
qRegisterMetaType<JSONCallbackParameters>("JSONCallbackParameters");
|
||||
|
||||
qRegisterMetaType<QHttpMultiPart*>("QHttpMultiPart*");
|
||||
|
||||
setAuthURL(DEFAULT_NODE_AUTH_URL);
|
||||
|
||||
connect(&_accountInfo, &DataServerAccountInfo::balanceChanged, this, &AccountManager::accountInfoBalanceChanged);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue