Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include(FetchContent)
FetchContent_Declare(
absl
GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
GIT_TAG d38452e1ee03523a208362186fd42248ff2609f6
GIT_TAG 20250512.1
)
FetchContent_MakeAvailable(absl)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

#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!


namespace obr {
namespace filter_files {

// clang-format off
std::vector<unsigned char> BinauralFilters1OAAmbientL() {
return {
std::span<const unsigned char> BinauralFilters1OAAmbientL() {
static const unsigned char kDataArray[] = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x00, 0x01, 0x00, 0x57, 0x41, 0x56, 0x45,
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
0x80, 0xbb, 0x00, 0x00, 0x00, 0xdc, 0x05, 0x00, 0x08, 0x00, 0x10, 0x00,
Expand Down Expand Up @@ -5482,6 +5482,7 @@ std::vector<unsigned char> BinauralFilters1OAAmbientL() {
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
};
return kDataArray;
}
// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#ifndef BINAURAL_FILTERS_1_OA_AMBIENT_L_H_
#define BINAURAL_FILTERS_1_OA_AMBIENT_L_H_

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

std::vector<unsigned char> BinauralFilters1OAAmbientL();
std::span<const unsigned char> BinauralFilters1OAAmbientL();

} // namespace filter_files
} // namespace obr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

#include "binaural_filters_1_oa_ambient_r.h"

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

// clang-format off
std::vector<unsigned char> BinauralFilters1OAAmbientR() {
return {
std::span<const unsigned char> BinauralFilters1OAAmbientR() {
static const unsigned char kDataArray[] = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x00, 0x01, 0x00, 0x57, 0x41, 0x56, 0x45,
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
0x80, 0xbb, 0x00, 0x00, 0x00, 0xdc, 0x05, 0x00, 0x08, 0x00, 0x10, 0x00,
Expand Down Expand Up @@ -5482,6 +5482,7 @@ std::vector<unsigned char> BinauralFilters1OAAmbientR() {
0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
};
return kDataArray;
}
// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#ifndef BINAURAL_FILTERS_1_OA_AMBIENT_R_H_
#define BINAURAL_FILTERS_1_OA_AMBIENT_R_H_

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

std::vector<unsigned char> BinauralFilters1OAAmbientR();
std::span<const unsigned char> BinauralFilters1OAAmbientR();

} // namespace filter_files
} // namespace obr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

#include "binaural_filters_1_oa_direct_l.h"

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

// clang-format off
std::vector<unsigned char> BinauralFilters1OADirectL() {
return {
std::span<const unsigned char> BinauralFilters1OADirectL() {
static const unsigned char kDataArray[] = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x08, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45,
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
0x80, 0xbb, 0x00, 0x00, 0x00, 0xdc, 0x05, 0x00, 0x08, 0x00, 0x10, 0x00,
Expand Down Expand Up @@ -192,6 +192,7 @@ std::vector<unsigned char> BinauralFilters1OADirectL() {
0xfe, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00,
0xff, 0xff, 0x00, 0x00,
};
return kDataArray;
}
// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#ifndef BINAURAL_FILTERS_1_OA_DIRECT_L_H_
#define BINAURAL_FILTERS_1_OA_DIRECT_L_H_

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

std::vector<unsigned char> BinauralFilters1OADirectL();
std::span<const unsigned char> BinauralFilters1OADirectL();

} // namespace filter_files
} // namespace obr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

#include "binaural_filters_1_oa_direct_r.h"

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

// clang-format off
std::vector<unsigned char> BinauralFilters1OADirectR() {
return {
std::span<const unsigned char> BinauralFilters1OADirectR() {
static const unsigned char kDataArray[] = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x08, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45,
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
0x80, 0xbb, 0x00, 0x00, 0x00, 0xdc, 0x05, 0x00, 0x08, 0x00, 0x10, 0x00,
Expand Down Expand Up @@ -192,6 +192,7 @@ std::vector<unsigned char> BinauralFilters1OADirectR() {
0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
0xff, 0xff, 0x00, 0x00,
};
return kDataArray;
}
// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#ifndef BINAURAL_FILTERS_1_OA_DIRECT_R_H_
#define BINAURAL_FILTERS_1_OA_DIRECT_R_H_

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

std::vector<unsigned char> BinauralFilters1OADirectR();
std::span<const unsigned char> BinauralFilters1OADirectR();

} // namespace filter_files
} // namespace obr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

#include "binaural_filters_1_oa_reverberant_l.h"

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

// clang-format off
std::vector<unsigned char> BinauralFilters1OAReverberantL() {
return {
std::span<const unsigned char> BinauralFilters1OAReverberantL() {
static const unsigned char kDataArray[] = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x00, 0x01, 0x00, 0x57, 0x41, 0x56, 0x45,
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
0x80, 0xbb, 0x00, 0x00, 0x00, 0xdc, 0x05, 0x00, 0x08, 0x00, 0x10, 0x00,
Expand Down Expand Up @@ -5482,6 +5482,7 @@ std::vector<unsigned char> BinauralFilters1OAReverberantL() {
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
};
return kDataArray;
}
// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#ifndef BINAURAL_FILTERS_1_OA_REVERBERANT_L_H_
#define BINAURAL_FILTERS_1_OA_REVERBERANT_L_H_

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

std::vector<unsigned char> BinauralFilters1OAReverberantL();
std::span<const unsigned char> BinauralFilters1OAReverberantL();

} // namespace filter_files
} // namespace obr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

#include "binaural_filters_1_oa_reverberant_r.h"

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

// clang-format off
std::vector<unsigned char> BinauralFilters1OAReverberantR() {
return {
std::span<const unsigned char> BinauralFilters1OAReverberantR() {
static const unsigned char kDataArray[] = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x00, 0x01, 0x00, 0x57, 0x41, 0x56, 0x45,
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
0x80, 0xbb, 0x00, 0x00, 0x00, 0xdc, 0x05, 0x00, 0x08, 0x00, 0x10, 0x00,
Expand Down Expand Up @@ -5482,6 +5482,7 @@ std::vector<unsigned char> BinauralFilters1OAReverberantR() {
0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
};
return kDataArray;
}
// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#ifndef BINAURAL_FILTERS_1_OA_REVERBERANT_R_H_
#define BINAURAL_FILTERS_1_OA_REVERBERANT_R_H_

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

std::vector<unsigned char> BinauralFilters1OAReverberantR();
std::span<const unsigned char> BinauralFilters1OAReverberantR();

} // namespace filter_files
} // namespace obr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

#include "binaural_filters_2_oa_ambient_l.h"

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

// clang-format off
std::vector<unsigned char> BinauralFilters2OAAmbientL() {
return {
std::span<const unsigned char> BinauralFilters2OAAmbientL() {
static const unsigned char kDataArray[] = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x40, 0x02, 0x00, 0x57, 0x41, 0x56, 0x45,
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
0x80, 0xbb, 0x00, 0x00, 0x00, 0x2f, 0x0d, 0x00, 0x12, 0x00, 0x10, 0x00,
Expand Down Expand Up @@ -12309,6 +12309,7 @@ std::vector<unsigned char> BinauralFilters2OAAmbientL() {
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
};
return kDataArray;
}
// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#ifndef BINAURAL_FILTERS_2_OA_AMBIENT_L_H_
#define BINAURAL_FILTERS_2_OA_AMBIENT_L_H_

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

std::vector<unsigned char> BinauralFilters2OAAmbientL();
std::span<const unsigned char> BinauralFilters2OAAmbientL();

} // namespace filter_files
} // namespace obr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

#include "binaural_filters_2_oa_ambient_r.h"

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

// clang-format off
std::vector<unsigned char> BinauralFilters2OAAmbientR() {
return {
std::span<const unsigned char> BinauralFilters2OAAmbientR() {
static const unsigned char kDataArray[] = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x40, 0x02, 0x00, 0x57, 0x41, 0x56, 0x45,
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
0x80, 0xbb, 0x00, 0x00, 0x00, 0x2f, 0x0d, 0x00, 0x12, 0x00, 0x10, 0x00,
Expand Down Expand Up @@ -12309,6 +12309,7 @@ std::vector<unsigned char> BinauralFilters2OAAmbientR() {
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
};
return kDataArray;
}
// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#ifndef BINAURAL_FILTERS_2_OA_AMBIENT_R_H_
#define BINAURAL_FILTERS_2_OA_AMBIENT_R_H_

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

std::vector<unsigned char> BinauralFilters2OAAmbientR();
std::span<const unsigned char> BinauralFilters2OAAmbientR();

} // namespace filter_files
} // namespace obr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

#include "binaural_filters_2_oa_direct_l.h"

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

// clang-format off
std::vector<unsigned char> BinauralFilters2OADirectL() {
return {
std::span<const unsigned char> BinauralFilters2OADirectL() {
static const unsigned char kDataArray[] = {
0x52, 0x49, 0x46, 0x46, 0x24, 0x12, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45,
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
0x80, 0xbb, 0x00, 0x00, 0x00, 0x2f, 0x0d, 0x00, 0x12, 0x00, 0x10, 0x00,
Expand Down Expand Up @@ -405,6 +405,7 @@ std::vector<unsigned char> BinauralFilters2OADirectL() {
0x01, 0x00, 0xfd, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff,
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
};
return kDataArray;
}
// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#ifndef BINAURAL_FILTERS_2_OA_DIRECT_L_H_
#define BINAURAL_FILTERS_2_OA_DIRECT_L_H_

#include <vector>
#include <span>

namespace obr {
namespace filter_files {

std::vector<unsigned char> BinauralFilters2OADirectL();
std::span<const unsigned char> BinauralFilters2OADirectL();

} // namespace filter_files
} // namespace obr
Expand Down
Loading
Loading