diff --git a/hook/src/audio_hook.cpp b/hook/src/audio_hook.cpp index e54bd7e..e8d5838 100644 --- a/hook/src/audio_hook.cpp +++ b/hook/src/audio_hook.cpp @@ -142,13 +142,12 @@ std::atomic g_frames_silenced{0}; // total frames whose local pla // When we attach to an already-running game we never saw its IAudioClient::Initialize, // so a render client discovered on the hot path gets the device mix format as a best -// guess. That guess is wrong for games that render at a non-device rate via WASAPI -// AUTOCONVERTPCM -- e.g. Godot/Brotato render 44100 while the device mixes at 48000, so -// playing the captured 44100 audio back as 48000 shifts the pitch up. For such streams we -// verify (and correct) the guessed sample rate by measuring the real render cadence -// before publishing the format. g_stream_rate_guess marks a guessed stream; g_rate_estimator -// is its robust, consensus-based measurement (see rate_estimator.hpp). Both guarded by -// g_setup_mutex. +// guess. That guess is wrong for a game that renders at a non-device rate via WASAPI +// AUTOCONVERTPCM (e.g. rendering 44100 while the device mixes at 48000), so playing the +// captured 44100 audio back as 48000 shifts the pitch up. For such streams we verify (and +// correct) the guessed sample rate by measuring the real render cadence before publishing +// the format. g_stream_rate_guess marks a guessed stream; g_rate_estimator is its robust, +// consensus-based measurement (see rate_estimator.hpp). Both guarded by g_setup_mutex. bool g_stream_rate_guess[kMaxAudioStreams] = {}; RateEstimator g_rate_estimator[kMaxAudioStreams] = {};