Pooling - Axwabo/SecretLabNAudio GitHub Wiki

Pooling

Pooling (in general programming terms) is the process of reusing an already existing instance, thus saving the time that would be spent on instantiating a new object.

Use the SpeakerToyPool and AudioPlayerPool classes to pool speakers (and audio players )

Rent a SpeakerToy and return it to the pool after you're done using it. If you don't specify a controller ID or SpeakerSetting, they may be arbitrary. Make sure to specify them or set them after creation.

The NextAvailableId property returns the next free controller ID.

[!TIP] If playing a clip/stream once, you can use the PoolOnEnd on the AudioPlayer to automatically return it once playback finishes.