0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

50 Commits

Author SHA1 Message Date
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
Exeldro
1dd96124e3 UI: Fix vertical grayscale meters when volume is muted 2021-12-30 22:32:24 -08: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
VodBox
3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13:00
Ryan Foster
5f68991911 clang-format: Commit file changes for clang-format 12 2021-10-13 20:00:04 +11: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
jp9000
20bbc9794d UI: Add Undo/Redo for volume change/mute via main fader 2021-04-27 21:09:41 -07:00
Exeldro
bacf83dbc9 UI: Close context menu on destroy of VolControl 2021-01-25 04:17:14 -08:00
VodBox
89b4e9136f UI: Various screen reader fixes
This commit fixes various issues with screen readers in the main OBS
interface. These were tested using NVDA on Windows 10 2004.

Audio track selection in Settings now says Track 1, 2, etc, rather than
just the number.

Various checkboxes that just say "Enable" now have accessible text that
says what the enable is for (since it says "checkbox", the fact it's an
enable should hopefully be clear).

Type in the recording tab of output now has accessible text which says
"Recording Type".

Items in the Advanced Audio Properties window now have accessible text
for what they are for. Currently some do not report correct values, but
that will require an accessible interface in Qt to be written
specifically for that, which will be done at a later date.

Buttons in the filters window now have accessible text for what they do.

All the right side buttons in hotkeys now have tooltips, and by
extension, accessible text.
2020-11-25 19:38:05 -08:00
jp9000
f4f2d383b1 UI: Greatly improve main window repaint performance
The VolumeMeter widgets were apparently being drawn as transparent
widgets, which meant that it was necessary to redraw everything under
the widgets in order to properly draw the widgets, so the entire mixer
section of the window was being redrawn every time the meters updated.
This caused a significant perf hit when the only thing wanted/desired
was just to update the meters. This was more noticeable after changing
the audio meter update rate to 60hz from 30hz.

The fix is to simply mark them as opaque widgets, and paint the
background ourselves rather than rely on what's under the window. CPU
perf for painting the main window has been vastly improved because of
this; CPU usage of Qt in the main window is now reduced by at least half
of what it was, if not more.
2020-10-03 08:27:01 -07:00
Ben Torell
1782490060 UI: Update volmeters at 60hz
Technically this is 62.5Hz (once every 16ms) but who's counting?
2020-06-22 09:36:22 -04:00
Matt Gajownik
962ac4abbc UI: Don't clip meters when resizing with no input 2020-03-21 23:25:23 +11:00
Clayton Groeneveld
b3601681b8 UI: Add ability to lock volume 2020-02-16 18:33:46 -06:00
luz.paz
d124e6402c docs/sphinx: Fix various typos
(This modifies UI, libobs, deps/obs-scripting, various cmake files)

Found using:
`codespell -q 3 -S *.ini,./UI/data/locale,./deps/w32-pthreads -L aci,dur,iff,mut,numer,uint`
2019-10-14 17:19:38 -07:00
jp9000
3064887ae2 Revert "UI: Various screen reader fixes"
This reverts commit b5843caa48.

This breaks some hotkeys because the signals are tied to a signal which
is now triggered because "toggled" is used instead of "clicked", so just
revert it for now for the release and look at it later post-patch.
2019-09-12 13:55:31 -07:00
VodBox
b5843caa48 UI: Various screen reader fixes
This commit fixes various issues with screen readers in the main OBS
interface. These were tested using NVDA on Windows 10 1903.

Checkboxes or buttons which toggle, when receiving an activate signal
from the screen reader would visually update, but not perform any
action. This is because they're listening only for clicks. They should
all now be listening for toggles instead.

The screen reader would navigate through the UI in the order that
elements are defined in the .ui XML, and not by their row positions.
The XML has been reordered so that things should be defined in their row
order.

Audio track selection now says Track 1, 2, etc, rather than just the
number. Various checkboxes that just say "Enable" now have accessible
text that says what the enable is for (since it says "checkbox", the
fact it's an enable should hopefully be clear). Type in the recording
tab of output now has accessible text which says "Recording Type".

All the right side buttons in hotkeys now have tooltips, and by
extension, accessible text. Currently it does not yet say what hotkey
the action is in relation to, but that would require more locales.
2019-09-04 12:43:56 +12:00
Jim
5f7ff6fbcc
Merge pull request #1970 from cg2121/fix-warnings
various: Fix compiler/theme warnings
2019-08-17 08:22:03 -07:00
jp9000
7b5cc8c29d UI: Use "-inf" for muted volume level
The infinity character doesn't work on windows, so just revert to using
"inf" for now.
2019-08-16 13:06:06 -07:00
Clayton Groeneveld
5f7f2c1c97 UI: Fix compiler/Acri warnings 2019-08-15 03:00:06 -05:00
Clayton Groeneveld
6da1df2ece UI: Display infinity symbol when volume is at 0 percent 2019-07-19 23:15:14 -05: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
Clayton Groeneveld
214d482ab1 UI: Change fader type to log 2019-05-08 16:41:18 -07:00
Clayton Groeneveld
c46fe33710 UI: Make volume faders more precise 2019-05-08 16:41:17 -07:00
jp9000
140f927f4f UI: Fix whitespace issues with "ignore wheel" widgets 2019-04-21 04:07:00 -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
craftwar
b378261bdf UI: Fix mem leak in VolControl 2018-06-07 00:44:59 +02:00
pkviet
732617251c UI: Fix mem leak with volume meter 2018-06-07 00:44:28 +02:00
Shaolin
c7c328dc83 UI: Add Vertical Mixer option 2018-05-19 00:17:58 -03:00
Shaolin
288339ceda UI: Simplify Volume Control draw logic 2018-05-19 00:12:15 -03:00
Shaolin
5aab9bfb3e UI: Avoid copies in Volume Control 2018-05-19 00:12:15 -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
Igor Bochkariov
61839d8c94 UI: Sort audio controls by source name
Audio controls in OBS Mixer and Advanced Audio Properties window are not
sorted at all.  Every time OBS is restarted they get shuffled (Jim note:
This is due to json object hashing).  The order of these controls is
additionally not consistent between the mixer and the advanced audio
properties window.

Closes obsproject/obs-studio#1242
2018-04-20 19:49: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
jp9000
17d2a17f9e UI: Put clip detection back in to volume meter
Before the new volume meters were implemented, the meter would flash red
if the audio was clipping.  This functionality was removed when the
meters were changed, whether intentionally or unintentionally, and this
patch puts that functionality back in.  If clipping occurs, the meters
will be fully colored with the foregroundErrorColor value while the
clipping is occurring.
2018-01-15 23:55:03 -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
db345e2e48 UI: Improve accessibility text on main window 2017-02-24 03:38:41 -08:00
jp9000
f83bd9facc UI: Change volume meter update interval to 30fps 2017-02-14 15:00:52 -08: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
7639b277ce UI: Add audio monitoring to settings/adv audio props.
Adds audio monitoring selection to advanced audio properties, and adds
the ability to select the device in advanced settings.
2017-02-06 11:44:04 -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