Skip to content

Commit aae0b3f

Browse files
flush any remaining audio samples to the output buffer on frame end
ensures that all audio for the frame is actually available for instance in cases where audio is not running on a separate thread
1 parent 0e96635 commit aae0b3f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/NDS.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,9 @@ u32 NDS::RunFrame()
10561056
break;
10571057
}
10581058

1059+
// Ensure the last audio samples produced for this frame are available to the frontend immediately
1060+
SPU.BufferAudio();
1061+
10591062
// In the context of TASes, frame count is traditionally the primary measure of emulated time,
10601063
// so it needs to be tracked even if NDS is powered off.
10611064
NumFrames++;

0 commit comments

Comments
 (0)