mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 05:27:07 +02:00
use floor since round is missing on windows
This commit is contained in:
parent
bd6c42a685
commit
54d73d4a64
2 changed files with 2 additions and 8 deletions
|
@ -40,7 +40,7 @@ Agent::~Agent() {
|
|||
delete _avatarAudioStream;
|
||||
}
|
||||
|
||||
const int SCRIPT_AUDIO_BUFFER_SAMPLES = (SCRIPT_DATA_CALLBACK_USECS * SAMPLE_RATE) / (1000 * 1000);
|
||||
const int SCRIPT_AUDIO_BUFFER_SAMPLES = floor(((SCRIPT_DATA_CALLBACK_USECS * SAMPLE_RATE) / (1000 * 1000)) + 0.5);
|
||||
|
||||
void Agent::setSendAvatarAudioStream(bool sendAvatarAudioStream) {
|
||||
if (sendAvatarAudioStream) {
|
||||
|
|
|
@ -28,13 +28,7 @@ class ParticlesScriptingInterface;
|
|||
|
||||
const QString NO_SCRIPT("");
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
inline double roundf(double value) {
|
||||
return (value > 0.0) ? floor(value + 0.5) : ceil(value - 0.5);
|
||||
}
|
||||
#endif
|
||||
|
||||
const unsigned int SCRIPT_DATA_CALLBACK_USECS = roundf((1.0 / 60.0) * 1000 * 1000);
|
||||
const unsigned int SCRIPT_DATA_CALLBACK_USECS = floor(((1.0 / 60.0f) * 1000 * 1000) + 0.5);
|
||||
|
||||
class ScriptEngine : public QObject {
|
||||
Q_OBJECT
|
||||
|
|
Loading…
Reference in a new issue