diff options
| author | garyscavone <garyscavone@users.noreply.github.com> | 2017-04-24 08:09:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-24 08:09:07 -0400 |
| commit | e786e45107b0f88cd3ab42ad223f94d4dfdb925a (patch) | |
| tree | 220318405cba94b01953d0be80cb4a6a4e8f11d3 /tests/teststops.cpp | |
| parent | 56c85084bc774e37dd2752d1ffac954621810255 (diff) | |
| parent | fc1f79343be5129134921f9e47cab8ef360368e4 (diff) | |
Merge pull request #81 from jossgray/fix-warnings
Fix some warnings in the tests in Visual Studio
Diffstat (limited to 'tests/teststops.cpp')
| -rw-r--r-- | tests/teststops.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/teststops.cpp b/tests/teststops.cpp index e24c064..6159b88 100644 --- a/tests/teststops.cpp +++ b/tests/teststops.cpp @@ -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 {
|
