Interface IAudioPriorityCandidateSelector
Selects which currently playing audio slot should be reassigned to make room for a newly requested sound when the pool is full, according to an AudioPriorityPolicy.
Namespace: Serenity.AudioPlayer.Domain.Interfaces
Assembly: Serenity.AudioPlayer.Domain.dll
Syntax
public interface IAudioPriorityCandidateSelector
Methods
SelectReplacement(IReadOnlyList<AudioPlaybackCandidate>, int, AudioPriorityPolicy)
Chooses the least important replaceable candidate that satisfies the given policy.
Declaration
int SelectReplacement(IReadOnlyList<AudioPlaybackCandidate> activeCandidates, int requestedPriority, AudioPriorityPolicy policy)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<AudioPlaybackCandidate> | activeCandidates | Snapshots of the currently playing slots. |
| int | requestedPriority | Serenity priority of the sound being requested (higher = more important). |
| AudioPriorityPolicy | policy | Policy controlling which candidates are eligible. |
Returns
| Type | Description |
|---|---|
| int | The Index of the slot to reassign, or
|