Browse Source

Add cmath include.

Closes #39
tags/5.0.0
Stephen Sinclair 7 years ago
parent
commit
3a3f183a0b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      RtAudio.cpp

+ 2
- 1
RtAudio.cpp View File

@@ -45,6 +45,7 @@
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cmath>
#include <algorithm>
// Static variable definitions.
@@ -3875,7 +3876,7 @@ void convertBufferWasapi( char* outBuffer,
float sampleStep = 1.0f / sampleRatio;
float inSampleFraction = 0.0f;
outSampleCount = ( unsigned int ) roundf( inSampleCount * sampleRatio );
outSampleCount = ( unsigned int ) std::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 )


Loading…
Cancel
Save