From c3a34072169f06936a335715f735869e0363b025 Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Fri, 6 Oct 2017 16:48:03 -0300 Subject: [PATCH] Use "using namespace std" for roundf in previous patch. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RtAudio.cpp b/RtAudio.cpp index b29cae9..b00b803 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -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 ) { -- 2.30.2