mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-01 21:52:41 +02:00
Changed the loop end address detection to an exact match with the current address for ADPCM audio. Fixes the non-looping music in PN03.
Fixes issue 3998.
This commit is contained in:
parent
f7edfc0118
commit
b2a01dc348
@ -165,7 +165,11 @@ u16 dsp_read_accelerator()
|
|||||||
// Somehow, YN1 and YN2 must be initialized with their "loop" values,
|
// Somehow, YN1 and YN2 must be initialized with their "loop" values,
|
||||||
// so yeah, it seems likely that we should raise an exception to let
|
// so yeah, it seems likely that we should raise an exception to let
|
||||||
// the DSP program do that, at least if DSP_FORMAT == 0x0A.
|
// the DSP program do that, at least if DSP_FORMAT == 0x0A.
|
||||||
if (Address >= EndAddress)
|
|
||||||
|
if (Address > EndAddress && g_dsp.ifx_regs[DSP_FORMAT] != 0x00) // PCM audio
|
||||||
|
Address = EndAddress;
|
||||||
|
|
||||||
|
if (Address == EndAddress)
|
||||||
{
|
{
|
||||||
// Set address back to start address.
|
// Set address back to start address.
|
||||||
Address = (g_dsp.ifx_regs[DSP_ACSAH] << 16) | g_dsp.ifx_regs[DSP_ACSAL];
|
Address = (g_dsp.ifx_regs[DSP_ACSAH] << 16) | g_dsp.ifx_regs[DSP_ACSAL];
|
||||||
|
@ -232,7 +232,8 @@ inline void MixAddVoice(ParamBlockType &pb,
|
|||||||
temprbuffer[s] += right;
|
temprbuffer[s] += right;
|
||||||
|
|
||||||
// Control the behavior when we reach the end of the sample
|
// Control the behavior when we reach the end of the sample
|
||||||
if (samplePos >= sampleEnd)
|
if ((pb.audio_addr.sample_format != AUDIOFORMAT_ADPCM && samplePos >= sampleEnd) ||
|
||||||
|
(pb.audio_addr.sample_format == AUDIOFORMAT_ADPCM && samplePos == sampleEnd))
|
||||||
{
|
{
|
||||||
if (pb.audio_addr.looping == 1)
|
if (pb.audio_addr.looping == 1)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user