Skip to content

Conversation

@Phoenix-Starlight
Copy link
Contributor

Implements dynamic sound (un)loading. Why? Because sound buffers are never unloaded and forever persist until exit or some trigger to release the buffers (reload).

@Phoenix-Starlight Phoenix-Starlight force-pushed the dev/1.16/dynamic-sounds branch 2 times, most recently from 4ae9418 to b2104ad Compare September 3, 2023 23:50
Copy link
Owner

@embeddedt embeddedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do some testing before merging it but looks reasonable.

@embeddedt
Copy link
Owner

Had another thought: is maximumSize needed? Any new access to the cache will trigger removal of any expired entries, so we shouldn't need to cap the size ourselves.

@Phoenix-Starlight
Copy link
Contributor Author

Phoenix-Starlight commented Sep 18, 2023 via email

If limit+1 sounds get loaded the buffer deletion can fail due to it being bound to a source but not played yet. Also fixes a leak.
@embeddedt embeddedt merged commit 803aaba into embeddedt:1.16 Oct 7, 2023
@Phoenix-Starlight Phoenix-Starlight deleted the dev/1.16/dynamic-sounds branch October 11, 2023 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants