Make AudioTools compile when build from python:framework_bindings

PiperOrigin-RevId: 523158401
This commit is contained in:
Sebastian Schmidt 2023-04-10 10:58:21 -07:00 committed by Copybara-Service
parent b685f53c6b
commit e5f28bc136
2 changed files with 27 additions and 0 deletions

View File

@ -212,6 +212,9 @@ http_archive(
urls = ["https://github.com/google/multichannel-audio-tools/archive/1f6b1319f13282eda6ff1317be13de67f4723860.zip"], urls = ["https://github.com/google/multichannel-audio-tools/archive/1f6b1319f13282eda6ff1317be13de67f4723860.zip"],
sha256 = "fe346e1aee4f5069c4cbccb88706a9a2b2b4cf98aeb91ec1319be77e07dd7435", sha256 = "fe346e1aee4f5069c4cbccb88706a9a2b2b4cf98aeb91ec1319be77e07dd7435",
repo_mapping = {"@com_github_glog_glog" : "@com_github_glog_glog_no_gflags"}, repo_mapping = {"@com_github_glog_glog" : "@com_github_glog_glog_no_gflags"},
# TODO: Fix this in AudioTools directly
patches = ["@//third_party:com_google_audio_tools_fixes.diff"],
patch_args = ["-p1"]
) )
http_archive( http_archive(

View File

@ -0,0 +1,24 @@
diff --git a/audio/dsp/number_util.cc b/audio/dsp/number_util.cc
index 756e1f8..6a0c6d6 100644
--- a/audio/dsp/number_util.cc
+++ b/audio/dsp/number_util.cc
@@ -16,6 +16,7 @@
#include "audio/dsp/number_util.h"
+#include <algorithm>
#include <cmath>
#include <iomanip>
#include <limits>
diff --git a/audio/dsp/porting.cc b/audio/dsp/porting.cc
index e906d2d..753c286 100644
--- a/audio/dsp/porting.cc
+++ b/audio/dsp/porting.cc
@@ -16,6 +16,7 @@
#include "audio/dsp/porting.h"
+#include <algorithm>
#include <cfloat>
#include <cstdarg>