Audio breaks after system resume on Windows
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.3k
- Forks
- 1.3k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 37
Description
Based on this forums thread: https://www.tt-forums.net/viewtopic.php?f=31&t=87257
Version of OpenTTD
Unknown (probably most)
Windows 10
Expected result
Putting the computer to hibernate while the game is running, then resuming the computer, the game continues to be able to play sound.
Actual result
After resuming the computer from hibernation, sound effects are no longer audible until the game is restarted.
Steps to reproduce
- Start game
- Ensure sound effects are playing
- Put the computer into hibernation mode
- Resume the computer from hibernation
- The game continues working except sound effects are no longer audible
This likely depends on the exact audio device used, and perhaps also which other audio devices are available in the system. The original reporter is playing audio via a display cable, i.e. an external digital device which might have some re-initialisation required after a resume operation.
It's likely that reproducing this issue requires having a similar external audio device, and possibly having no other active/functioning audio devices that the system can fall back on.
This might depend on the sound driver selected in the game. It's possible that only one of the XAudio or Win32 drivers will exhibit this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure on Windows 10 with an external digital audio device, then compare the XAudio and Win32 drivers across hibernation and resume. Done means sound effects remain audible after resume, including on the device configuration described in the issue, or the affected driver and device conditions are identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100