Struct StereoFrame
- Namespace
- Sigil.Sound
- Assembly
- Sigil.Sound.dll
One stereo sample: a left and a right single-precision value. This is the unit every operator renders.
public readonly record struct StereoFrame : IEquatable<StereoFrame>Implements
Inherited Members
Constructors
StereoFrame(float, float)
One stereo sample: a left and a right single-precision value. This is the unit every operator renders.
public StereoFrame(float Left, float Right)Parameters
Fields
Silence
A frame with both channels at zero.
public static readonly StereoFrame SilenceField Value
Properties
Left
public float Left { get; init; }Property Value
Right
public float Right { get; init; }Property Value
Methods
Mono(float)
Creates a frame with the same value in both channels.
public static StereoFrame Mono(float value)Parameters
valuefloat
Returns
ToMono()
The center-mixed (mono) value of this frame.
public float ToMono()Returns
Operators
operator +(StereoFrame, StereoFrame)
Adds two frames channel by channel.
public static StereoFrame operator +(StereoFrame a, StereoFrame b)Parameters
Returns
operator /(StereoFrame, float)
Divides both channels by scalar.
public static StereoFrame operator /(StereoFrame a, float scalar)Parameters
aStereoFramescalarfloat
Returns
operator *(StereoFrame, float)
Scales both channels by scalar.
public static StereoFrame operator *(StereoFrame a, float scalar)Parameters
aStereoFramescalarfloat
Returns
operator *(float, StereoFrame)
Scales both channels by scalar.
public static StereoFrame operator *(float scalar, StereoFrame a)Parameters
scalarfloataStereoFrame
Returns
operator -(StereoFrame, StereoFrame)
Subtracts two frames channel by channel.
public static StereoFrame operator -(StereoFrame a, StereoFrame b)