Skip to content

DirAC renderer uses wrong metadata read indexing for 2dir metadata

Basic info

  • Commit SHA: latest main, e.g., f3b4ed31
  • Platform: All

Bug description

There are in several places of DirAC renderer wrong indexing for metadata reading in use. Example below:

azimuth2 = hDirAC->azimuth2[direction_idx];

The correct indexing should use the circular buffer system introduced a long time ago. Example below:

azimuth2 = hDirAC->azimuth2[hDirAC->dirac_read_idx];

This affects mostly 2dir data but also some occurrences of coherence data reading were incorrect.

In practice, this bug has been there since the introduction of the circular buffer scheme but it only realised when MASA processing was moved to use the circular buffer scheme with the merge of issue #350 (closed). Before that merge, the indexing was matching by luck.

Ways to reproduce

Pick up the latest main and check the indices of, e.g., hDirAC->azimuth and hDirAC->azimuth2 using a debugger and input of 2dir MASA. Indices should match but they do not.

Edited by Tapani Pihlajakuja