Repository navigation
Conversation
nBlockSize must be at least one video frame of samples; 1024 is too small for typical MLT rates and breaks quad shelf filters. Size it from max(samples, 100ms), re-Configure when mode, rate, or channel count change, and document the 5.1 VLC-to-ITU pointer mapping.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Buffer-stride mismatches corrupt audio, while repeated configuration introduces gain errors and memory leaks.
3 open issues
What changed in this PR
Updates MLT’s ambisonic decoder to accommodate frame-sized audio blocks and changing playback configurations.
Changes:
- Sizes processing buffers to at least one frame or 100 ms.
- Reconfigures processing when the cached setup no longer fits.
- Clarifies existing 5.1 channel-mapping comments without changing the mapping.
| File | Description |
|---|---|
| src/modules/spatialaudio/filter_ambisonic-decoder.cpp | Adds adaptive buffer sizing and configuration tracking; clarifies channel-order comments. |
Review effort: Balanced
Comment on lines
+152
to
+153
| if (!m_setup.fits(binaural, sampleRate, samples, channels)) | ||
| error = configure(binaural, sampleRate, blockSize, channels); |
| // Processing | ||
| if (!error) { | ||
| BFormat bformat; | ||
| bformat.Configure(AMBISONICS_ORDER, true, samples); |
| "failed to configure spatial audio processor\n"); | ||
| return true; | ||
| } | ||
| if (!zoomer.Configure(AMBISONICS_ORDER, true, blockSize, sampleRate)) { |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


nBlockSize must be at least one video frame of samples; 1024 is too small for typical MLT rates and breaks quad shelf filters. Size it from max(samples, 100ms), re-Configure when mode, rate, or channel count change, and document the 5.1 VLC-to-ITU pointer mapping.