Skip to content

Use TightLocalVector for AudioStreamWAV/MP3 #107790

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

DeeJayLSP
Copy link
Contributor

@DeeJayLSP DeeJayLSP commented Jun 21, 2025

These data vectors are never resized except on instantiation, so we don't need them to be able to grow at a rate.

Not applicable to AudioStreamOggVorbis as it uses Vectors that are resized.

Made this partially in response to a regression from #104522 that has already been addressed. Resize on instantiation shouldn't be different between LocalVector and TightLocalVector. Still keeping it open for future codestyle purposes.

@clayjohn
Copy link
Member

Looks good to me. I double checked all the uses of those vectors and confirm that they are all sized once and then re-used. So TightLocalVector makes sense and should save a bit of memory

@clayjohn clayjohn modified the milestones: 4.x, 4.5 Jun 23, 2025
@Repiteo Repiteo merged commit 5cf0092 into godotengine:master Jun 24, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jun 24, 2025

Thanks!

@DeeJayLSP DeeJayLSP deleted the tight-audio-data branch June 24, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants