OpenTTD / OpenTTD/OpenTTD

Audio breaks after system resume on Windows

Open
#8,248 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug OS: Windows
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

  1. Start game
  2. Ensure sound effects are playing
  3. Put the computer into hibernation mode
  4. Resume the computer from hibernation
  5. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.