Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit f75fde7

Browse files
authored
Add fake audio support for build-win.py. (#710)
1 parent db2052c commit f75fde7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/build-win.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
]
3434

3535

36-
def gngen(arch, sio_root, ffmpeg_root, ssl_root, msdk_root, quic_root, scheme, tests, runtime, cg_server, cg_client):
36+
def gngen(arch, sio_root, ffmpeg_root, ssl_root, msdk_root, quic_root, scheme, tests, runtime, cg_server, cg_client, fake_audio):
3737
gn_args = list(GN_ARGS)
3838
gn_args.append('target_cpu="%s"' % arch)
3939
using_llvm = False
@@ -99,6 +99,8 @@ def gngen(arch, sio_root, ffmpeg_root, ssl_root, msdk_root, quic_root, scheme, t
9999
gn_args.append('rtc_use_h264=true')
100100
if msdk_root or cg_server:
101101
gn_args.append('rtc_use_h265=true')
102+
if fake_audio:
103+
gn_args.append('rtc_include_internal_audio_device=false')
102104
flattened_args = ' '.join(gn_args)
103105
ret = subprocess.call(['gn.bat', 'gen', getoutputpath(arch, scheme), '--args=%s' % flattened_args],
104106
cwd=HOME_PATH, shell=False)
@@ -200,6 +202,8 @@ def main():
200202
help='Deprecated. Please use cg_server instead.', action='store_true')
201203
parser.add_argument('--cg_client', default=False,
202204
help='Build for cloud gaming client. This option is not intended to be used in general purpose. Setting to true may result unexpected behaviors. Default to false.', action='store_true')
205+
parser.add_argument('--fake_audio', default=False, action='store_true',
206+
help='Use fake audio device.')
203207
opts = parser.parse_args()
204208
if opts.cg_server and opts.cg_client:
205209
print('Cannot build for both cloud gaming server and client.')
@@ -222,7 +226,7 @@ def main():
222226
return 1
223227
if opts.gn_gen:
224228
if not gngen(opts.arch, opts.sio_root, opts.ffmpeg_root, opts.ssl_root, opts.msdk_root, opts.quic_root,
225-
opts.scheme, opts.tests, opts.runtime, opts.cg_server, opts.cg_client):
229+
opts.scheme, opts.tests, opts.runtime, opts.cg_server, opts.cg_client, opts.fake_audio):
226230
return 1
227231
if opts.sdk:
228232
if not ninjabuild(opts.arch, opts.scheme):

0 commit comments

Comments
 (0)