Replace lrint(x) with static_cast(x+0.5)
Update 9 files Update RageSoundReader_Extend.cpp Update RageSoundReader_Preload.cpp Update RageSoundUtil.cpp Update RageSoundReader_ThreadedBuffer.cpp Update RageSoundReader_SpeedChange.cpp Update RageSoundReader_Resample_Good.cpp Update RageSoundReader_Merge.cpp Update RageSoundReader_Chain.cpp Update RageSoundMixBuffer.cpp
This commit is contained in:
@@ -82,7 +82,7 @@ void RageSoundMixBuffer::read( std::int16_t *pBuf )
|
||||
{
|
||||
float iOut = m_pMixbuf[iPos];
|
||||
iOut = clamp( iOut, -1.0f, +1.0f );
|
||||
pBuf[iPos] = std::lrint(iOut * 32767);
|
||||
pBuf[iPos] = static_cast<int>((iOut * 32767) + 0.5);
|
||||
}
|
||||
m_iBufUsed = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user