Keep Mac audio buffers near 5 ms across output changes
Apply PR #262's device-buffer fix for clicks caused by audio underruns. Reconfigure on both output-device and hardware sample-rate changes, respect the device's frame range, and read back the actual buffer size. Avoid rewriting unchanged sizes when buffer changes notify the format listener. Remove listeners before teardown, including failed initialization, so they cannot configure a device that the AudioUnit has already released. Add hardware-independent regression coverage for switching, rate changes, scope filtering, limits, synchronous notifications, diagnostic overrides, absent devices, and listener cleanup. Record the original gameplay evidence and the additional silent Core Audio validation in the audio reference. Validation: full host tests, Mac host build, docs checks, and the iOS source compile check (178 files) passed. Silent USB/speaker switching and speaker rates of 44.1/96/48 kHz verified 221/480/240 frames. HDMI switching and gameplay listening after these listener changes remain unvalidated. Co-authored-by: parsifal295 <130349765+parsifal295@users.noreply.github.com>
This commit is contained in:
1 parent
06b7b3e563
commit
40b643bbe6
6 files changed
+220
-5
No files matched your search
@@ -52,6 +52,7 @@ General host changes first needed here; each applies to every game:
|
||||
|
||||
- `alloc_big_align` was first needed on 13 Sentinels ([its note](../01003FC01670C000/README.md#memory), [the profile keys](../README.md#keys)).
|
||||
- **The hardware multi-stream Opus decoder's C interface** forwarded to the SDK's software decoder (`hle_codec.c`) and **`GenerateCryptographicallyRandomBytes` under the `sdk`'s own `getentropy`** (`HLE_FORCE`, `hle_os.c`): [Hardware Opus decoders built on the SDK's software decoders](../../../docs/reference/audio.md#hardware-opus-decoders-built-on-the-sdks-software-decoders), [Cryptographically random bytes](../../../docs/reference/services.md#cryptographically-random-bytes).
|
||||
- **A 5 ms device buffer on the Mac** (`hle_audio.c`), maintained across output-device and sample-rate changes: [The Mac's default I/O buffer](../../../docs/reference/audio.md#the-macs-default-io-buffer) records the underrun measurements, host validation and remaining checks.
|
||||
- **Vibration handles answered before a controller's haptics are routed** (`hle_hid.c`): the game asks for them once at startup, before GameController reports the pad, and every value went to handle 0 (seen in the log; the game has no rumble, so nothing changed in play) ([Vibration handles before a controller is reported](../../../docs/reference/services.md#vibration-handles-before-a-controller-is-reported)).
|
||||
|
||||
## Open
|
||||
|
||||
Reference in new issue
Block a user