mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:37:46 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into commandLineParametersForAutotester
This commit is contained in:
commit
e07039266d
13 changed files with 113 additions and 142 deletions
|
@ -301,7 +301,7 @@ bool QmlCommerce::uninstallApp(const QString& itemHref) {
|
||||||
// Read from the file to know what .js script to stop
|
// Read from the file to know what .js script to stop
|
||||||
QFile appFile(_appsPath + "/" + appHref.fileName());
|
QFile appFile(_appsPath + "/" + appHref.fileName());
|
||||||
if (!appFile.open(QIODevice::ReadOnly)) {
|
if (!appFile.open(QIODevice::ReadOnly)) {
|
||||||
qCDebug(commerce) << "Couldn't open local .app.json file for deletion.";
|
qCDebug(commerce) << "Couldn't open local .app.json file for deletion. Cannot continue with app uninstallation. App filename is:" << appHref.fileName();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
QJsonDocument appFileJsonDocument = QJsonDocument::fromJson(appFile.readAll());
|
QJsonDocument appFileJsonDocument = QJsonDocument::fromJson(appFile.readAll());
|
||||||
|
@ -309,15 +309,13 @@ bool QmlCommerce::uninstallApp(const QString& itemHref) {
|
||||||
QString scriptUrl = appFileJsonObject["scriptURL"].toString();
|
QString scriptUrl = appFileJsonObject["scriptURL"].toString();
|
||||||
|
|
||||||
if (!DependencyManager::get<ScriptEngines>()->stopScript(scriptUrl.trimmed(), false)) {
|
if (!DependencyManager::get<ScriptEngines>()->stopScript(scriptUrl.trimmed(), false)) {
|
||||||
qCDebug(commerce) << "Couldn't stop script.";
|
qCWarning(commerce) << "Couldn't stop script during app uninstall. Continuing anyway. ScriptURL is:" << scriptUrl.trimmed();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the .app.json from the filesystem
|
// Delete the .app.json from the filesystem
|
||||||
// remove() closes the file first.
|
// remove() closes the file first.
|
||||||
if (!appFile.remove()) {
|
if (!appFile.remove()) {
|
||||||
qCDebug(commerce) << "Couldn't delete local .app.json file.";
|
qCWarning(commerce) << "Couldn't delete local .app.json file during app uninstall. Continuing anyway. App filename is:" << appHref.fileName();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
emit appUninstalled(itemHref);
|
emit appUninstalled(itemHref);
|
||||||
|
|
|
@ -134,7 +134,7 @@ public:
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Get the names of all the selection lists.
|
* Get the names of all the selection lists.
|
||||||
* @function Selection.getListNames
|
* @function Selection.getListNames
|
||||||
* @return {list[]} An array of names of all the selection lists.
|
* @returns {list[]} An array of names of all the selection lists.
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE QStringList getListNames() const;
|
Q_INVOKABLE QStringList getListNames() const;
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ public:
|
||||||
* Get the list of avatars, entities, and overlays stored in a selection list.
|
* Get the list of avatars, entities, and overlays stored in a selection list.
|
||||||
* @function Selection.getList
|
* @function Selection.getList
|
||||||
* @param {string} listName - The name of the selection list.
|
* @param {string} listName - The name of the selection list.
|
||||||
* @return {Selection.SelectedItemsList} The content of a selection list. If the list name doesn't exist, the function
|
* @returns {Selection.SelectedItemsList} The content of a selection list. If the list name doesn't exist, the function
|
||||||
* returns an empty object with no properties.
|
* returns an empty object with no properties.
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE QVariantMap getSelectedItemsList(const QString& listName) const;
|
Q_INVOKABLE QVariantMap getSelectedItemsList(const QString& listName) const;
|
||||||
|
@ -192,7 +192,7 @@ public:
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Get the names of the highlighted selection lists.
|
* Get the names of the highlighted selection lists.
|
||||||
* @function Selection.getHighlightedListNames
|
* @function Selection.getHighlightedListNames
|
||||||
* @return {string[]} An array of names of the selection list currently highlight enabled.
|
* @returns {string[]} An array of names of the selection list currently highlight enabled.
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE QStringList getHighlightedListNames() const;
|
Q_INVOKABLE QStringList getHighlightedListNames() const;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
static AvatarInputs* INSTANCE{ nullptr };
|
static AvatarInputs* INSTANCE{ nullptr };
|
||||||
|
|
||||||
Setting::Handle<bool> showAudioToolsSetting { QStringList { "AvatarInputs", "showAudioTools" }, false };
|
Setting::Handle<bool> showAudioToolsSetting { QStringList { "AvatarInputs", "showAudioTools" }, true };
|
||||||
|
|
||||||
AvatarInputs* AvatarInputs::getInstance() {
|
AvatarInputs* AvatarInputs::getInstance() {
|
||||||
if (!INSTANCE) {
|
if (!INSTANCE) {
|
||||||
|
|
|
@ -47,45 +47,39 @@ public:
|
||||||
* @property {number} sizeCached - Size in bytes of all cached resources. <em>Read-only.</em>
|
* @property {number} sizeCached - Size in bytes of all cached resources. <em>Read-only.</em>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Functions are copied over from ResourceCache (see ResourceCache.h for reason).
|
// Functions are copied over from ResourceCache (see ResourceCache.h for reason).
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Get the list of all resource URLs.
|
* Get the list of all resource URLs.
|
||||||
* @function AnimationCache.getResourceList
|
* @function AnimationCache.getResourceList
|
||||||
* @return {string[]}
|
* @returns {string[]}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AnimationCache.dirty
|
* @function AnimationCache.dirty
|
||||||
* @returns {Signal}
|
* @returns {Signal}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function AnimationCache.updateTotalSize
|
* @function AnimationCache.updateTotalSize
|
||||||
* @param {number} deltaSize
|
* @param {number} deltaSize
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
* Prefetches a resource.
|
||||||
* @function AnimationCache.prefetch
|
* @function AnimationCache.prefetch
|
||||||
* @param {string} url
|
* @param {string} url - URL of the resource to prefetch.
|
||||||
* @param {object} extra
|
* @param {object} [extra=null]
|
||||||
* @returns {object}
|
* @returns {Resource}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Asynchronously loads a resource from the specified URL and returns it.
|
* Asynchronously loads a resource from the specified URL and returns it.
|
||||||
* @function AnimationCache.getResource
|
* @function AnimationCache.getResource
|
||||||
* @param {string} url - URL of the resource to load.
|
* @param {string} url - URL of the resource to load.
|
||||||
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
|
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
|
||||||
* @param {} [extra=null]
|
* @param {} [extra=null]
|
||||||
* @return {Resource}
|
* @returns {Resource}
|
||||||
*/
|
|
||||||
|
|
||||||
/**jsdoc
|
|
||||||
* Prefetches a resource.
|
|
||||||
* @function AnimationCache.prefetch
|
|
||||||
* @param {string} url - URL of the resource to prefetch.
|
|
||||||
* @return {Resource}
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
// Inline functions to implement audio dynamics processing
|
// Inline functions to implement audio dynamics processing
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
#ifndef MAX
|
#ifndef MAX
|
||||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||||
|
@ -21,7 +21,15 @@
|
||||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER)
|
||||||
|
#define FORCEINLINE __forceinline
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#define FORCEINLINE inline __attribute__((always_inline))
|
||||||
|
#else
|
||||||
|
#define FORCEINLINE inline
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#define MUL64(a,b) __emul((a), (b))
|
#define MUL64(a,b) __emul((a), (b))
|
||||||
#else
|
#else
|
||||||
|
@ -42,14 +50,14 @@
|
||||||
|
|
||||||
#include <xmmintrin.h>
|
#include <xmmintrin.h>
|
||||||
// convert float to int using round-to-nearest
|
// convert float to int using round-to-nearest
|
||||||
static inline int32_t floatToInt(float x) {
|
FORCEINLINE static int32_t floatToInt(float x) {
|
||||||
return _mm_cvt_ss2si(_mm_load_ss(&x));
|
return _mm_cvt_ss2si(_mm_load_ss(&x));
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// convert float to int using round-to-nearest
|
// convert float to int using round-to-nearest
|
||||||
static inline int32_t floatToInt(float x) {
|
FORCEINLINE static int32_t floatToInt(float x) {
|
||||||
x += (x < 0.0f ? -0.5f : 0.5f); // round
|
x += (x < 0.0f ? -0.5f : 0.5f); // round
|
||||||
return (int32_t)x;
|
return (int32_t)x;
|
||||||
}
|
}
|
||||||
|
@ -60,12 +68,12 @@ static const double FIXQ31 = 2147483648.0; // convert float to Q31
|
||||||
static const double DB_TO_LOG2 = 0.16609640474436813; // convert dB to log2
|
static const double DB_TO_LOG2 = 0.16609640474436813; // convert dB to log2
|
||||||
|
|
||||||
// convert dB to amplitude
|
// convert dB to amplitude
|
||||||
static inline double dBToGain(double dB) {
|
FORCEINLINE static double dBToGain(double dB) {
|
||||||
return pow(10.0, dB / 20.0);
|
return pow(10.0, dB / 20.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert milliseconds to first-order time constant
|
// convert milliseconds to first-order time constant
|
||||||
static inline int32_t msToTc(double ms, double sampleRate) {
|
FORCEINLINE static int32_t msToTc(double ms, double sampleRate) {
|
||||||
double tc = exp(-1000.0 / (ms * sampleRate));
|
double tc = exp(-1000.0 / (ms * sampleRate));
|
||||||
return (int32_t)(FIXQ31 * tc); // Q31
|
return (int32_t)(FIXQ31 * tc); // Q31
|
||||||
}
|
}
|
||||||
|
@ -144,16 +152,16 @@ static const int IEEE754_EXPN_BIAS = 127;
|
||||||
// x < 2^(31-LOG2_HEADROOM) returns 0x7fffffff
|
// x < 2^(31-LOG2_HEADROOM) returns 0x7fffffff
|
||||||
// x > 2^LOG2_HEADROOM undefined
|
// x > 2^LOG2_HEADROOM undefined
|
||||||
//
|
//
|
||||||
static inline int32_t peaklog2(float* input) {
|
FORCEINLINE static int32_t peaklog2(float* input) {
|
||||||
|
|
||||||
// float as integer bits
|
// float as integer bits
|
||||||
int32_t u = *(int32_t*)input;
|
uint32_t u = *(uint32_t*)input;
|
||||||
|
|
||||||
// absolute value
|
// absolute value
|
||||||
int32_t peak = u & IEEE754_FABS_MASK;
|
uint32_t peak = u & IEEE754_FABS_MASK;
|
||||||
|
|
||||||
// split into e and x - 1.0
|
// split into e and x - 1.0
|
||||||
int32_t e = IEEE754_EXPN_BIAS - (peak >> IEEE754_MANT_BITS) + LOG2_HEADROOM;
|
int e = IEEE754_EXPN_BIAS - (peak >> IEEE754_MANT_BITS) + LOG2_HEADROOM;
|
||||||
int32_t x = (peak << IEEE754_EXPN_BITS) & 0x7fffffff;
|
int32_t x = (peak << IEEE754_EXPN_BITS) & 0x7fffffff;
|
||||||
|
|
||||||
// saturate
|
// saturate
|
||||||
|
@ -180,19 +188,19 @@ static inline int32_t peaklog2(float* input) {
|
||||||
// x < 2^(31-LOG2_HEADROOM) returns 0x7fffffff
|
// x < 2^(31-LOG2_HEADROOM) returns 0x7fffffff
|
||||||
// x > 2^LOG2_HEADROOM undefined
|
// x > 2^LOG2_HEADROOM undefined
|
||||||
//
|
//
|
||||||
static inline int32_t peaklog2(float* input0, float* input1) {
|
FORCEINLINE static int32_t peaklog2(float* input0, float* input1) {
|
||||||
|
|
||||||
// float as integer bits
|
// float as integer bits
|
||||||
int32_t u0 = *(int32_t*)input0;
|
uint32_t u0 = *(uint32_t*)input0;
|
||||||
int32_t u1 = *(int32_t*)input1;
|
uint32_t u1 = *(uint32_t*)input1;
|
||||||
|
|
||||||
// max absolute value
|
// max absolute value
|
||||||
u0 &= IEEE754_FABS_MASK;
|
u0 &= IEEE754_FABS_MASK;
|
||||||
u1 &= IEEE754_FABS_MASK;
|
u1 &= IEEE754_FABS_MASK;
|
||||||
int32_t peak = MAX(u0, u1);
|
uint32_t peak = MAX(u0, u1);
|
||||||
|
|
||||||
// split into e and x - 1.0
|
// split into e and x - 1.0
|
||||||
int32_t e = IEEE754_EXPN_BIAS - (peak >> IEEE754_MANT_BITS) + LOG2_HEADROOM;
|
int e = IEEE754_EXPN_BIAS - (peak >> IEEE754_MANT_BITS) + LOG2_HEADROOM;
|
||||||
int32_t x = (peak << IEEE754_EXPN_BITS) & 0x7fffffff;
|
int32_t x = (peak << IEEE754_EXPN_BITS) & 0x7fffffff;
|
||||||
|
|
||||||
// saturate
|
// saturate
|
||||||
|
@ -219,23 +227,23 @@ static inline int32_t peaklog2(float* input0, float* input1) {
|
||||||
// x < 2^(31-LOG2_HEADROOM) returns 0x7fffffff
|
// x < 2^(31-LOG2_HEADROOM) returns 0x7fffffff
|
||||||
// x > 2^LOG2_HEADROOM undefined
|
// x > 2^LOG2_HEADROOM undefined
|
||||||
//
|
//
|
||||||
static inline int32_t peaklog2(float* input0, float* input1, float* input2, float* input3) {
|
FORCEINLINE static int32_t peaklog2(float* input0, float* input1, float* input2, float* input3) {
|
||||||
|
|
||||||
// float as integer bits
|
// float as integer bits
|
||||||
int32_t u0 = *(int32_t*)input0;
|
uint32_t u0 = *(uint32_t*)input0;
|
||||||
int32_t u1 = *(int32_t*)input1;
|
uint32_t u1 = *(uint32_t*)input1;
|
||||||
int32_t u2 = *(int32_t*)input2;
|
uint32_t u2 = *(uint32_t*)input2;
|
||||||
int32_t u3 = *(int32_t*)input3;
|
uint32_t u3 = *(uint32_t*)input3;
|
||||||
|
|
||||||
// max absolute value
|
// max absolute value
|
||||||
u0 &= IEEE754_FABS_MASK;
|
u0 &= IEEE754_FABS_MASK;
|
||||||
u1 &= IEEE754_FABS_MASK;
|
u1 &= IEEE754_FABS_MASK;
|
||||||
u2 &= IEEE754_FABS_MASK;
|
u2 &= IEEE754_FABS_MASK;
|
||||||
u3 &= IEEE754_FABS_MASK;
|
u3 &= IEEE754_FABS_MASK;
|
||||||
int32_t peak = MAX(MAX(u0, u1), MAX(u2, u3));
|
uint32_t peak = MAX(MAX(u0, u1), MAX(u2, u3));
|
||||||
|
|
||||||
// split into e and x - 1.0
|
// split into e and x - 1.0
|
||||||
int32_t e = IEEE754_EXPN_BIAS - (peak >> IEEE754_MANT_BITS) + LOG2_HEADROOM;
|
int e = IEEE754_EXPN_BIAS - (peak >> IEEE754_MANT_BITS) + LOG2_HEADROOM;
|
||||||
int32_t x = (peak << IEEE754_EXPN_BITS) & 0x7fffffff;
|
int32_t x = (peak << IEEE754_EXPN_BITS) & 0x7fffffff;
|
||||||
|
|
||||||
// saturate
|
// saturate
|
||||||
|
@ -261,7 +269,7 @@ static inline int32_t peaklog2(float* input0, float* input1, float* input2, floa
|
||||||
// Count Leading Zeros
|
// Count Leading Zeros
|
||||||
// Emulates the CLZ (ARM) and LZCNT (x86) instruction
|
// Emulates the CLZ (ARM) and LZCNT (x86) instruction
|
||||||
//
|
//
|
||||||
static inline int CLZ(uint32_t u) {
|
FORCEINLINE static int CLZ(uint32_t u) {
|
||||||
|
|
||||||
if (u == 0) {
|
if (u == 0) {
|
||||||
return 32;
|
return 32;
|
||||||
|
@ -294,7 +302,7 @@ static inline int CLZ(uint32_t u) {
|
||||||
// Compute -log2(x) for x=[0,1] in Q31, result in Q26
|
// Compute -log2(x) for x=[0,1] in Q31, result in Q26
|
||||||
// x <= 0 returns 0x7fffffff
|
// x <= 0 returns 0x7fffffff
|
||||||
//
|
//
|
||||||
static inline int32_t fixlog2(int32_t x) {
|
FORCEINLINE static int32_t fixlog2(int32_t x) {
|
||||||
|
|
||||||
if (x <= 0) {
|
if (x <= 0) {
|
||||||
return 0x7fffffff;
|
return 0x7fffffff;
|
||||||
|
@ -303,8 +311,7 @@ static inline int32_t fixlog2(int32_t x) {
|
||||||
// split into e and x - 1.0
|
// split into e and x - 1.0
|
||||||
uint32_t u = (uint32_t)x;
|
uint32_t u = (uint32_t)x;
|
||||||
int e = CLZ(u);
|
int e = CLZ(u);
|
||||||
u <<= e; // normalize to [0x80000000, 0xffffffff]
|
x = (u << e) & 0x7fffffff;
|
||||||
x = u & 0x7fffffff; // x - 1.0
|
|
||||||
|
|
||||||
int k = x >> (31 - LOG2_TABBITS);
|
int k = x >> (31 - LOG2_TABBITS);
|
||||||
|
|
||||||
|
@ -324,7 +331,7 @@ static inline int32_t fixlog2(int32_t x) {
|
||||||
// Compute exp2(-x) for x=[0,32] in Q26, result in Q31
|
// Compute exp2(-x) for x=[0,32] in Q26, result in Q31
|
||||||
// x <= 0 returns 0x7fffffff
|
// x <= 0 returns 0x7fffffff
|
||||||
//
|
//
|
||||||
static inline int32_t fixexp2(int32_t x) {
|
FORCEINLINE static int32_t fixexp2(int32_t x) {
|
||||||
|
|
||||||
if (x <= 0) {
|
if (x <= 0) {
|
||||||
return 0x7fffffff;
|
return 0x7fffffff;
|
||||||
|
@ -350,12 +357,12 @@ static inline int32_t fixexp2(int32_t x) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// fast TPDF dither in [-1.0f, 1.0f]
|
// fast TPDF dither in [-1.0f, 1.0f]
|
||||||
static inline float dither() {
|
FORCEINLINE static float dither() {
|
||||||
static uint32_t rz = 0;
|
static uint32_t rz = 0;
|
||||||
rz = rz * 69069 + 1;
|
rz = rz * 69069 + 1;
|
||||||
int32_t r0 = rz & 0xffff;
|
int32_t r0 = rz & 0xffff;
|
||||||
int32_t r1 = rz >> 16;
|
int32_t r1 = rz >> 16;
|
||||||
return (int32_t)(r0 - r1) * (1/65536.0f);
|
return (r0 - r1) * (1/65536.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -13,18 +13,11 @@
|
||||||
#include "AudioReverb.h"
|
#include "AudioReverb.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
inline static int MULHI(int a, int b) {
|
#define MULHI(a,b) ((int32_t)(__emul(a, b) >> 32))
|
||||||
long long c = __emul(a, b);
|
|
||||||
return ((int*)&c)[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
#define MULHI(a,b) ((int32_t)(((int64_t)(a) * (int64_t)(b)) >> 32))
|
||||||
#define MULHI(a,b) (int)(((long long)(a) * (b)) >> 32)
|
#endif
|
||||||
|
|
||||||
#endif // _MSC_VER
|
|
||||||
|
|
||||||
#ifndef MAX
|
#ifndef MAX
|
||||||
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
||||||
|
@ -1954,7 +1947,7 @@ static inline float dither() {
|
||||||
rz = rz * 69069 + 1;
|
rz = rz * 69069 + 1;
|
||||||
int32_t r0 = rz & 0xffff;
|
int32_t r0 = rz & 0xffff;
|
||||||
int32_t r1 = rz >> 16;
|
int32_t r1 = rz >> 16;
|
||||||
return (int32_t)(r0 - r1) * (1/65536.0f);
|
return (r0 - r1) * (1/65536.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert float to int16_t with dither, interleave stereo
|
// convert float to int16_t with dither, interleave stereo
|
||||||
|
|
|
@ -1200,7 +1200,7 @@ static inline float dither() {
|
||||||
rz = rz * 69069 + 1;
|
rz = rz * 69069 + 1;
|
||||||
int32_t r0 = rz & 0xffff;
|
int32_t r0 = rz & 0xffff;
|
||||||
int32_t r1 = rz >> 16;
|
int32_t r1 = rz >> 16;
|
||||||
return (int32_t)(r0 - r1) * (1/65536.0f);
|
return (r0 - r1) * (1/65536.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert float to int16_t with dither, interleave stereo
|
// convert float to int16_t with dither, interleave stereo
|
||||||
|
|
|
@ -41,12 +41,12 @@ public:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// Functions are copied over from ResourceCache (see ResourceCache.h for reason).
|
// Functions are copied over from ResourceCache (see ResourceCache.h for reason).
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Get the list of all resource URLs.
|
* Get the list of all resource URLs.
|
||||||
* @function SoundCache.getResourceList
|
* @function SoundCache.getResourceList
|
||||||
* @return {string[]}
|
* @returns {string[]}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
@ -60,10 +60,11 @@ public:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
* Prefetches a resource.
|
||||||
* @function SoundCache.prefetch
|
* @function SoundCache.prefetch
|
||||||
* @param {string} url
|
* @param {string} url - URL of the resource to prefetch.
|
||||||
* @param {object} extra
|
* @param {object} [extra=null]
|
||||||
* @returns {object}
|
* @returns {Resource}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
@ -72,14 +73,7 @@ public:
|
||||||
* @param {string} url - URL of the resource to load.
|
* @param {string} url - URL of the resource to load.
|
||||||
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
|
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
|
||||||
* @param {} [extra=null]
|
* @param {} [extra=null]
|
||||||
* @return {Resource}
|
* @returns {Resource}
|
||||||
*/
|
|
||||||
|
|
||||||
/**jsdoc
|
|
||||||
* Prefetches a resource.
|
|
||||||
* @function SoundCache.prefetch
|
|
||||||
* @param {string} url - URL of the resource to prefetch.
|
|
||||||
* @return {Resource}
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public slots:
|
||||||
*
|
*
|
||||||
* @function Graphics.getModel
|
* @function Graphics.getModel
|
||||||
* @param {UUID} entityID - The objectID of the model whose meshes are to be retrieved.
|
* @param {UUID} entityID - The objectID of the model whose meshes are to be retrieved.
|
||||||
* @return {Graphics.Model} the resulting Model object
|
* @returns {Graphics.Model} the resulting Model object
|
||||||
*/
|
*/
|
||||||
scriptable::ScriptableModelPointer getModel(QUuid uuid);
|
scriptable::ScriptableModelPointer getModel(QUuid uuid);
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public slots:
|
||||||
*
|
*
|
||||||
* @function Graphics.newMesh
|
* @function Graphics.newMesh
|
||||||
* @param {Graphics.IFSData} ifsMeshData Index-Faced Set (IFS) arrays used to create the new mesh.
|
* @param {Graphics.IFSData} ifsMeshData Index-Faced Set (IFS) arrays used to create the new mesh.
|
||||||
* @return {Graphics.Mesh} the resulting Mesh / Mesh Part object
|
* @returns {Graphics.Mesh} the resulting Mesh / Mesh Part object
|
||||||
*/
|
*/
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @typedef {object} Graphics.IFSData
|
* @typedef {object} Graphics.IFSData
|
||||||
|
|
|
@ -159,7 +159,7 @@ public:
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Get the list of all resource URLs.
|
* Get the list of all resource URLs.
|
||||||
* @function ModelCache.getResourceList
|
* @function ModelCache.getResourceList
|
||||||
* @return {string[]}
|
* @returns {string[]}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
@ -173,10 +173,11 @@ public:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
* Prefetches a resource.
|
||||||
* @function ModelCache.prefetch
|
* @function ModelCache.prefetch
|
||||||
* @param {string} url
|
* @param {string} url - URL of the resource to prefetch.
|
||||||
* @param {object} extra
|
* @param {object} [extra=null]
|
||||||
* @returns {object}
|
* @returns {Resource}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
@ -185,14 +186,7 @@ public:
|
||||||
* @param {string} url - URL of the resource to load.
|
* @param {string} url - URL of the resource to load.
|
||||||
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
|
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
|
||||||
* @param {} [extra=null]
|
* @param {} [extra=null]
|
||||||
* @return {Resource}
|
* @returns {Resource}
|
||||||
*/
|
|
||||||
|
|
||||||
/**jsdoc
|
|
||||||
* Prefetches a resource.
|
|
||||||
* @function ModelCache.prefetch
|
|
||||||
* @param {string} url - URL of the resource to prefetch.
|
|
||||||
* @return {Resource}
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -163,44 +163,38 @@ public:
|
||||||
|
|
||||||
// Functions are copied over from ResourceCache (see ResourceCache.h for reason).
|
// Functions are copied over from ResourceCache (see ResourceCache.h for reason).
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Get the list of all resource URLs.
|
* Get the list of all resource URLs.
|
||||||
* @function TextureCache.getResourceList
|
* @function TextureCache.getResourceList
|
||||||
* @return {string[]}
|
* @returns {string[]}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function TextureCache.dirty
|
* @function TextureCache.dirty
|
||||||
* @returns {Signal}
|
* @returns {Signal}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function TextureCache.updateTotalSize
|
* @function TextureCache.updateTotalSize
|
||||||
* @param {number} deltaSize
|
* @param {number} deltaSize
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function TextureCache.prefetch
|
* Prefetches a resource.
|
||||||
* @param {string} url
|
* @function TextureCache.prefetch
|
||||||
* @param {object} extra
|
* @param {string} url - URL of the resource to prefetch.
|
||||||
* @returns {object}
|
* @param {object} [extra=null]
|
||||||
*/
|
* @returns {Resource}
|
||||||
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Asynchronously loads a resource from the specified URL and returns it.
|
* Asynchronously loads a resource from the specified URL and returns it.
|
||||||
* @function TextureCache.getResource
|
* @function TextureCache.getResource
|
||||||
* @param {string} url - URL of the resource to load.
|
* @param {string} url - URL of the resource to load.
|
||||||
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
|
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
|
||||||
* @param {} [extra=null]
|
* @param {} [extra=null]
|
||||||
* @return {Resource}
|
* @returns {Resource}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**jsdoc
|
|
||||||
* Prefetches a resource.
|
|
||||||
* @function TextureCache.prefetch
|
|
||||||
* @param {string} url - URL of the resource to prefetch.
|
|
||||||
* @return {Resource}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/// Returns the ID of the permutation/normal texture used for Perlin noise shader programs. This texture
|
/// Returns the ID of the permutation/normal texture used for Perlin noise shader programs. This texture
|
||||||
|
@ -249,10 +243,11 @@ signals:
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function TextureCache.prefect
|
* @function TextureCache.prefetch
|
||||||
* @param {string} url
|
* @param {string} url
|
||||||
* @param {number} type
|
* @param {number} type
|
||||||
* @param {number} [maxNumPixels=67108864]
|
* @param {number} [maxNumPixels=67108864]
|
||||||
|
* @returns {Resource}
|
||||||
*/
|
*/
|
||||||
// Overload ResourceCache::prefetch to allow specifying texture type for loads
|
// Overload ResourceCache::prefetch to allow specifying texture type for loads
|
||||||
Q_INVOKABLE ScriptableResource* prefetch(const QUrl& url, int type, int maxNumPixels = ABSOLUTE_MAX_TEXTURE_NUM_PIXELS);
|
Q_INVOKABLE ScriptableResource* prefetch(const QUrl& url, int type, int maxNumPixels = ABSOLUTE_MAX_TEXTURE_NUM_PIXELS);
|
||||||
|
|
|
@ -167,7 +167,7 @@ private:
|
||||||
HifiSockAddr _assignmentServerSocket;
|
HifiSockAddr _assignmentServerSocket;
|
||||||
bool _isShuttingDown { false };
|
bool _isShuttingDown { false };
|
||||||
QTimer _keepAlivePingTimer;
|
QTimer _keepAlivePingTimer;
|
||||||
bool _requestsDomainListData;
|
bool _requestsDomainListData { false };
|
||||||
|
|
||||||
mutable QReadWriteLock _ignoredSetLock;
|
mutable QReadWriteLock _ignoredSetLock;
|
||||||
tbb::concurrent_unordered_set<QUuid, UUIDHasher> _ignoredNodeIDs;
|
tbb::concurrent_unordered_set<QUuid, UUIDHasher> _ignoredNodeIDs;
|
||||||
|
|
|
@ -215,7 +215,7 @@ public:
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Get the list of all resource URLs.
|
* Get the list of all resource URLs.
|
||||||
* @function ResourceCache.getResourceList
|
* @function ResourceCache.getResourceList
|
||||||
* @return {string[]}
|
* @returns {string[]}
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE QVariantList getResourceList();
|
Q_INVOKABLE QVariantList getResourceList();
|
||||||
|
|
||||||
|
@ -257,10 +257,11 @@ protected slots:
|
||||||
void updateTotalSize(const qint64& deltaSize);
|
void updateTotalSize(const qint64& deltaSize);
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
|
* Prefetches a resource.
|
||||||
* @function ResourceCache.prefetch
|
* @function ResourceCache.prefetch
|
||||||
* @param {string} url
|
* @param {string} url - URL of the resource to prefetch.
|
||||||
* @param {object} extra
|
* @param {object} [extra=null]
|
||||||
* @returns {object}
|
* @returns {Resource}
|
||||||
*/
|
*/
|
||||||
// Prefetches a resource to be held by the QScriptEngine.
|
// Prefetches a resource to be held by the QScriptEngine.
|
||||||
// Left as a protected member so subclasses can overload prefetch
|
// Left as a protected member so subclasses can overload prefetch
|
||||||
|
@ -273,7 +274,7 @@ protected slots:
|
||||||
* @param {string} url - URL of the resource to load.
|
* @param {string} url - URL of the resource to load.
|
||||||
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
|
* @param {string} [fallback=""] - Fallback URL if load of the desired URL fails.
|
||||||
* @param {} [extra=null]
|
* @param {} [extra=null]
|
||||||
* @return {Resource}
|
* @returns {Resource}
|
||||||
*/
|
*/
|
||||||
/// Loads a resource from the specified URL and returns it.
|
/// Loads a resource from the specified URL and returns it.
|
||||||
/// If the caller is on a different thread than the ResourceCache,
|
/// If the caller is on a different thread than the ResourceCache,
|
||||||
|
@ -291,12 +292,7 @@ protected:
|
||||||
// Pointers created through this method should be owned by the caller,
|
// Pointers created through this method should be owned by the caller,
|
||||||
// which should be a QScriptEngine with ScriptableResource registered, so that
|
// which should be a QScriptEngine with ScriptableResource registered, so that
|
||||||
// the QScriptEngine will delete the pointer when it is garbage collected.
|
// the QScriptEngine will delete the pointer when it is garbage collected.
|
||||||
/**jsdoc
|
// JSDoc is provided on more general function signature.
|
||||||
* Prefetches a resource.
|
|
||||||
* @function ResourceCache.prefetch
|
|
||||||
* @param {string} url - URL of the resource to prefetch.
|
|
||||||
* @return {Resource}
|
|
||||||
*/
|
|
||||||
Q_INVOKABLE ScriptableResource* prefetch(const QUrl& url) { return prefetch(url, nullptr); }
|
Q_INVOKABLE ScriptableResource* prefetch(const QUrl& url) { return prefetch(url, nullptr); }
|
||||||
|
|
||||||
/// Creates a new resource.
|
/// Creates a new resource.
|
||||||
|
|
Loading…
Reference in a new issue