complexlogic/rsgain

Opus header gain modes cause a crash on Windows

Closed this issue · 2 comments

Using the header gain modes result in a crash without error messages. Previous values are cleared but no new values are written.

Tested with v3.5.1 on freshly installed and also fully updated installations of Windows 7, 10 and 11

I confirm this on my end and will investigate a solution.

The root cause of this bug was a resource sharing issue. The input file is already open with the TagLib File object, and then the header gain write function tries to open it. It seems that the Windows OS file protocol has a problem with this, but Unix file systems don't. Sometimes system-related behavior can be inconsistent across platforms.

In this case, the solution is relatively straightforward. I changed the code to close the TagLib File object before writing to the header gain. This prevents the resource conflict, so now everything works fine across all supported platforms.

You can use the development build with the fix incorporated until the next release.