Skip to content

Commit

Permalink
bounds check reading spu output
Browse files Browse the repository at this point in the history
  • Loading branch information
CasualPokePlayer committed Jun 17, 2024
1 parent 6f68c84 commit f309dbc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file modified Assets/dll/melonDS.wbx.zst
Binary file not shown.
2 changes: 1 addition & 1 deletion waterbox/melon/BizInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion waterbox/melon/melonDS
Submodule melonDS updated 2 files
+4 −4 src/SPU.cpp
+1 −1 src/SPU.h

0 comments on commit f309dbc

Please sign in to comment.