Class CrossfadeOptions
Per-player crossfade configuration, applied with SetCrossfadeAsync(CrossfadeOptions?, CancellationToken).
public sealed record CrossfadeOptions : IEquatable<CrossfadeOptions>
- Inheritance
-
CrossfadeOptions
- Implements
- Inherited Members
Remarks
Null members fall back to the server defaults (5 s sinusoidal preload, 250 ms minimum buffer), except that a null Enabled leaves the crossfade off, so set it explicitly. NodeLink only.
The null-duration default is the 5 s only on a node whose runtime crossfade holds a duration. A node configured through its own config file echoes that partial configuration, where an enabled crossfade with a null duration is left disabled at runtime.
Properties
BufferMilliseconds
Extra crossfade PCM buffer, in milliseconds, 0-30000, the server already retains twice the duration plus 4 s (capped at 16 s), so lower values are no-ops.
[JsonPropertyName("bufferMs")]
[JsonConverter(typeof(RoundedInt32Converter))]
public int? BufferMilliseconds { get; init; }
Property Value
- int?
Curve
The curve the crossfade follows, null keeps the server default.
[JsonPropertyName("curve")]
public CrossfadeCurve? Curve { get; init; }
Property Value
DurationMilliseconds
Crossfade duration in milliseconds, the server clamps it to 0-30000, 0 leaves the crossfade disabled at runtime even when enabled.
[JsonPropertyName("duration")]
[JsonConverter(typeof(RoundedInt32Converter))]
public int? DurationMilliseconds { get; init; }
Property Value
- int?
Enabled
Whether the ends of consecutive tracks overlap into a crossfade.
[JsonPropertyName("enabled")]
public bool? Enabled { get; init; }
Property Value
- bool?
Remarks
Left null the crossfade stays off, set it explicitly.
MinimumBufferMilliseconds
Minimum PCM the server buffers from the next track before a crossfade may start, in milliseconds, 20-30000, the activation threshold saturates at 2 s, so this mainly sets the stream-mode retention floor.
[JsonPropertyName("minBufferMs")]
[JsonConverter(typeof(RoundedInt32Converter))]
public int? MinimumBufferMilliseconds { get; init; }
Property Value
- int?
Mode
The mode the crossfade runs in, null keeps the server default.
[JsonPropertyName("mode")]
public CrossfadeMode? Mode { get; init; }