diff --git a/thirdparty/rexglue-sdk/src/native/audio/audio_system.cpp b/thirdparty/rexglue-sdk/src/native/audio/audio_system.cpp index 88158ebe..8e0ab9a0 100644 --- a/thirdparty/rexglue-sdk/src/native/audio/audio_system.cpp +++ b/thirdparty/rexglue-sdk/src/native/audio/audio_system.cpp @@ -19,12 +19,9 @@ REXCVAR_DEFINE_BOOL(audio_trace_render_driver_verbose, false, "Audio", "Trace render-driver activity"); REXCVAR_DEFINE_BOOL(audio_deep_trace, false, "Audio", "Enable verbose runtime audio tracing"); -// The four audio_xma_* guards below are correctness fixes debugged on Ace +// The audio_xma_* guards below are correctness fixes debugged on Ace // Combat 6 (details in the commits introducing each). All default on; off // restores the legacy behaviour for A/B comparison. -REXCVAR_DEFINE_BOOL(audio_xma_loop_guard, true, "AC6/Fixes", - "Guard XMA looping against degenerate loop metadata that " - "truncates streamed voices. Off = legacy behaviour for A/B."); REXCVAR_DEFINE_BOOL(audio_xma_header_straddle_fix, true, "AC6/Fixes", "Decode XMA frames whose header straddles a packet boundary. " "Off = legacy walk, which drops a frame per occurrence and " diff --git a/thirdparty/rexglue-sdk/src/native/audio/xma/context.cpp b/thirdparty/rexglue-sdk/src/native/audio/xma/context.cpp index 8f5f8380..084317aa 100644 --- a/thirdparty/rexglue-sdk/src/native/audio/xma/context.cpp +++ b/thirdparty/rexglue-sdk/src/native/audio/xma/context.cpp @@ -1,4 +1,4 @@ -/** +/** * ReXGlue native audio runtime * Part of the AC6 Recompilation project */ @@ -17,7 +17,6 @@ #include REXCVAR_DECLARE(bool, audio_deep_trace); -REXCVAR_DECLARE(bool, audio_xma_loop_guard); REXCVAR_DECLARE(bool, audio_xma_preserve_timeline); REXCVAR_DECLARE(bool, audio_xma_header_straddle_fix); REXCVAR_DECLARE(bool, audio_xma_loop_end_guard); @@ -345,31 +344,7 @@ void XmaContext::UpdateLoopStatus(XMA_CONTEXT_DATA* data) { const uint32_t loop_start = std::max(kBitsPerPacketHeader, data->loop_start); const uint32_t loop_end = std::max(kBitsPerPacketHeader, data->loop_end); - if (REXCVAR_GET(audio_xma_loop_guard)) { - // Xenia master's TrySetupNextLoop guard (PR #1808, debugged on Ace - // Combat 6): streamed voices can carry degenerate loop metadata - // (loop_count=0xff, loop_start == loop_end == 0). The clamps above turn - // that into start == end == kBitsPerPacketHeader, and SwapInputBuffer - // resets the read offset to exactly kBitsPerPacketHeader, so without a - // real-window check every buffer swap re-fires the loop machinery - - // the frame output limit truncates that frame and the loop-start skip - // drops subframes. Require loop_start < loop_end (raw values) and use - // master's read_offset >= loop_end trigger. - if (data->loop_start >= data->loop_end || - data->input_buffer_read_offset < loop_end) { - if (data->loop_start >= data->loop_end && - data->input_buffer_read_offset == loop_end && IsDeepTraceEnabled()) { - REXAPU_DEBUG( - "XmaContext {}: loop guard suppressed degenerate loop fire " - "(loop_start={} loop_end={} loop_count={} read_offset={})", - id(), static_cast(data->loop_start), - static_cast(data->loop_end), - static_cast(data->loop_count), - static_cast(data->input_buffer_read_offset)); - } - return; - } - } else if (data->input_buffer_read_offset != loop_end) { + if (data->input_buffer_read_offset != loop_end) { return; }