use AS_CASE rather than "case"
[rtaudio-cdist.git] / RtAudio.cpp
index f72c899835b4283403d02bfaae12e31e057a2bc1..1d235161e79dd26970fa9d671af31801d9918034 100644 (file)
@@ -3883,7 +3883,10 @@ void convertBufferWasapi( char* outBuffer,
   float sampleStep = 1.0f / sampleRatio;
   float inSampleFraction = 0.0f;
 
-  outSampleCount = ( unsigned int ) std::roundf( inSampleCount * sampleRatio );
+  // for cmath functions
+  using namespace std;
+
+  outSampleCount = ( unsigned int ) roundf( inSampleCount * sampleRatio );
 
   // if inSampleRate is a multiple of outSampleRate (or vice versa) there's no need to interpolate
   if ( floor( sampleRatio ) == sampleRatio || floor( sampleRatioInv ) == sampleRatioInv )
@@ -4974,7 +4977,8 @@ void RtApiWasapi::wasapiThread()
   }
 
   if ( stream_.mode == INPUT ) {
-    convBuffSize = ( size_t ) ( stream_.bufferSize * captureSrRatio ) * stream_.nDeviceChannels[INPUT] * formatBytes( stream_.deviceFormat[INPUT] );
+    using namespace std; // for roundf
+    convBuffSize = ( size_t ) roundf( stream_.bufferSize * captureSrRatio ) * stream_.nDeviceChannels[INPUT] * formatBytes( stream_.deviceFormat[INPUT] );
     deviceBuffSize = stream_.bufferSize * stream_.nDeviceChannels[INPUT] * formatBytes( stream_.deviceFormat[INPUT] );
   }
   else if ( stream_.mode == OUTPUT ) {