Skip to content

Fix ambisonic-decoder Configure block size and layout changes. - #1346

Open
ddennedy wants to merge 1 commit into
masterfrom
ambisonic
Open

ddennedy wants to merge 1 commit into
masterfrom
ambisonic

Conversation

@ddennedy

Copy link
Copy Markdown
Member

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.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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

No deployments
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.

2 participants