X Tutup
Skip to content

Add one padding frame to QOA buffer for short streams#110515

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
DeeJayLSP:qoa-oob
Sep 16, 2025
Merged

Add one padding frame to QOA buffer for short streams#110515
Repiteo merged 1 commit intogodotengine:masterfrom
DeeJayLSP:qoa-oob

Conversation

@DeeJayLSP
Copy link
Contributor

@DeeJayLSP DeeJayLSP commented Sep 14, 2025

Fixes #110482.

The issue happens if the WAV file has a baked loop end right at the end of stream, and only if compress mode is set to FORMAT_QOA.

I have applied @bruvzg's solution. The padding frame should never be reached unless it's that specific case. Didn't notice any audible pops after this.

@DeeJayLSP DeeJayLSP requested a review from a team as a code owner September 14, 2025 14:35
@clayjohn clayjohn added bug topic:audio regression cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Sep 14, 2025
@clayjohn clayjohn added this to the 4.6 milestone Sep 14, 2025
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

The issue happens if the WAV file has a baked loop end right at the end of stream

If this is the reason for extra data, fix should be fine. But might be worth adding boundary check to the place it was crashing just in case.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected.

@Repiteo Repiteo merged commit fe5b8fc into godotengine:master Sep 16, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Sep 16, 2025

Thanks!

@Repiteo
Copy link
Contributor

Repiteo commented Sep 16, 2025

Cherry-picked to 4.5

@Repiteo Repiteo removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Sep 16, 2025
@DeeJayLSP DeeJayLSP deleted the qoa-oob branch September 16, 2025 15:48
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.

Godot 4.5-Beta1 to 4.5-RC2 crashes immediately when loading project

6 participants

X Tutup