mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-24 08:24:18 +00:00
externals: Update faad2 and remove SBR configuration workaround. (#7128)
This commit is contained in:
parent
1d4d421097
commit
4dd6e12e46
2 changed files with 7 additions and 21 deletions
26
externals/faad2/CMakeLists.txt
vendored
26
externals/faad2/CMakeLists.txt
vendored
|
@ -1,18 +1,5 @@
|
|||
# Copy source to build directory for some modifications.
|
||||
set(FAAD2_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/faad2/libfaad")
|
||||
if (NOT EXISTS "${FAAD2_SOURCE_DIR}")
|
||||
file(COPY faad2/libfaad/ DESTINATION "${FAAD2_SOURCE_DIR}/")
|
||||
|
||||
# These are fixed defines for some reason and not controllable with compile flags.
|
||||
file(READ "${FAAD2_SOURCE_DIR}/common.h" FAAD2_COMMON_H)
|
||||
# Disable SBR decoding since we don't want it for AAC-LC.
|
||||
string(REGEX REPLACE "#define SBR_DEC" "" FAAD2_COMMON_H "${FAAD2_COMMON_H}")
|
||||
# Disable PS decoding. This can cause mono to be upmixed to stereo, which we don't want.
|
||||
string(REGEX REPLACE "#define PS_DEC" "" FAAD2_COMMON_H "${FAAD2_COMMON_H}")
|
||||
file(WRITE "${FAAD2_SOURCE_DIR}/common.h" "${FAAD2_COMMON_H}")
|
||||
endif()
|
||||
|
||||
# Source list from faad2/libfaad/Makefile.am, cut down to just what we need for AAC-LC.
|
||||
# Sources cut down to just what we need for AAC-LC.
|
||||
set(FAAD2_SOURCE_DIR "faad2/libfaad")
|
||||
add_library(faad2 STATIC EXCLUDE_FROM_ALL
|
||||
"${FAAD2_SOURCE_DIR}/bits.c"
|
||||
"${FAAD2_SOURCE_DIR}/cfft.c"
|
||||
|
@ -37,10 +24,9 @@ target_include_directories(faad2 PUBLIC faad2/include PRIVATE "${FAAD2_SOURCE_DI
|
|||
|
||||
# Configure compile definitions.
|
||||
|
||||
# Read version from autoconf script for configuring constant.
|
||||
file(READ faad2/configure.ac CONFIGURE_SCRIPT)
|
||||
string(REGEX MATCH "AC_INIT\\(faad2, ([0-9.]+)\\)" _ ${CONFIGURE_SCRIPT})
|
||||
set(FAAD_VERSION ${CMAKE_MATCH_1})
|
||||
# Read version from properties file for configuring constant.
|
||||
file(READ faad2/properties.json FAAD_PROPERTIES_JSON)
|
||||
string(JSON FAAD_VERSION GET ${FAAD_PROPERTIES_JSON} PACKAGE_VERSION)
|
||||
message(STATUS "Building faad2 version ${FAAD_VERSION}")
|
||||
|
||||
# Check for functions and headers.
|
||||
|
@ -98,5 +84,5 @@ target_compile_definitions(faad2 PRIVATE
|
|||
-DHAVE_SYS_TYPES_H=${HAVE_SYS_TYPES_H}
|
||||
-DHAVE_UNISTD_H=${HAVE_UNISTD_H}
|
||||
# Only compile for AAC-LC decoding.
|
||||
-DLC_ONLY_DECODER
|
||||
-DLC_ONLY_DECODER -DDISABLE_SBR
|
||||
)
|
||||
|
|
2
externals/faad2/faad2
vendored
2
externals/faad2/faad2
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 3918dee56063500d0aa23d6c3c94b211ac471a8c
|
||||
Subproject commit 09b3c850c606e7fedd06597223e54344e8d23c8c
|
Loading…
Reference in a new issue