Skip to content

Commit a559386

Browse files
author
Sam Feeney
committed
Replaced nearly all lrintf calls with lround.
1 parent 8e0a94f commit a559386

36 files changed

+120
-127
lines changed

src/BPMDisplay.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
117117
int MaxBPM = INT_MIN;
118118
for( unsigned i = 0; i < BPMS.size(); ++i )
119119
{
120-
MinBPM = min( MinBPM, (int)lrintf(BPMS[i]) );
121-
MaxBPM = max( MaxBPM, (int)lrintf(BPMS[i]) );
120+
MinBPM = min( MinBPM, static_cast<int>(lround(BPMS[i])));
121+
MaxBPM = max( MaxBPM, static_cast<int>(lround(BPMS[i])));
122122
}
123123
if( MinBPM == MaxBPM )
124124
{

src/BitmapText.cpp

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,17 @@ void BitmapText::BuildChars()
258258
}
259259

260260
/* Ensure that the width is always even. This maintains pixel alignment;
261-
* fX below will always be an integer. */
262-
m_size.x = QuantizeUp( m_size.x, 2.0f );
261+
* fX below will always be an integer. */
262+
263+
/* QuantizeUp is an inefficient function to use if we only care about
264+
multiples of two. - Mina*/
265+
266+
m_size.x = static_cast<int>(1 + (m_size.x / 2)) * 2.f;
263267

264268
m_aVertices.clear();
265269
m_vpFontPageTextures.clear();
266270

267-
if( m_wTextLines.empty() )
271+
if (m_wTextLines.empty())
268272
return;
269273

270274
m_size.y = float(m_pFont->GetHeight() * m_wTextLines.size());
@@ -274,50 +278,50 @@ void BitmapText::BuildChars()
274278
iPadding += m_iVertSpacing;
275279

276280
// There's padding between every line:
277-
m_size.y += iPadding * int(m_wTextLines.size()-1);
281+
m_size.y += iPadding * static_cast<int>(m_wTextLines.size() - 1);
278282

279283
// the top position of the first row of characters
280-
int iY = lrintf(-m_size.y/2.0f);
284+
int iY = lround(-m_size.y / 2);
281285

