bounds check reading spu output

This commit is contained in:
CasualPokePlayer 2024-06-16 23:31:53 -07:00
parent 6f68c84d8f
commit f309dbc316
3 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -140,7 +140,7 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f)
f->Height = 384;
}
f->Samples = f->NDS->SPU.ReadOutput(f->SoundBuffer);
f->Samples = f->NDS->SPU.ReadOutput(f->SoundBuffer, 4096);
if (f->Samples == 0) // hack when core decides to stop outputting audio altogether (lid closed or power off)
{
memset(f->SoundBuffer, 0, 737 * 2 * sizeof(u16));

@ -1 +1 @@
Subproject commit 2464c33bf2857c935f4afec9c25f72cea6621e74
Subproject commit 4e02967468c3b5ea853f5fdb0ca0b25a02fd601c