Browse Source

Use "using namespace std" for roundf instead of std::roundf.

tags/5.1.0
Stephen Sinclair 7 years ago
parent
commit
edb4ec67a9
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      RtAudio.cpp

+ 4
- 1
RtAudio.cpp View File

@@ -3883,7 +3883,10 @@ void convertBufferWasapi( char* outBuffer,
float sampleStep = 1.0f / sampleRatio;
float inSampleFraction = 0.0f;

outSampleCount = ( unsigned int ) std::roundf( inSampleCount * sampleRatio );
// for cmath functions
using namespace std;

outSampleCount = ( unsigned int ) 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