citra-emu
/
citra
Archived
1
0
Fork 0

Merge pull request #4483 from RoadrunnerWMC/audio-phys-addr-masking-fix

DSP: Add address mask for physical pointers to audio data buffers
This commit is contained in:
Weiyi Wang 2018-12-03 21:03:03 -05:00 committed by GitHub
commit 1d597db846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -284,7 +284,9 @@ bool Source::DequeueBuffer() {
state.adpcm_state.yn2 = buf.adpcm_yn[1];
}
const u8* const memory = Memory::GetPhysicalPointer(buf.physical_address);
// This physical address masking occurs due to how the DSP DMA hardware is configured by the
// firmware.
const u8* const memory = Memory::GetPhysicalPointer(buf.physical_address & 0xFFFFFFFC);
if (memory) {
const unsigned num_channels = buf.mono_or_stereo == MonoOrStereo::Stereo ? 2 : 1;
switch (buf.format) {