Browse Source

Merge pull request #81 from jossgray/fix-warnings

Fix some warnings in the tests in Visual Studio
tags/5.0.0
garyscavone GitHub 8 years ago
parent
commit
e786e45107
2 changed files with 5 additions and 5 deletions
  1. +1
    -1
      tests/testall.cpp
  2. +4
    -4
      tests/teststops.cpp

+ 1
- 1
tests/testall.cpp View File

@@ -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; j<channels; j++ ) {
increment = BASE_RATE * (j+1+(j*0.1));
for ( i=0; i<nBufferFrames; i++ ) {


+ 4
- 4
tests/teststops.cpp View File

@@ -63,7 +63,7 @@ int pulse( void *outputBuffer, void * /*inputBuffer*/, unsigned int nBufferFrame
if ( status ) std::cout << "Stream over/underflow detected!" << std::endl;
for ( i=0; i<nBufferFrames; i++ ) {
if ( data->frameCounter % data->pulseCount == 0 ) sample = 0.9;
if ( data->frameCounter % data->pulseCount == 0 ) sample = 0.9f;
else sample = 0.0;
for ( j=0; j<data->channels; 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<unsigned int>(RUNTIME * 1000);
pausetime = static_cast<unsigned int>(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<unsigned int>(PULSE_RATE * fs);
mydata.nFrames = 50 * fs;
mydata.returnValue = 0;
try {


Loading…
Cancel
Save