diff --git a/tests/testall.cpp b/tests/testall.cpp index 419f27b..b94ce69 100644 --- a/tests/testall.cpp +++ b/tests/testall.cpp @@ -66,7 +66,7 @@ int sawni( void *outputBuffer, void * /*inputBuffer*/, unsigned int nBufferFrame if ( status ) std::cout << "Stream underflow detected!" << std::endl; - float increment; + double increment; for ( j=0; jframeCounter % data->pulseCount == 0 ) sample = 0.9; + if ( data->frameCounter % data->pulseCount == 0 ) sample = 0.9f; else sample = 0.0; for ( j=0; jchannels; j++ ) *buffer++ = sample; @@ -107,8 +107,8 @@ int main( int argc, char *argv[] ) // Let RtAudio print messages to stderr. adc->showWarnings( true ); - runtime = RUNTIME * 1000; - pausetime = PAUSETIME * 1000; + runtime = static_cast(RUNTIME * 1000); + pausetime = static_cast(PAUSETIME * 1000); // Set our stream parameters for a duplex stream. bufferFrames = 512; @@ -127,7 +127,7 @@ int main( int argc, char *argv[] ) oParams.deviceId = adc->getDefaultOutputDevice(); // First, test external stopStream() calls. - mydata.pulseCount = PULSE_RATE * fs; + mydata.pulseCount = static_cast(PULSE_RATE * fs); mydata.nFrames = 50 * fs; mydata.returnValue = 0; try {