mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Assorted warning fixes, small mixer improvement when both DTK and HLE audio are used
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1100 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -442,7 +442,7 @@ void CUCode_AX::MixAdd(short* _pBuffer, int _iSize)
|
||||
} // end of the _iSize loop
|
||||
// ============
|
||||
|
||||
if(gVolume) // allow us to turn this off in the debugger
|
||||
if (gVolume) // allow us to turn this off in the debugger
|
||||
{
|
||||
pb.mixer.volume_left = ADPCM_Vol(pb.mixer.volume_left, pb.mixer.unknown, pb.mixer_control);
|
||||
pb.mixer.volume_right = ADPCM_Vol(pb.mixer.volume_right, pb.mixer.unknown2, pb.mixer_control);
|
||||
@ -457,21 +457,21 @@ void CUCode_AX::MixAdd(short* _pBuffer, int _iSize)
|
||||
for (int i = 0; i < _iSize; i++)
|
||||
{
|
||||
// Clamp into 16-bit. Maybe we should add a volume compressor here.
|
||||
int left = templbuffer[i];
|
||||
int right = temprbuffer[i];
|
||||
int left = templbuffer[i] + _pBuffer[0];
|
||||
int right = temprbuffer[i] + _pBuffer[1];
|
||||
if (left < -32767) left = -32767;
|
||||
if (left > 32767) left = 32767;
|
||||
if (right < -32767) right = -32767;
|
||||
if (right > 32767) right = 32767;
|
||||
*_pBuffer++ += left;
|
||||
*_pBuffer++ += right;
|
||||
*_pBuffer++ = left;
|
||||
*_pBuffer++ = right;
|
||||
}
|
||||
|
||||
// write back out pbs
|
||||
WriteBackPBs(PBs, numberOfPBs);
|
||||
|
||||
// write logging data to debugger again after the update
|
||||
if(m_frame)
|
||||
if (m_frame)
|
||||
{
|
||||
CUCode_AX::Logging(_pBuffer, _iSize, 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user