Skip to content

Conversation

@BrandenAvalonCx
Copy link

Two suggested changes here:

Roll back to Abseil version 20250512.1 to maintain compatibility with the Protocol Buffer library.

  • Protocol Buffer uses Abseil version 20250512.1, and CMake based builds using both libraries can not combine them as they fetch different versions of Abseil

Move filters to std::spans

  • The std::vector BinauralFilters1OAAmbientL() { data ) initialization causes data to be allocated onto the stack
  • This in turn causes a stackoverflow in cases where multiple filters are needed. For example, in the Eclipsa project we use multiple binuaural renderers for computing loudness.
  • static const unsigned char kDataArray[] embeds the data in the library itself
  • std::span initialization uses the data directly rather then performing a copy of the data into a vector on the stack

#include "binaural_filters_1_oa_ambient_l.h"

#include <vector>
#include <span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like the direction of eliminating redundant allocation. I just have one ask: can we use absl::Span instead of std::span? Functionally they are almost identical, it's just a preference for code inside Google. Thanks!

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