mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
some more minor optimizations introduced by aavindraa, i only corrected evaluation order using some ().
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5883 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -284,7 +284,7 @@ unsigned int Callback_GetStreaming(short* _pDestBuffer, unsigned int _numSamples
|
||||
|
||||
if (g_AISampleRate == 48000 && _sampleRate == 32000)
|
||||
{
|
||||
_dbg_assert_msg_(AUDIO_INTERFACE, !(_numSamples % 2), "Number of Samples: %i must be even!", _numSamples);
|
||||
_dbg_assert_msg_(AUDIO_INTERFACE, !(_numSamples & 1), "Number of Samples: %i must be even!", _numSamples);
|
||||
_numSamples = _numSamples * 3 / 2;
|
||||
}
|
||||
else if (g_AISampleRate == 32000 && _sampleRate == 48000)
|
||||
|
@ -173,7 +173,7 @@ void Read8(u8& _uReturnValue, const u32 _iAddress)
|
||||
// but the hardware accepts it. Action Replay uses this.
|
||||
u16 val = 0;
|
||||
|
||||
if (_iAddress % 2 == 0)
|
||||
if ((_iAddress & 1) == 0)
|
||||
{
|
||||
Read16(val, _iAddress);
|
||||
_uReturnValue = (u8)(val >> 8);
|
||||
|
@ -293,7 +293,7 @@ void IndexGenerator::AddLineList(int numVerts)
|
||||
*Lptr++ = index+i*2;
|
||||
*Lptr++ = index+i*2+1;
|
||||
}
|
||||
if(numVerts%2 != 0)
|
||||
if((numVerts & 1) != 0)
|
||||
{
|
||||
//use line strip for remaining vert
|
||||
*Lptr++ = index + numLines * 2 - 1;
|
||||
|
Reference in New Issue
Block a user