diff options
| author | rehans <rene@hansen-audio.de> | 2017-09-05 16:12:58 +0200 |
|---|---|---|
| committer | rehans <rene@hansen-audio.de> | 2017-09-05 16:12:58 +0200 |
| commit | 77bc4543d84686e768522ab803e03a99cc104326 (patch) | |
| tree | 82fe6bf71acee8dac4e016b64de86d3c6b42ea5c /RtAudio.cpp | |
| parent | 802179520e2d464f87389e34699510927a4a0ab3 (diff) | |
Round floats by using roundf in order to round correctly.
Diffstat (limited to 'RtAudio.cpp')
| -rw-r--r-- | RtAudio.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp index f72c899..b29cae9 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -4974,7 +4974,7 @@ void RtApiWasapi::wasapiThread() } if ( stream_.mode == INPUT ) { - convBuffSize = ( size_t ) ( stream_.bufferSize * captureSrRatio ) * stream_.nDeviceChannels[INPUT] * formatBytes( stream_.deviceFormat[INPUT] ); + convBuffSize = ( size_t ) std::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 ) { |
