From 431cbec734390b8b9b99b5d88d647dd5f7011f1c Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 29 Mar 2013 08:29:43 -0700 Subject: [PATCH] remove some of the explicit floats to hunt down digital noise --- mixer/src/main.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/mixer/src/main.cpp b/mixer/src/main.cpp index 24df2b5c5c..ce0e5c16a0 100644 --- a/mixer/src/main.cpp +++ b/mixer/src/main.cpp @@ -1,4 +1,10 @@ -#ifndef _WIN32 +// +// main.cpp +// mixer +// +// Created by Stephen Birarda on 2/1/13. +// Copyright (c) 2013 High Fidelity, Inc. All rights reserved. +// #include #include @@ -31,7 +37,7 @@ const unsigned short MIXER_LISTEN_PORT = 55443; const float SAMPLE_RATE = 22050.0; const short JITTER_BUFFER_MSECS = 12; -const short JITTER_BUFFER_SAMPLES = JITTER_BUFFER_MSECS * (SAMPLE_RATE / 1000.0f); +const short JITTER_BUFFER_SAMPLES = JITTER_BUFFER_MSECS * (SAMPLE_RATE / 1000.0); const int BUFFER_LENGTH_BYTES = 1024; const int BUFFER_LENGTH_SAMPLES_PER_CHANNEL = (BUFFER_LENGTH_BYTES / 2) / sizeof(int16_t); @@ -44,8 +50,8 @@ const float BUFFER_SEND_INTERVAL_USECS = (BUFFER_LENGTH_SAMPLES_PER_CHANNEL / SA const long MAX_SAMPLE_VALUE = std::numeric_limits::max(); const long MIN_SAMPLE_VALUE = std::numeric_limits::min(); -const float DISTANCE_RATIO = 3.0f/4.2f; -const float PHASE_AMPLITUDE_RATIO_AT_90 = 0.5f; +const float DISTANCE_RATIO = 3.0/4.2; +const float PHASE_AMPLITUDE_RATIO_AT_90 = 0.5; const int PHASE_DELAY_AT_90 = 20; @@ -302,12 +308,3 @@ int main(int argc, const char * argv[]) return 0; } - -#else - -int main(int argc, const char * argv[]) -{ - return 0; -} - -#endif _WIN32