Skip to content

IAssetLoader.ReleaseSound(string) Method

Definition

Namespace: Brine2D.Assets

Decrements the direct-load reference count for the given sound effect. Each call to GetOrLoadSoundAsync(string, CancellationToken) adds one direct reference; call this method once per load to release it. The sound is unloaded and audio resources are freed only when both the direct count and all manifest references reach zero. Has no effect if the sound was only loaded via a manifest.

bool ReleaseSound(string path);

Parameters

path System.String

Returns

System.Boolean
true if the asset's total reference count reached zero and it was freed; false if still referenced or not a direct load.