Skip to content

Commit

Permalink
build: implement hack to build in vscode 2022 (#800)
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzdan committed Jul 5, 2023
1 parent b602ba3 commit 8e1101c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
12 changes: 11 additions & 1 deletion buildWindows.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ import { spawnChecked, updateRepo } from "./replay_build_scripts/common.mjs";

updateRepo();

spawnChecked("node", ["build.js"], { stdio: "inherit" });
// TODO(dmiller): remove this hack when we switch to the new ci system
spawnChecked("git", ["apply", "replay_build_scripts/windows.patch"]);

try {
spawnChecked("node", ["build.js"], { stdio: "inherit" });
} finally {
spawnChecked("git", [
"checkout",
"media/audio/win/audio_low_latency_input_win.cc",
]);
}
4 changes: 0 additions & 4 deletions media/audio/win/audio_low_latency_input_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,6 @@ const char* EffectTypeToString(
return "DynamicRangeCompression";
case ABI::Windows::Media::Effects::AudioEffectType_FarFieldBeamForming:
return "FarFieldBeamForming";
#if _MSC_VER >= 1930 // Visual Studio 2022
case ABI::Windows::Media::Effects::AudioEffectType_DeepNoiseSuppression:
return "DeepNoise";
#endif
}
return "Unknown";
}
Expand Down
13 changes: 13 additions & 0 deletions replay_build_scripts/windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/media/audio/win/audio_low_latency_input_win.cc b/media/audio/win/audio_low_latency_input_win.cc
index 23372ebe4e4bf..95a7a69201875 100644
--- a/media/audio/win/audio_low_latency_input_win.cc
+++ b/media/audio/win/audio_low_latency_input_win.cc
@@ -193,6 +193,8 @@ const char* EffectTypeToString(
return "DynamicRangeCompression";
case ABI::Windows::Media::Effects::AudioEffectType_FarFieldBeamForming:
return "FarFieldBeamForming";
+ case ABI::Windows::Media::Effects::AudioEffectType_DeepNoiseSuppression:
+ return "DeepNoise";
}
return "Unknown";
}

0 comments on commit 8e1101c

Please sign in to comment.