Table of Contents

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

Left float
Right float

Fields

Silence

A frame with both channels at zero.

public static readonly StereoFrame Silence

Field Value

StereoFrame

Properties

Left

public float Left { get; init; }

Property Value

float

Right

public float Right { get; init; }

Property Value

float

Methods

Mono(float)

Creates a frame with the same value in both channels.

public static StereoFrame Mono(float value)

Parameters

value float

Returns

StereoFrame

ToMono()

The center-mixed (mono) value of this frame.

public float ToMono()

Returns

float

Operators

operator +(StereoFrame, StereoFrame)

Adds two frames channel by channel.

public static StereoFrame operator +(StereoFrame a, StereoFrame b)

Parameters

a StereoFrame
b StereoFrame

Returns

StereoFrame

operator /(StereoFrame, float)

Divides both channels by scalar.

public static StereoFrame operator /(StereoFrame a, float scalar)

Parameters

a StereoFrame
scalar float

Returns

StereoFrame

operator *(StereoFrame, float)

Scales both channels by scalar.

public static StereoFrame operator *(StereoFrame a, float scalar)

Parameters

a StereoFrame
scalar float

Returns

StereoFrame

operator *(float, StereoFrame)

Scales both channels by scalar.

public static StereoFrame operator *(float scalar, StereoFrame a)

Parameters

scalar float
a StereoFrame

Returns

StereoFrame

operator -(StereoFrame, StereoFrame)

Subtracts two frames channel by channel.

public static StereoFrame operator -(StereoFrame a, StereoFrame b)

Parameters

a StereoFrame
b StereoFrame

Returns

StereoFrame