diff --git a/RtAudio.cpp b/RtAudio.cpp index ddb423a..1d23516 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -4977,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 ) {