Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound effect volume is too low when the music volume is low. #5807

Closed
DorpsGek opened this issue Nov 18, 2013 · 6 comments
Closed

Sound effect volume is too low when the music volume is low. #5807

DorpsGek opened this issue Nov 18, 2013 · 6 comments
Labels
bug Something isn't working flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

Jaap opened the ticket and wrote:

I used Windows 7 x64, but I think this issue is also reproducible at other operating systems.

Steps to reproduce this issue:

  1. Start a new game and open the Jazz Jukebox.
  2. Turn on the music (play).
  3. Set the Effects Volume to max.
  4. Set the Music Volume to almost the minimum position.
  5. Open the Landscaping toolbox and get the Demolish tool.
  6. Demolish some items in the game, and listen to the sound effects.

You'll hear almost nothing because the Music Volume is set to low. When you increase the Music Volume, and demolish some items, the sound effects hearable now.

I did some research and saw that the Windows Volume Mixer for OpenTTD is synchronized with the Music Volume control in the Jazz Jukebox. The sound effect volume cannot be set louder, so the only way to hear the sound effects is to turn off the music.

In my opinion the Music Volume control in the Jazz Jukebox should not affect the value of the Windows Volume Mixer. The Music Volume and Effects Volume should be controlled independently of each other.

And an other small bug:

  1. Turn off the music.
  2. Change the value of the Music Volume.
  3. Turn on the music.

The volume change at step 2 wasn't executed.

Reported version: 1.3.3-RC1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5807
@DorpsGek
Copy link
Member Author

munhyunsu wrote:

In linux, i can't change music volume.

Known-bugs: At #4416(http://bugs.openttd.org/task/4416)
Can't change volume inside OpenTTD [#4416]
Some backends do not provide a means to change the volume of sound
effects or music. The mixing of music and sound is left to external
libraries/the operating system we can't handle the volume control
in OpenTTD. As a result you can't change the volume inside OpenTTD
for backends such as SDL; just use the volume control provided by
your operating system.

may be it seems to similary.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5807#comment12798

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 6, 2018

nielsm wrote:

This patch should fix the issue. Instead of using the master volume control, it implements a "tool" that intercepts all MIDI messages and adjusts their velocity (volume) based on the controller setting.
It's not a perfect fix, since now the volume changes aren't instant, especially noticeable in some long notes like in "Easy Driver". It also affects the dynamics of the music further, and will probably completely silence some already soft notes.

Code quality-wise, I'll be the first to admit this isn't a good implementation of a COM object, but I believe it shouldn't cause issues in practice.

It may also be possible to implement volume control via a MIDI SysEx message instead, which would solve all the above problems if it actually works.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5807#comment14863

@DorpsGek
Copy link
Member Author

DorpsGek commented Mar 6, 2018

nielsm wrote:

Here is a better patch than the above, it's based on adjusting per-channel volume control messages instead of note-on velocities. This makes it act instantly and on already-playing notes.
The patch currently has some issues with uneven music playback if the volume slider is dragged continuously.

This is tested to work with both the Microsoft GM soft-synth in Windows 10, and with a hardware MIDI synth.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5807#comment14864

@DorpsGek
Copy link
Member Author

nielsm wrote:

Here's yet another slightly updated version of the patch. It's intended to be applied before the patches in #6684 and after #6683.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5807#comment14870

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
@TrueBrain TrueBrain added patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay bug Something isn't working and removed bug from FlySpray labels Apr 13, 2018
@frosch123 frosch123 removed the Core label Apr 14, 2018
nielsmh added a commit to nielsmh/OpenTTD that referenced this issue May 4, 2018
Solved by implementing a "tool" object that intercepts and modifies the volume
control MIDI messages, adjusting them by the user setting.
nielsmh added a commit to nielsmh/OpenTTD that referenced this issue May 4, 2018
Solved by implementing a "tool" object that intercepts and modifies the volume
control MIDI messages, adjusting them by the user setting.
nielsmh added a commit to nielsmh/OpenTTD that referenced this issue May 19, 2018
Solved by implementing a "tool" object that intercepts and modifies the volume
control MIDI messages, adjusting them by the user setting.
@nielsmh
Copy link
Contributor

nielsmh commented May 24, 2018

PR #6787 will fix this, or #6774 will obsolete this.

@michicc
Copy link
Member

michicc commented May 26, 2018

Fixed by #6787.

@michicc michicc closed this as completed May 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

5 participants