mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 05:33:11 +00:00
7f6b62cef0
Since the new audio system in 3.0 we switched the OGG support to stb_vorbis, and the Opus stream support was disabled as incompatible (see #7496). We still build the libraries as they are needed by the theora and webm modules, but we don't need any Godot code apart from `register_types`. Fixes #7496.
58 lines
1.3 KiB
Python
58 lines
1.3 KiB
Python
#!/usr/bin/env python
|
|
|
|
Import('env')
|
|
Import('env_modules')
|
|
|
|
# Only kept to build the thirdparty library used by the theora and webm
|
|
# modules. We now use stb_vorbis for AudioStreamOGGVorbis.
|
|
|
|
env_vorbis = env_modules.Clone()
|
|
|
|
stub = True
|
|
|
|
# Thirdparty source files
|
|
if env['builtin_libvorbis']:
|
|
thirdparty_dir = "#thirdparty/libvorbis/"
|
|
thirdparty_sources = [
|
|
#"analysis.c",
|
|
#"barkmel.c",
|
|
"bitrate.c",
|
|
"block.c",
|
|
"codebook.c",
|
|
"envelope.c",
|
|
"floor0.c",
|
|
"floor1.c",
|
|
"info.c",
|
|
"lookup.c",
|
|
"lpc.c",
|
|
"lsp.c",
|
|
"mapping0.c",
|
|
"mdct.c",
|
|
"psy.c",
|
|
#"psytune.c",
|
|
"registry.c",
|
|
"res0.c",
|
|
"sharedbook.c",
|
|
"smallft.c",
|
|
"synthesis.c",
|
|
#"tone.c",
|
|
#"vorbisenc.c",
|
|
"vorbisfile.c",
|
|
"window.c",
|
|
]
|
|
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
|
|
env_vorbis.Prepend(CPPPATH=[thirdparty_dir])
|
|
|
|
# also requires libogg
|
|
if env['builtin_libogg']:
|
|
env_vorbis.Prepend(CPPPATH=["#thirdparty/libogg"])
|
|
|
|
env_thirdparty = env_vorbis.Clone()
|
|
env_thirdparty.disable_warnings()
|
|
env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
|
|
|
|
# Module files
|
|
env_vorbis.add_source_files(env.modules_sources, "register_types.cpp")
|