obs-studio
obs-studio copied to clipboard
UI: Fix error color at clipping is not displayed on horizontal meter
Description
Removed the condition if (int(magnitude) != 0)
, which is not there in VolumeMeter::paintVMeter
.
Motivation and Context
When the clipping happens on an audio source, the error color (red by default) is not displayed on the horizontal volume meter.
There are two rendering functions VolumeMeter::paintHMeter
and VolumeMeter::paintVMeter
. These functions should be identical except for the coordinate calculation.
How Has This Been Tested?
OS: Fedora 39
- Prepare an audio source that outputs continuous tone.
- Apply a gain filter
- Decrease and increase the gain and check the volume meter.
master | this PR |
---|---|
https://github.com/user-attachments/assets/9b674f5c-ee40-4d4c-88cd-3250c7623adc | https://github.com/user-attachments/assets/1766d7c6-ce97-4d2c-8c7d-10df4f58a1e0 |
Types of changes
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation.