Adds VU meter to the audio player bar

Adds a segmented spectrum VU meter to the condensed player bar, fed by an analyser tapped after ReplayGain and before the volume, so the meter does not depend on the output volume.

Adds per-user VU meter settings (orientation, segment count and gap, thresholds, peak marker, hold and falloff rates) across the domain, persistence, API contracts, validation and the settings page, with a migration and localized resources.

Sizes the meter cells in whole pixels and keeps the frame clock steady on browsers that round timers.

Updates the theming guide, API documentation, request samples and the user manual.
This commit is contained in:
BinaryAlley committed 2026-10-21 20:30:51 +03:00
1 parent 9889c86c76
commit 2e9f7d8496
66 files changed
+7844 -81

No files matched your search

@@ -84,4 +84,49 @@ public class UserSettingsDto
/// Gets or sets the quality cap applied to the audio the server normalizes for the user.
/// </summary>
public PlaybackStreamingQuality? StreamingQuality { get; set; }
/// <summary>
/// Gets or sets the direction in which each channel of the VU meter of the audio player grows.
/// </summary>
public VuMeterOrientation? VuMeterOrientation { get; set; } = Enums.AudioLibrary.VuMeterOrientation.Vertical;
/// <summary>
/// Gets or sets the number of segments each channel of the VU meter is divided into.
/// </summary>
public int? VuMeterSegmentCount { get; set; } = 12;
/// <summary>
/// Gets or sets the gap, in pixels, between the segments and the channels of the VU meter.
/// </summary>
public int? VuMeterSegmentGap { get; set; } = 1;
/// <summary>
/// Gets or sets the level, between 0 and 1, above which a segment of the VU meter is drawn with its medium state.
/// </summary>
public double? VuMeterMediumThreshold { get; set; } = 0.6;
/// <summary>
/// Gets or sets the level, between 0 and 1, above which a segment of the VU meter is drawn with its high state.
/// </summary>
public double? VuMeterHighThreshold { get; set; } = 0.8;
/// <summary>
/// Gets or sets whether the VU meter holds the peak level of each channel after it falls, or not.
/// </summary>
public bool? VuMeterShowPeak { get; set; } = true;
/// <summary>
/// Gets or sets the time, in milliseconds, a peak of the VU meter is held before it starts falling.
/// </summary>
public int? VuMeterPeakHoldDurationInMilliseconds { get; set; } = 650;
/// <summary>
/// Gets or sets the number of level units the display of the VU meter falls per second when the input level drops.
/// </summary>
public double? VuMeterReleasePerSecond { get; set; } = 3.0;
/// <summary>
/// Gets or sets the number of level units the peak of the VU meter falls per second after its hold time elapsed.
/// </summary>
public double? VuMeterPeakReleasePerSecond { get; set; } = 0.65;
}
@@ -0,0 +1,22 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.Enums.AudioLibrary;
/// <summary>
/// Enumeration for the direction in which each channel of the VU meter of the audio player grows.
/// </summary>
[DebuggerDisplay("{ToString()}")]
public enum VuMeterOrientation
{
/// <summary>
/// The channels of the meter are columns and their levels grow from bottom to top.
/// </summary>
Vertical,
/// <summary>
/// The channels of the meter are rows and their levels grow from left to right.
/// </summary>
Horizontal,
}