AudioAPI reference
Struct PlayParameters
Namespace: MicroEngine.Audio
Assembly: MicroEngine.Audio.dll
Guide: Audio
How a sound plays.
public readonly struct PlayParameters : IEquatable<PlayParameters>Implements
Constructors
PlayParameters()
Creates the defaults: full volume, original pitch, centred, once, priority 0, on the “sfx” bus.
public PlayParameters()Properties
Bus
The bus the sound plays through (“sfx” by default; the engine also has “music” and “master”).
public string Bus { get; init; }Property Value
Loop
Whether the sound restarts when it reaches its end.
public bool Loop { get; init; }Property Value
Pan
Stereo position, 0 (left) to 1 (right); 0.5 is centred. Balance panning: the far side is attenuated.
public float Pan { get; init; }Property Value
Pitch
Playback speed factor, 1 for the original pitch (clamped to 0.01..100). Streams play at their own pitch.
public float Pitch { get; init; }Property Value
Priority
The voice policy’s rank: when every voice is busy, a new sound steals the oldest sound of the lowest priority, if that priority is not higher than its own; otherwise the new sound is refused.
public int Priority { get; init; }Property Value
Volume
Volume, 0..1 (clamped).
public float Volume { get; init; }Property Value
Methods
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(PlayParameters)
public bool Equals(PlayParameters other)Parameters
other PlayParameters
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(PlayParameters, PlayParameters)
public static bool operator ==(PlayParameters left, PlayParameters right)Parameters
left PlayParameters
right PlayParameters
Returns
operator !=(PlayParameters, PlayParameters)
public static bool operator !=(PlayParameters left, PlayParameters right)Parameters
left PlayParameters
right PlayParameters