Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context for this pull request: The powers of 2 shown here go up to 16384, and I wish to add a few more power of 2's worth of buffer sizes to the mix.
The Terrific Audio Driver by Undisbeliever calls
samples_fft_to_spectrum
when analyzing a BRR sample (this is created for the SPC700, which has a 64KB limit) by calculating a spectrum in one go (thus, if the samples are large enough they tend to request a buffer size large enough). This works fine up to 16384 samples, but a BRR sample can theoretically be as large as 116496 (though in practice it is usually smaller than this). The result is a panic.Context for the code in question:
https://github.com/undisbeliever/terrific-audio-driver/blob/241c53fa3706bc89f3190ab7627145c29122c9ce/crates/tad-gui/src/sample_analyser.rs#L926
The code was since amended to limit the analysis size to 16384 samples for the time being. I determined that microfft only goes up to 32768...