Skip to content

Fix debug mode for audio filters example#226

Merged
Meziu merged 3 commits intomasterfrom
fix/debug-audio-example
Aug 23, 2025
Merged

Fix debug mode for audio filters example#226
Meziu merged 3 commits intomasterfrom
fix/debug-audio-example

Conversation

@Meziu
Copy link
Copy Markdown
Member

@Meziu Meziu commented Aug 12, 2025

Closes #221

The crash was caused by a stack overflow since the allocation was made with an incredibly long constant byte-buffer on the stack.
Instead, this fix uses Vec allocation and dynamic data insertion for a slimmer approach (that is also a bit more rusty) at the cost of needing a separate Buffer type with custom trait implementations.

Either way, filling the buffer is so slow in debug mode that I still needed to add a warning in case someone runs it in debug.

@Meziu Meziu requested a review from a team as a code owner August 12, 2025 15:35
@Meziu Meziu force-pushed the fix/debug-audio-example branch from 9f0d636 to 47f59ca Compare August 13, 2025 07:42
@Meziu Meziu merged commit 33da9d5 into master Aug 23, 2025
2 of 4 checks passed
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.

Stack dump in ctru-rs audio filters example

1 participant