Use "using namespace std" for roundf in previous patch.
authorStephen Sinclair <radarsat1@gmail.com>
Fri, 6 Oct 2017 19:48:03 +0000 (16:48 -0300)
committerStephen Sinclair <radarsat1@gmail.com>
Fri, 6 Oct 2017 19:48:03 +0000 (16:48 -0300)
Similar to edb4ec67.  The reason is because std::roundf causes errors
in some compilers even with cmath, yet roundf by itself should exist
in math.h.  TODO: Switch to std::round when moving to C++11.

RtAudio.cpp

index b29cae97ba3125ea11643bbd3ea8c433d4941082..b00b80385914e80f93039413e3cf701257216b4d 100644 (file)
@@ -4974,7 +4974,8 @@ void RtApiWasapi::wasapiThread()
   }
 
   if ( stream_.mode == INPUT ) {
-    convBuffSize = ( size_t ) std::roundf( 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 ) {