Commit Graph

25 Commits (master)

Author SHA1 Message Date
VodBox 77694d76e8 UI: Add Accessibility menu to settings
This change introduces an accessibility menu to settings, along with
options for overriding the colors used by OBS in the mixer and in the
preview to be more color blind friendly than the options provided by the
current theme.
2022-07-27 21:37:30 -04:00
OldBaldGeek 6a5a5b4538 UI: Make volume meter tweakable by stylesheet
Replace fixed Arial, 7 px meter scale font with the font used
for VolumeMeter/QWidget. Add qproperties for meter bar thickness and
a scaling factor for the meter scale numbers. If not specified in a
QSS, defaults are 3 pixel bar width and 80% of base font size.
2022-02-27 13:17:59 +11:00
OldBaldGeek c8a0dbff1e UI: Use selective repaint on volume meter scale
Fix for issue 3915 - reduce tick and font blur at 125% DPI.
Former use of paint cache resulted in blur when scaled.
2022-02-27 13:17:59 +11:00
Clayton Groeneveld f52c05081a UI: Add grayscale meters when volume is muted
This allows the user to see audio levels, even when
muted.
2021-12-23 06:35:29 -08:00
Clayton Groeneveld 5878856ce4 UI: Display grayscale volume meter if muted
Currently, the volume meters don't show volume levels when
muted. This shows the levels and makes it grayscale when
the source is muted.
2021-12-23 06:35:29 -08:00
jp9000 2be0d6b8ef Revert "UI: Update volume controls by callback"
This reverts commit 0a3cd8fbf6.

Causes volume levels to freeze if audio stops.
2021-09-23 09:27:30 -07:00
jpark37 0a3cd8fbf6 UI: Update volume controls by callback
Gets rid of the time-critical timeSetEvent thread on Windows.
2021-09-10 10:21:19 -07:00
Exeldro bacf83dbc9 UI: Close context menu on destroy of VolControl 2021-01-25 04:17:14 -08:00
Clayton Groeneveld b3601681b8 UI: Add ability to lock volume 2020-02-16 18:33:46 -06:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
jp9000 c3c740d36f UI: Do not remove focus on mouse leave events
For the "ignore wheel" widgets, do not leave focus on mouse leave
events.  This causes unintended side effects such as not being able to
type in edit boxes, and is very annoying.
2019-04-21 04:03:37 -07:00
akapar dbd30a8131 UI: Do not allow mouse wheel for volume slider
This commit fixes the issue of being able to scroll through the mixer
with the mouse wheel without modifying the volume slider.  This
functionality can be temporarily restored by holding a click on the
volume meter.
2019-04-19 06:56:55 -07:00
pkviet 736b7f0d35 UI: Fix display of mono source with surround output
A mono input with surround output is upmixed by swresampler by routing
it to FC (front center) by default which corresponds to third channel
for 3.0, 4.0, 4.1, 5.0, 5.1, 7.1. (The other channels are muted.)
But the volume meters are set to show the first channel for mono sources.
Therefore although audio is processed, it would not show on the meter.
This fixes this display issue.

Closes obsproject/obs-studio#1540
2018-12-07 12:38:17 -08:00
Shaolin c7c328dc83 UI: Add Vertical Mixer option 2018-05-19 00:17:58 -03:00
Shaolin 04fa4c49d9 UI: Clean up includes and code-style 2018-05-19 00:12:15 -03:00
Tjienta Vara b0f94afaf2 libobs, UI: Add true peak measurements
Add a new algorithm to calculate the true-peak. It implements the
Whittaker- Shannon interpolation from four samples to create 4
intermediate samples (5 x oversampling) inbetween the middle two
samples.

With 4 samples and 4 intermediate samples the algorithm can be
implemented as a 4x4 vector-matrix cross product, which is ideal for
SSE.

I've also replaced the sample-peak algorithm using SSE as well to
improve performance.

Closes obsproject/obs-studio#1189
2018-04-30 03:53:26 -07:00
jp9000 0d4677f3bc UI: Hold the clip flash for at least one second
Holds the clipping flash for one second to better indicate that clipping
is occurring.

Closes obsproject/obs-studio#1201
2018-04-18 23:49:40 -07:00
Shaolin 53d936c5dc UI: Add audio meter decay rate option
The decay rate of the audio meters can now be selected in the audio
settings.  The values are:

- "Fast"   (OBS default, 40 dB / 1.7s)
- "Medium" (Type I PPM,  20 dB / 1.7s)
- "Slow"   (Type II PPM, 24 dB / 2.8s)

Closes jp9000/obs-studio#1143
2018-01-19 05:49:21 -08:00
Shaolin 9872e4d525 UI: Add the "-60" volume control marker 2018-01-09 18:55:41 -02:00
Tjienta Vara 50ce228455 UI: Rework volume-meters, adding more information
The following features have been added to the audio-meters:
 * Stereo PPM-level meter, with 40 dB/1.7s decay rate.
 * Stereo VU-level meter, with 300 ms integration time.
 * Stereo Peak-hold meter, with 20 second sustain.
 * Input peak level color-squares in front of every meter.
 * Minor-ticks for each dB.
 * Major-ticks for every 5 dB.
 * Meter is divided in sections at -20 dB and -9 dB.

The ballistic parameters chosen here where taken from:
 * https://en.wikipedia.org/wiki/Peak_programme_meter (SMPTE RP.0155)
 * https://en.wikipedia.org/wiki/VU_meter

In the rework I have removed any ballistic calculations from
libobs/obs-audio-controls.c making the calculations here a lot more
simple doing only MAX and RMS calculations for only the samples in
the current update. The actual ballistics are now done by just
the UI/volume-control.cpp because ballistics need to be updated
based on the repaint-rate of the user-interface.

The dB to pixel conversion has been moved from
libobs/obs-audio-controls.c to UI/volume-control.cpp as well to reduce
coupling between these two objects, especially when implementing the
major- and minor-ticks and the sections.

All colors and ballistic parameters are adjustable via QT style sheets.
There are slight differences in colors for each of the themes.
2018-01-05 11:01:25 +01:00
Joel Bethke 5576823f24 UI: Allow volume peak to be customized via .qss
With the addition of the peak volume indicator, themes may wish to change
these colors but there was no way to do so. This change updates the
VolumeControl widget to allow a stylesheet to adjust all possible colors
for the volume bar. In addtion, the Rachni theme is updated to demonstrate
this new capability.
2017-08-11 21:07:31 -05:00
jp9000 7acd3be40d UI: Change meter color to red when audio is clipping
Closes jp9000/obs-studio#738
2017-07-01 19:41:18 -07:00
jp9000 16c6e69722 UI: Remove unused function from volume control 2017-07-01 18:58:55 -07:00
jp9000 27a3b97f48 UI: Prevent thread stalls with fader/volume widgets
When the OBS signal is triggered for these widgets, the invokeMethod
could cause the thread to stall, which could make it wait much longer
than necessary to output audio data.  When that happens, it causes audio
monitoring to get backed up and get unnecessarily delayed, as well as
cause general audio buffering in libobs to increase unnecessarily.

A simple fix both in terms of preventing that stall and improving UI
performance is to not call invokeMethod to update the widget each time,
and then instead have those widgets update themselves via a timer at a
specific interval.
2017-02-06 11:44:05 -08:00
jp9000 01b274f1da UI: Rename 'obs' dir to 'UI'
This is to prevent confusion both when prefixing commits and when
reading the directory structure for the first time.
2016-08-27 20:19:45 -07:00