aslib: Flush buffer when playing MP3 from RAM directly

If not, it's possible that some of the MP3 data is only in the data cache
and the ARM7 can't see it.
This commit is contained in:
Antonio Niño Díaz 2025-01-12 22:02:31 +00:00
parent 79279d775f
commit bae63a54e9

View File

@ -338,6 +338,9 @@ void AS_MP3DirectPlay(u8 *mp3_data, u32 size)
if(IPC_Sound->mp3.state & (MP3ST_PLAYING | MP3ST_PAUSED))
return;
// Make sure the ARM7 sees the updated MP3 data
DC_FlushRange(mp3_data, size);
IPC_Sound->mp3.mp3buffer = mp3_data;
IPC_Sound->mp3.mp3filesize = size;
IPC_Sound->mp3.stream = false;