TR1X icon indicating copy to clipboard operation
TR1X copied to clipboard

Music corrupts if Win11 audio output is changed during playback

Open Richard-L opened this issue 1 year ago • 4 comments

https://github.com/user-attachments/assets/2623da89-a145-4b22-bc53-50c29b15915f

On Win11 the shortcut for audio output device "on the fly" changing is CTRL+WIN+V. It's an overlay that's sadly not captured in the video but here's a screenshot from reddit:

Image

The issue is also present in TR1X.

Richard-L avatar Feb 11 '25 21:02 Richard-L

@Richard-L can you test if it's the same with FMVs, which use a different audio decoding process?

rr- avatar Feb 11 '25 21:02 rr-

Can't get the error in the FMVs when starting TR2 despite multiple switching back and forth. But after the main menu music will immediately have the error.

Seems like the FMV audio decoding is fine 👌

Richard-L avatar Feb 11 '25 21:02 Richard-L

Interesting. I just checked my game, and it seems only music files are affected (ex- title music, cutscenes). FMVs and game sounds (ex- pistol gun shots) play fine.

walkawayy avatar Feb 26 '25 00:02 walkawayy

Audio streams need to renegotiate the channel layout once the device changes. The FMV code which is originally based off ffplay.c supports this, but music streams do not - I never included this logic, foolishly believing it's such a corner case that it will be irrelevant to us.

rr- avatar Feb 26 '25 06:02 rr-