282-
for( unsigned i=0; i<m_wTextLines.size(); i++ ) // foreach line
286+
for (unsigned i = 0; i<m_wTextLines.size(); i++) // foreach line
283287
{
284288
iY += m_pFont->GetHeight();
285289

286290
wstring sLine = m_wTextLines[i];
287-
if( m_pFont->IsRightToLeft() )
288-
reverse( sLine.begin(), sLine.end() );
291+
if (m_pFont->IsRightToLeft())
292+
reverse(sLine.begin(), sLine.end());
289293
const int iLineWidth = m_iLineWidths[i];
290294

291-
float fX = SCALE( m_fHorizAlign, 0.0f, 1.0f, -m_size.x/2.0f, +m_size.x/2.0f - iLineWidth );
292-
int iX = lrintf( fX );
295+
float fX = SCALE(m_fHorizAlign, 0, 1, -m_size.x / 2, m_size.x / 2 - iLineWidth);
296+
int iX = lround(fX);
293297

294-
for( unsigned j = 0; j < sLine.size(); ++j )
298+
for (unsigned j = 0; j < sLine.size(); ++j)
295299
{
296300
RageSpriteVertex v[4];
297-
const glyph &g = m_pFont->GetGlyph( sLine[j] );
301+
const glyph &g = m_pFont->GetGlyph(sLine[j]);
298302

299303
// Advance the cursor early for RTL(?)
300-
if( m_pFont->IsRightToLeft() )
304+
if (m_pFont->IsRightToLeft())
301305
iX -= g.m_iHadvance;
302306

303307
// set vertex positions
304-
v[0].p = RageVector3( iX+g.m_fHshift, iY+g.m_pPage->m_fVshift, 0 ); // top left
305-
v[1].p = RageVector3( iX+g.m_fHshift, iY+g.m_pPage->m_fVshift+g.m_fHeight, 0 ); // bottom left
306-
v[2].p = RageVector3( iX+g.m_fHshift+g.m_fWidth, iY+g.m_pPage->m_fVshift+g.m_fHeight, 0 ); // bottom right
307-
v[3].p = RageVector3( iX+g.m_fHshift+g.m_fWidth, iY+g.m_pPage->m_fVshift, 0 ); // top right
308+
v[0].p = RageVector3(iX + g.m_fHshift, iY + g.m_pPage->m_fVshift, 0); // top left
309+
v[1].p = RageVector3(iX + g.m_fHshift, iY + g.m_pPage->m_fVshift + g.m_fHeight, 0); // bottom left
310+
v[2].p = RageVector3(iX + g.m_fHshift + g.m_fWidth, iY + g.m_pPage->m_fVshift + g.m_fHeight, 0); // bottom right
311+
v[3].p = RageVector3(iX + g.m_fHshift + g.m_fWidth, iY + g.m_pPage->m_fVshift, 0); // top right
308312

309313
// Advance the cursor.
310-
if( !m_pFont->IsRightToLeft() )
314+
if (!m_pFont->IsRightToLeft())
311315
iX += g.m_iHadvance;
312316

313317
// set texture coordinates
314-
v[0].t = RageVector2( g.m_TexRect.left, g.m_TexRect.top );
315-
v[1].t = RageVector2( g.m_TexRect.left, g.m_TexRect.bottom );
316-
v[2].t = RageVector2( g.m_TexRect.right, g.m_TexRect.bottom );
317-
v[3].t = RageVector2( g.m_TexRect.right, g.m_TexRect.top );
318+
v[0].t = RageVector2(g.m_TexRect.left, g.m_TexRect.top);
319+
v[1].t = RageVector2(g.m_TexRect.left, g.m_TexRect.bottom);
320+
v[2].t = RageVector2(g.m_TexRect.right, g.m_TexRect.bottom);
321+
v[3].t = RageVector2(g.m_TexRect.right, g.m_TexRect.top);
318322

319-
m_aVertices.insert( m_aVertices.end(), &v[0], &v[4] );
320-
m_vpFontPageTextures.push_back( g.GetFontPageTextures() );
323+
m_aVertices.insert(m_aVertices.end(), &v[0], &v[4]);
324+
m_vpFontPageTextures.push_back(g.GetFontPageTextures());
321325
}
322326

323327
// The amount of padding a line needs:
@@ -326,7 +330,7 @@ void BitmapText::BuildChars()
326330

327331
if( m_bUsingDistortion )
328332
{
329-
int iSeed = lrintf( RageTimer::GetTimeSinceStartFast()*500000.0f );
333+
int iSeed = lround( RageTimer::GetTimeSinceStartFast()*500000.0f );
330334
RandomGen rnd( iSeed );
331335
for(unsigned int i= 0; i < m_aVertices.size(); i+=4)
332336
{
@@ -349,8 +353,8 @@ void BitmapText::DrawChars( bool bUseStrokeTexture )
349353
return;
350354

351355
const int iNumGlyphs = m_vpFontPageTextures.size();
352-
int iStartGlyph = lrintf( SCALE( m_pTempState->crop.left, 0.f, 1.f, 0, (float) iNumGlyphs ) );
353-
int iEndGlyph = lrintf( SCALE( m_pTempState->crop.right, 0.f, 1.f, (float) iNumGlyphs, 0 ) );
356+
int iStartGlyph = lround( SCALE( m_pTempState->crop.left, 0, 1, 0, iNumGlyphs ) );
357+
int iEndGlyph = lround( SCALE( m_pTempState->crop.right, 0, 1, iNumGlyphs, 0 ) );
354358
iStartGlyph = clamp( iStartGlyph, 0, iNumGlyphs );
355359
iEndGlyph = clamp( iEndGlyph, 0, iNumGlyphs );
356360

@@ -382,13 +386,13 @@ void BitmapText::DrawChars( bool bUseStrokeTexture )
382386

383387
const float fStartFadeLeftPercent = m_pTempState->crop.left;
384388
const float fStopFadeLeftPercent = m_pTempState->crop.left + FadeSize.left;
385-
const float fLeftFadeStartGlyph = SCALE( fStartFadeLeftPercent, 0.f, 1.f, 0, (float) iNumGlyphs );
386-
const float fLeftFadeStopGlyph = SCALE( fStopFadeLeftPercent, 0.f, 1.f, 0, (float) iNumGlyphs );
389+
const float fLeftFadeStartGlyph = SCALE( fStartFadeLeftPercent, 0, 1, 0, iNumGlyphs );
390+
const float fLeftFadeStopGlyph = SCALE( fStopFadeLeftPercent, 0, 1, 0, iNumGlyphs );
387391

388392
const float fStartFadeRightPercent = 1-(m_pTempState->crop.right + FadeSize.right);
389393
const float fStopFadeRightPercent = 1-(m_pTempState->crop.right);
390-
const float fRightFadeStartGlyph = SCALE( fStartFadeRightPercent, 0.f, 1.f, 0, (float) iNumGlyphs );
391-
const float fRightFadeStopGlyph = SCALE( fStopFadeRightPercent, 0.f, 1.f, 0, (float) iNumGlyphs );
394+
const float fRightFadeStartGlyph = SCALE( fStartFadeRightPercent, 0, 1, 0, iNumGlyphs );
395+
const float fRightFadeStopGlyph = SCALE( fStopFadeRightPercent, 0, 1, 0, iNumGlyphs );
392396

393397
for( int start = iStartGlyph; start < iEndGlyph; ++start )
394398
{
@@ -760,7 +764,7 @@ void BitmapText::DrawPrimitives()
760764
vector<RageVector3> vGlyphJitter;
761765
if( m_bJitter )
762766
{
763-
int iSeed = lrintf( RageTimer::GetTimeSinceStartFast()*8 );
767+
int iSeed = lround( RageTimer::GetTimeSinceStartFast()*8 );
764768
RandomGen rnd( iSeed );
765769

766770
for( unsigned i=0; i<m_aVertices.size(); i+=4 )

src/Font.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void FontPage::Load( const FontPageSettings &cfg )
101101
if( cfg.m_fScaleAllWidthsBy != 1 )
102102
{
103103
for( int i=0; i<m_FontPageTextures.m_pTextureMain->GetNumFrames(); i++ )
104-
aiFrameWidths[i] = lrintf( aiFrameWidths[i] * cfg.m_fScaleAllWidthsBy );
104+
aiFrameWidths[i] = static_cast<int>(std::round(( aiFrameWidths[i] * cfg.m_fScaleAllWidthsBy )));
105105
}
106106

107107
m_iCharToGlyphNo = cfg.CharToGlyphNo;

src/NoteDataUtil.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ NoteType NoteDataUtil::GetSmallestNoteTypeInRange( const NoteData &n, int iStart
3030
FOREACH_ENUM(NoteType, nt)
3131
{
3232
float fBeatSpacing = NoteTypeToBeat( nt );
33-
int iRowSpacing = lrintf( fBeatSpacing * ROWS_PER_BEAT );
33+
int iRowSpacing = lround( fBeatSpacing * ROWS_PER_BEAT );
3434

3535
bool bFoundSmallerNote = false;
3636
// for each index in this measure
@@ -375,7 +375,7 @@ void NoteDataUtil::GetSMNoteDataString( const NoteData &in, RString &sRet )
375375
if( nt == NoteType_Invalid )
376376
iRowSpacing = 1;
377377
else
378-
iRowSpacing = lrintf( NoteTypeToBeat(nt) * ROWS_PER_BEAT );
378+
iRowSpacing = lround( NoteTypeToBeat(nt) * ROWS_PER_BEAT );
379379
// (verify first)
380380
// iRowSpacing = BeatToNoteRow( NoteTypeToBeat(nt) );
381381

@@ -1991,7 +1991,7 @@ void NoteDataUtil::Wide( NoteData &inout, int iStartIndex, int iEndIndex )
19911991
continue; // skip
19921992

19931993
// add a note determinitsitcally
1994-
int iBeat = lrintf( NoteRowToBeat(i) );
1994+
int iBeat = lround( NoteRowToBeat(i) );
19951995
int iTrackOfNote = inout.GetFirstTrackWithTap(i);
19961996
int iTrackToAdd = iTrackOfNote + (iBeat%5)-2; // won't be more than 2 tracks away from the existing note
19971997
CLAMP( iTrackToAdd, 0, inout.GetNumTracks()-1 );
@@ -2783,8 +2783,8 @@ void NoteDataUtil::Scale( NoteData &nd, float fScale )
27832783
for( NoteData::const_iterator iter = nd.begin(t); iter != nd.end(t); ++iter )
27842784
{
27852785
TapNote tn = iter->second;
2786-
int iNewRow = lrintf( fScale * iter->first );
2787-
int iNewDuration = lrintf( fScale * (iter->first + tn.iDuration) );
2786+
int iNewRow = lround( fScale * iter->first );
2787+
int iNewDuration = lround( fScale * (iter->first + tn.iDuration) );
27882788
tn.iDuration = iNewDuration;
27892789
ndOut.SetTapNote( t, iNewRow, tn );
27902790
}
@@ -2800,9 +2800,9 @@ static inline int GetScaledRow( float fScale, int iStartIndex, int iEndIndex, in
28002800
if( iRow < iStartIndex )
28012801
return iRow;
28022802
else if( iRow > iEndIndex )
2803-
return iRow + lrintf( (iEndIndex - iStartIndex) * (fScale - 1) );
2803+
return iRow + lround( (iEndIndex - iStartIndex) * (fScale - 1) );
28042804
else
2805-
return lrintf( (iRow - iStartIndex) * fScale ) + iStartIndex;
2805+
return lround( (iRow - iStartIndex) * fScale ) + iStartIndex;
28062806
}
28072807

28082808
void NoteDataUtil::ScaleRegion( NoteData &nd, float fScale, int iStartIndex, int iEndIndex )

src/NotesWriterDWI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ bool NotesWriterDWI::Write( RString sPath, const Song &out )
360360
ssprintf("The first BPM Segment must be defined at row 0, not %d!", bpms[0]->GetRow()) );
361361
f.PutLine( ssprintf("#FILE:%s;", DwiEscape(out.m_sMusicFile).c_str()) );
362362
f.PutLine( ssprintf("#BPM:%.3f;", static_cast<BPMSegment *>(bpms[0])->GetBPM()) );
363-
f.PutLine( ssprintf("#GAP:%ld;", -lrintf( out.m_SongTiming.m_fBeat0OffsetInSeconds*1000 )) );
363+
f.PutLine( ssprintf("#GAP:%ld;", -lround( out.m_SongTiming.m_fBeat0OffsetInSeconds*1000 )) );
364364
f.PutLine( ssprintf("#SAMPLESTART:%.3f;", out.m_fMusicSampleStartSeconds) );
365365
f.PutLine( ssprintf("#SAMPLELENGTH:%.3f;", out.m_fMusicSampleLengthSeconds) );
366366
if( out.m_sCDTitleFile.size() )

src/OptionRow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,9 +681,9 @@ void OptionRow::GetWidthXY( PlayerNumber pn, int iChoiceOnRow, int &iWidthOut, i
681681
{
682682
const BitmapText &text = GetTextItemForRow( pn, iChoiceOnRow );
683683

684-
iWidthOut = lrintf( text.GetZoomedWidth() );
685-
iXOut = lrintf( text.GetDestX() );
686-
iYOut = lrintf( m_Frame.GetDestY() );
684+
iWidthOut = lround( text.GetZoomedWidth() );
685+
iXOut = lround( text.GetDestX() );
686+
iYOut = lround( m_Frame.GetDestY() );
687687
}
688688

689689
int OptionRow::GetOneSelection( PlayerNumber pn, bool bAllowFail ) const

src/PlayerOptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static void AddPart( vector<RString> &AddTo, float level, RString name )
129129
if( level == 0 )
130130
return;
131131

132-
const RString LevelStr = (level == 1)? RString(""): ssprintf( "%ld%% ", lrintf(level*100) );
132+
const RString LevelStr = (level == 1)? RString(""): ssprintf( "%ld%% ", lround(level*100) );
133133

134134
AddTo.push_back( LevelStr + name );
135135
}

src/PlayerStageStats.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ int PlayerStageStats::GetLessonScoreNeeded() const
342342
fScore += (*steps)->GetRadarValues(PLAYER_1)[RadarCategory_TapsAndHolds];
343343
}
344344

345-
return lrintf( fScore * LESSON_PASS_THRESHOLD );
345+
return lround( fScore * LESSON_PASS_THRESHOLD );
346346
}
347347

348348
void PlayerStageStats::ResetScoreForLesson()

src/RageDisplay.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ void RageDisplay::ProcessStatsOnFlip()
117117
{
118118
float fActualTime = g_LastCheckTimer.GetDeltaTime();
119119
g_iNumChecksSinceLastReset++;
120-
g_iFPS = lrintf( g_iFramesRenderedSinceLastCheck / fActualTime );
120+
g_iFPS = lround( g_iFramesRenderedSinceLastCheck / fActualTime );
121121
g_iCFPS = g_iFramesRenderedSinceLastReset / g_iNumChecksSinceLastReset;
122-
g_iCFPS = lrintf( g_iCFPS / fActualTime );
122+
g_iCFPS = lround( g_iCFPS / fActualTime );
123123
g_iVPF = g_iVertsRenderedSinceLastCheck / g_iFramesRenderedSinceLastCheck;
124124
g_iFramesRenderedSinceLastCheck = g_iVertsRenderedSinceLastCheck = 0;
125125
if( LOG_FPS )

src/RageDisplay_OGL.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,10 +680,10 @@ static void CheckReversePackedPixels()
680680
void SetupExtensions()
681681
{
682682
const float fGLVersion = StringToFloat( (const char *) glGetString(GL_VERSION) );
683-
g_glVersion = lrintf( fGLVersion * 10 );
683+
g_glVersion = lround( fGLVersion * 10 );
684684

685685
const float fGLUVersion = StringToFloat( (const char *) gluGetString(GLU_VERSION) );
686-
g_gluVersion = lrintf( fGLUVersion * 10 );
686+
g_gluVersion = lround( fGLUVersion * 10 );
687687

688688
glewInit();
689689

src/RageSound.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ void RageSound::StartPlaying()
328328
ASSERT( !m_bPlaying );
329329

330330
// Move to the start position.
331-
SetPositionFrames( lrintf(m_Param.m_StartSecond * samplerate()) );
331+
SetPositionFrames( lround(m_Param.m_StartSecond * samplerate()) );
332332

333333
/* If m_StartTime is in the past, then we probably set a start time but took too
334334
* long loading. We don't want that; log it, since it can be unobvious. */

src/RageSoundMixBuffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void RageSoundMixBuffer::read( int16_t *pBuf )
7979
{
8080
float iOut = m_pMixbuf[iPos];
8181
iOut = clamp( iOut, -1.0f, +1.0f );
82-
pBuf[iPos] = lrintf(iOut * 32767);
82+
pBuf[iPos] = lround(iOut * 32767);
8383
}
8484
m_iBufUsed = 0;
8585
}

src/RageSoundPosMap.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void pos_map_queue::Insert( int64_t iSourceFrame, int iFrames, int64_t iDestFram
6161
pos_map_t &last = m_pImpl->m_Queue.back();
6262
if( last.m_iSourceFrame + last.m_iFrames == iSourceFrame &&
6363
last.m_fSourceToDestRatio == fSourceToDestRatio &&
64-
llabs(last.m_iDestFrame + lrintf(last.m_iFrames * last.m_fSourceToDestRatio) - iDestFrame) <= 1 )
64+
llabs(last.m_iDestFrame + lround(last.m_iFrames * last.m_fSourceToDestRatio) - iDestFrame) <= 1 )
6565
{
6666
last.m_iFrames += iFrames;
6767

@@ -83,7 +83,7 @@ void pos_map_queue::Insert( int64_t iSourceFrame, int iFrames, int64_t iDestFram
8383

8484
next.m_iSourceFrame += iDeleteFrames;
8585
next.m_iFrames -= iDeleteFrames;
86-
next.m_iDestFrame += lrintf( iDeleteFrames * next.m_fSourceToDestRatio );
86+
next.m_iDestFrame += lround( iDeleteFrames * next.m_fSourceToDestRatio );
8787

8888
m_pImpl->m_Queue.push_back( next );
8989
}
@@ -146,7 +146,7 @@ int64_t pos_map_queue::Search( int64_t iSourceFrame, bool *bApproximate ) const
146146
/* iSourceFrame lies in this block; it's an exact match. Figure
147147
* out the exact position. */
148148
int iDiff = int(iSourceFrame - pm.m_iSourceFrame);
149-
iDiff = lrintf( iDiff * pm.m_fSourceToDestRatio );
149+
iDiff = lround( iDiff * pm.m_fSourceToDestRatio );
150150
return pm.m_iDestFrame + iDiff;
151151
}
152152

@@ -165,7 +165,7 @@ int64_t pos_map_queue::Search( int64_t iSourceFrame, bool *bApproximate ) const
165165
{
166166
iClosestPositionDist = dist;
167167
pClosestBlock = &pm;
168-
iClosestPosition = pm.m_iDestFrame + lrintf( pm.m_iFrames * pm.m_fSourceToDestRatio );
168+
iClosestPosition = pm.m_iDestFrame + lround( pm.m_iFrames * pm.m_fSourceToDestRatio );
169169
}
170170
}
171171

src/RageSoundReader_Chain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void RageSoundReader_Chain::AddSound( int iIndex, float fOffsetSecs, float fPan
5353

5454
Sound s;
5555
s.iIndex = iIndex;
56-
s.iOffsetMS = lrintf( fOffsetSecs * 1000 );
56+
s.iOffsetMS = lround( fOffsetSecs * 1000 );
5757
s.fPan = fPan;
5858
s.pSound = NULL;
5959
m_aSounds.push_back( s );

src/RageSoundReader_Extend.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ bool RageSoundReader_Extend::SetProperty( const RString &sProperty, float fValue
153153
{
154154
if( sProperty == "StartSecond" )
155155
{
156-
m_iStartFrames = lrintf( fValue * this->GetSampleRate() );
156+
m_iStartFrames = lround( fValue * this->GetSampleRate() );
157157
return true;
158158
}
159159

@@ -162,7 +162,7 @@ bool RageSoundReader_Extend::SetProperty( const RString &sProperty, float fValue
162162
if( fValue == -1 )
163163
m_iLengthFrames = -1;
164164
else
165-
m_iLengthFrames = lrintf( fValue * this->GetSampleRate() );
165+
m_iLengthFrames = lround( fValue * this->GetSampleRate() );
166166
return true;
167167
}
168168

@@ -186,13 +186,13 @@ bool RageSoundReader_Extend::SetProperty( const RString &sProperty, float fValue
186186

187187
if( sProperty == "FadeInSeconds" )
188188
{
189-
m_iFadeInFrames = lrintf( fValue * this->GetSampleRate() );
189+
m_iFadeInFrames = lround( fValue * this->GetSampleRate() );
190190
return true;
191191
}
192192

193193
if( sProperty == "FadeSeconds" || sProperty == "FadeOutSeconds" )
194194
{
195-
m_iFadeOutFrames = lrintf( fValue * this->GetSampleRate() );
195+
m_iFadeOutFrames = lround( fValue * this->GetSampleRate() );
196196
return true;
197197
}
198198

0 commit comments

Comments
 (0)