Skip to content

ISoundLoader.UnloadSound(ISoundEffect) Method

Definition

Namespace: Brine2D.Audio

Unloads a sound effect and frees its resources. Implementations must be idempotent — calling this twice with the same instance must not throw or cause a double-free of native resources.

void UnloadSound(Brine2D.Audio.ISoundEffect sound);

Parameters

sound ISoundEffect

Remarks

Must be called from the game thread. Implementations stop and destroy any active tracks referencing the asset before freeing it. Calling this concurrently with playback methods that reference the same asset is not safe.