Skip to content

Initialize uninitialized double values during gain calculation#1

Open
BrandenAvalonCx wants to merge 1 commit intopeterStitt:master-oldfrom
BrandenAvalonCx:master
Open

Initialize uninitialized double values during gain calculation#1
BrandenAvalonCx wants to merge 1 commit intopeterStitt:master-oldfrom
BrandenAvalonCx:master

Conversation

@BrandenAvalonCx
Copy link
Copy Markdown

When compiling for release using Clang 14.0.3, these 2 doubles are uninitialized, causing them to be arbitrary values, which leads to errors in the gain calculations. Note that I only encountered the problem on non-debug builds and only when panning to the stereo layout, debug builds and non-stereo layouts seem to work fine.

To reproduce the issue:

  • Configure an ADM renderer rendering to ITU_0_2_0
  • Create a single object taking a mono channel buffer
  • Create a mono channel buffer containing a sin wave with 1024 samples
  • Place the object at 0,0,0
  • Add the object + mono buffer to the renderer
  • Perform a render using GetRendererAudio
  • All values in the returned stereo channel buffer will be NaN

Initializing these uninitialized variables resolves the issue.

Working with libspatialaudio on Mac Sonoma 14.7.1, compiling with Clang 14.0.3.

Please let me know if I can provide any additional information, formatting, etc.

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.

1 participant