Class VolumeMeter
- Assembly
- VisioForge.Core.dll
Professional audio volume meter control for real-time VU-style level indication in Windows Forms applications.
This control displays audio signal levels as a traditional VU meter with smooth visual response, suitable for audio monitoring in recording, mixing, and playback applications. It provides professional-grade level visualization with configurable decibel ranges and orientation.
Key features:
- Real-time audio level display with smooth updates
- Configurable decibel range (default: -60dB to +18dB)
- Horizontal and vertical orientation support
- Boost/gain multiplier for level scaling
- Optimized double-buffered rendering
- Customizable foreground color
- Professional audio standard compliance
Technical specifications:
- Default dB range: -60dB to +18dB (broadcast standard)
- Logarithmic level scaling for accurate dB representation
- Configurable boost multiplier (default: 1.0)
- Efficient GDI+ rendering with minimal allocations
Performance:
- Double-buffered to eliminate flicker
- Lightweight rectangular rendering
- Minimal CPU overhead during updates
- Efficient color brush management
Thread safety: Amplitude property updates trigger UI refresh. Can be set from any thread as invalidation is thread-safe.
public class VolumeMeter : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControlInheritance
Implements
Inherited Members
Constructors
VolumeMeter()
Initializes a new instance of the VisioForge.Core.UI.WinForms.VolumeMeterPro.VolumeMeter class.
public VolumeMeter()Properties
Amplitude
Gets or sets current value.
public float Amplitude { get; set; }Property Value
Boost
Gets or sets boost value.
public float Boost { get; set; }Property Value
MaxDb
Gets or sets maximum decibels.
public float MaxDb { get; set; }Property Value
MinDb
Gets or sets minimum decibels.
public float MinDb { get; set; }Property Value
Orientation
Gets or sets meter orientation.
public Orientation Orientation { get; set; }Property Value
Methods
Clear()
Clears and refreshes control.
public void Clear()Dispose(bool)
Clean up any resources being used.
protected override void Dispose(bool disposing)Parameters
disposingbool-
true if managed resources should be disposed; otherwise, false.
OnForeColorChanged(EventArgs)
OnForeColorChanged event.
protected override void OnForeColorChanged(EventArgs e)Parameters
eEventArgs-
Event args.
OnPaint(PaintEventArgs)
Paints the volume meter.
protected override void OnPaint(PaintEventArgs e)Parameters
ePaintEventArgs-
Event args.