mirror of
https://github.com/izzy2lost/xenia-edge.git
synced 2026-07-06 00:20:26 -07:00
[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.
This commit is contained in:
@@ -463,8 +463,6 @@ void XmaContextNew::Decode(XMA_CONTEXT_DATA* data) {
|
||||
if (!next_packet) {
|
||||
// Next buffer not available yet. We can't resolve the split header
|
||||
// without it, so consume (swap) the current buffer and move on.
|
||||
// This loses one frame but avoids a deadlock where the game waits
|
||||
// for us to finish this buffer before providing the next one.
|
||||
XELOGAPU(
|
||||
"XmaContext {}: Split frame header at packet {}, next buffer "
|
||||
"unavailable — swapping input buffer",
|
||||
@@ -514,13 +512,10 @@ void XmaContextNew::Decode(XMA_CONTEXT_DATA* data) {
|
||||
GetNextPacket(data, next_packet_index, current_input_packet_count);
|
||||
|
||||
if (!next_packet) {
|
||||
// Next buffer not available yet. We can't decode the split frame
|
||||
// without it, so consume (swap) the current buffer and move on.
|
||||
XELOGAPU(
|
||||
"XmaContext {}: Split frame body at packet {}, next buffer "
|
||||
"unavailable — swapping input buffer (need packet {}/{})",
|
||||
id(), packet_index, next_packet_index, current_input_packet_count);
|
||||
SwapInputBuffer(data);
|
||||
// Error path
|
||||
// Decoder probably should return error here
|
||||
// Not sure what error code should be returned
|
||||
data->error_status = 4;
|
||||
return;
|
||||
}
|
||||
// Copy next packet to buffer
|
||||
|
||||
Reference in New Issue
Block a user