Personalization - Axwabo/SecretLabNAudio GitHub Wiki
Use cases include (but are not limited to) setting volume per player preferences, or environment-based loudness.
Note
Settings are tied to Player instances. You have to manage rejoining players yourself.
Settings are cleared when the speaker is pooled
You can access per-player settings by using the indexer: personalization[player]
Add the SpeakerPersonalization component to a SpeakerToy to configure different settings per player.
Add Empty Personalization
using SecretLabNAudio.Core.Extensions;
speaker.AddPersonalization();
speaker.WithPersonalization(personalization =>
{
// configure
});The above extension methods can be used on audio players and SpeakerToys.
Tip
See also: example live personalized send engine
Tip
Use SpeakerSettings.From(personalization) with { /* modified properties */} to only change certain properties.
Sets the speaker settings for the given player.
Modifies the current settings for the given player based on a delegate that transforms settings. The current settings are null if there's no override set for the player.
Clears the override for the given player and sends the default settings.