coreaudio: retry AudioQueueStart before falling back to silence #288

Merged
AnastasisKon merged 1 commit from upstream-pr/288 into main 2026-11-27 10:46:04 +00:00
AnastasisKon commented 2026-11-27 08:56:03 +00:00 (Migrated from github.com)

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T08:56:03Z.


A mid-run XAudio2 engine re-creation (the first cutscene, #140) failed AudioQueueStart once with OSStatus 'what' (0x77686174) while the output device was changing, and the output fell back to the silent clock for the rest of the run: the tester's cutscene audio stopped for good. Three tries, 250 ms apart, before the silent fallback; the log names each failed try.

What this changes

How it was tested

  • cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory
  • cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings
  • Ran the game (say how far it got), or not needed

Checklist

  • No game files, game code, disassembly listings or SDK files are included
  • Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md
  • New diagnostics are behind a VICTORY_* variable and documented
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:5523890868 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/288). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-27T08:56:03Z. --- A mid-run XAudio2 engine re-creation (the first cutscene, #140) failed AudioQueueStart once with OSStatus 'what' (0x77686174) while the output device was changing, and the output fell back to the silent clock for the rest of the run: the tester's cutscene audio stopped for good. Three tries, 250 ms apart, before the silent fallback; the log names each failed try. ## What this changes <!-- One change per pull request. Name the issue you claimed for it: Refs #123 (or Closes #123). --> ## How it was tested - [ ] `cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory` - [ ] `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings` - [ ] Ran the game (say how far it got), or not needed ## Checklist - [ ] No game files, game code, disassembly listings or SDK files are included - [ ] Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md - [ ] New diagnostics are behind a `VICTORY_*` variable and documented
LakshanSivakumar commented 2026-11-27 10:46:17 +00:00 (Migrated from github.com)

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T10:46:17Z.


Thank you. Merged.

I ran these five together on my Mac before merging (#101, #267, #288, #289, #291 on main, M5 Pro 48 GB, Series S, warm cache, three runs): two runs stayed in the world until the time limit (139 s and 202 s there, about 2 fps, no failed command buffer, no fault); one ended at the start of the world with a title fault I had not seen before (first chance at image+0x4fafef8, a read of 0x30000065c), with no GPU error before it. I could not tie that one to any of the five. If you see it, please say so.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216284965 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/288#issuecomment-7216284965). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T10:46:17Z. --- Thank you. Merged. I ran these five together on my Mac before merging (#101, #267, #288, #289, #291 on main, M5 Pro 48 GB, Series S, warm cache, three runs): two runs stayed in the world until the time limit (139 s and 202 s there, about 2 fps, no failed command buffer, no fault); one ended at the start of the world with a title fault I had not seen before (first chance at image+0x4fafef8, a read of 0x30000065c), with no GPU error before it. I could not tie that one to any of the five. If you see it, please say so.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS!288
No description provided.