Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio Buffers Freeing Up #5562

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Audio Buffers Freeing Up #5562

wants to merge 6 commits into from

Conversation

Sh18RW
Copy link

@Sh18RW Sh18RW commented Dec 17, 2024

This PR destined to solve #5306 issue
I don't know what realisation should be, but PJB tried to explain it to me and I tried to make it.

The main problem is that we cannot be sure that the buffer is never used anywhere else. For this reason, in order to ensure the safety of the buffer, I have decided to save a values array and upload it to the buffer when it is used. But there is another problem. We can upload audio files multiple times, and each time we save the audio to the memory. Maybe we should have another dictionary to save "string key as name and IClydeHandle as value" and audio files with the same name should be saved only once. However, if the name is the same, it does not tell us that the content is the same. In this case, we can replace older content by new and give a work to GC.

It should be modified, but I need your advice.

@Sh18RW
Copy link
Author

Sh18RW commented Dec 17, 2024

I am so sorry for my English...

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.

1 participant