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:
@@ -94,7 +94,7 @@ void RageSoundUtil::ConvertFloatToNativeInt16( const float *pFrom, std::int16_t
|
||||
{
|
||||
for( int i = 0; i < iSamples; ++i )
|
||||
{
|
||||
int iOut = std::lrint( pFrom[i] * 32768.0f );
|
||||
int iOut = static_cast<int>((pFrom[i] * 32768.0f) + 0.5);
|
||||
pTo[i] = clamp( iOut, -32768, 32767 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user