diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2012-12-01 00:54:25 +0100 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2012-12-01 00:54:25 +0100 |
| commit | 3ca77cf077eed275d15d4f4c55e3cffb2d6f4478 (patch) | |
| tree | d44daba549307b3f3bfc5db5e4bc9de6df3e5042 /Source/Core | |
| parent | 04b1ee0016f7ea492886aa9a3c93f096d3e6eec5 (diff) | |
Fix samples clamping and interlacing in the OUTPUT command. Shouldn't have assumed previous AX HLE was doing something right.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp index 176050affa..6464e47c72 100644 --- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp +++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp @@ -482,7 +482,7 @@ void CUCode_AX::OutputSamples(u32 lr_addr, u32 surround_addr) // 32 samples per ms, 5 ms, 2 channels short buffer[5 * 32 * 2]; - // Clamp internal buffers to 16 bits. + // Output samples clamped to 16 bits and interlaced RLRLRLRLRL... for (u32 i = 0; i < 5 * 32; ++i) { int left = m_samples_left[i]; @@ -493,14 +493,8 @@ void CUCode_AX::OutputSamples(u32 lr_addr, u32 surround_addr) if (right < -32767) right = -32767; if (right > 32767) right = 32767; - m_samples_left[i] = left; - m_samples_right[i] = right; - } - - for (u32 i = 0; i < 5 * 32; ++i) - { - buffer[2 * i] = Common::swap16(m_samples_left[i]); - buffer[2 * i + 1] = Common::swap16(m_samples_right[i]); + buffer[2 * i] = Common::swap16(right); + buffer[2 * i + 1] = Common::swap16(left); } memcpy(HLEMemory_Get_Pointer(lr_addr), buffer, sizeof (buffer)); |
