Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fluidsynth driver plays music too loudly #7189
Version of OpenTTD
git master: bfdad9a
libfluidsynth 1.1.11 on Debian buster/testing.
I expect the volume of songs played when compiled with fluidsynth to match that of when OpenTTD defaults to the external MIDI player (timidity).
When a new game is started, the song is played at a much louder volume. But the intro song seems to play at normal volume, so the difference is kind of jarring.
Steps to reproduce
Using fluidsynth and timidity standalone utilities, these two commands both play the song at the correct volume. This track in particular is noticeably louder when played in game with fluidsynth, and causes some buzzing in my speakers.
This is noticeable when the volume setting is set at max, which I think is the default:
Looking at the code here:
I think the issue is that this volume setter sets the gain between 0 and 1.0, and 1.0 is too loud (the default is 0.2: http://www.fluidsynth.org/api-1.x/).
I get better behavior when ranging the gain between something like 0 and 0.3, but then the intro music is way too quiet. I'm still learning the code here which is why I haven't made a PR for this.
It looks like
I've opened #7253 to resolve this issue.