Skip to content

Commit cf0d65e

Browse files
committed
[XMA] Restore error_status on split frame body
Fixes severe regressions in SCDA, we keep buffer swap for split header as that is required for audio loss in RE0. Original fix targeted RE0 but was too broad, only split header needed the swapbuffer consume change.
1 parent e4ec5e5 commit cf0d65e

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/xenia/apu/xma_context_new.cc

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,6 @@ void XmaContextNew::Decode(XMA_CONTEXT_DATA* data) {
463463
if (!next_packet) {
464464
// Next buffer not available yet. We can't resolve the split header
465465
// without it, so consume (swap) the current buffer and move on.
466-
// This loses one frame but avoids a deadlock where the game waits
467-
// for us to finish this buffer before providing the next one.
468466
XELOGAPU(
469467
"XmaContext {}: Split frame header at packet {}, next buffer "
470468
"unavailable — swapping input buffer",
@@ -514,13 +512,10 @@ void XmaContextNew::Decode(XMA_CONTEXT_DATA* data) {
514512
GetNextPacket(data, next_packet_index, current_input_packet_count);
515513

516514
if (!next_packet) {
517-
// Next buffer not available yet. We can't decode the split frame
518-
// without it, so consume (swap) the current buffer and move on.
519-
XELOGAPU(
520-
"XmaContext {}: Split frame body at packet {}, next buffer "
521-
"unavailable — swapping input buffer (need packet {}/{})",
522-
id(), packet_index, next_packet_index, current_input_packet_count);
523-
SwapInputBuffer(data);
515+
// Error path
516+
// Decoder probably should return error here
517+
// Not sure what error code should be returned
518+
data->error_status = 4;
524519
return;
525520
}
526521
// Copy next packet to buffer

0 commit comments

Comments
 (0)