Skip to content

Commit

Permalink
deps: update flac to 1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Jun 23, 2023
1 parent 0691f39 commit e621be5
Show file tree
Hide file tree
Showing 14 changed files with 99 additions and 83 deletions.
2 changes: 1 addition & 1 deletion deps/flac/include/FLAC/all.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2022 Xiph.Org Foundation
* Copyright (C) 2011-2023 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down
7 changes: 6 additions & 1 deletion deps/flac/include/FLAC/assert.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2001-2009 Josh Coalson
* Copyright (C) 2011-2022 Xiph.Org Foundation
* Copyright (C) 2011-2023 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -34,6 +34,10 @@
#define FLAC__ASSERT_H

/* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#define FLAC__ASSERT(x) if(!(x)) __builtin_abort();
#define FLAC__ASSERT_DECLARATION(x) x
#else
#ifndef NDEBUG
#include <assert.h>
#define FLAC__ASSERT(x) assert(x)
Expand All @@ -42,5 +46,6 @@
#define FLAC__ASSERT(x)
#define FLAC__ASSERT_DECLARATION(x)
#endif
#endif

#endif
9 changes: 7 additions & 2 deletions deps/flac/include/FLAC/callback.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2004-2009 Josh Coalson
* Copyright (C) 2011-2022 Xiph.Org Foundation
* Copyright (C) 2011-2023 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -90,7 +90,9 @@ typedef void* FLAC__IOHandle;

/** Signature for the read callback.
* The signature and semantics match POSIX fread() implementations
* and can generally be used interchangeably.
* and can generally be used interchangeably. Note that the global
* variable errno from errno.h is read by some libFLAC functions to
* detect read errors.
*
* \param ptr The address of the read buffer.
* \param size The size of the records to be read.
Expand Down Expand Up @@ -166,6 +168,9 @@ typedef int (*FLAC__IOCallback_Close) (FLAC__IOHandle handle);
*
* If the seek requirement for an interface is optional, you can signify that
* a data source is not seekable by setting the \a seek field to \c NULL.
*
* See the detailed documentation for callbacks in the
* \link flac_callbacks callbacks \endlink module.
*/
typedef struct {
FLAC__IOCallback_Read read; /**< See FLAC__IOCallbacks */
Expand Down
6 changes: 3 additions & 3 deletions deps/flac/include/FLAC/export.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2022 Xiph.Org Foundation
* Copyright (C) 2011-2023 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -95,9 +95,9 @@
/** These \#defines will mirror the libtool-based library version number, see
* http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
*/
#define FLAC_API_VERSION_CURRENT 12
#define FLAC_API_VERSION_CURRENT 13
#define FLAC_API_VERSION_REVISION 0 /**< see above */
#define FLAC_API_VERSION_AGE 0 /**< see above */
#define FLAC_API_VERSION_AGE 1 /**< see above */

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion deps/flac/include/FLAC/format.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2022 Xiph.Org Foundation
* Copyright (C) 2011-2023 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down
30 changes: 29 additions & 1 deletion deps/flac/include/FLAC/metadata.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2001-2009 Josh Coalson
* Copyright (C) 2011-2022 Xiph.Org Foundation
* Copyright (C) 2011-2023 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -2197,6 +2197,34 @@ FLAC_API FLAC__bool FLAC__metadata_object_picture_set_data(FLAC__StreamMetadata
*/
FLAC_API FLAC__bool FLAC__metadata_object_picture_is_legal(const FLAC__StreamMetadata *object, const char **violation);


/** Get the raw (binary) representation of a FLAC__StreamMetadata objeect.
* After use, free() the returned buffer. The length of the buffer is
* the length of the input metadata object plus 4 bytes for the header.
*
* \param object A pointer to metadata block to be converted.
* \assert
* \code object != NULL \endcode
* \retval FLAC__byte*
* \c NULL if there was an error, else a pointer to a buffer holding
* the requested data.
*/
FLAC_API FLAC__byte * FLAC__metadata_object_get_raw(const FLAC__StreamMetadata *object);


/** Turn a raw (binary) representation into a FLAC__StreamMetadata objeect.
* The returned object must be deleted with FLAC__metadata_object_delete()
* after use.
*
* \param buffer A pointer to a buffer containing a binary representation
* to be converted to a FLAC__StreamMetadata object
* \param length The length of the supplied buffer
* \retval FLAC__StreamMetadata*
* \c NULL if there was an error, else a pointer to a FLAC__StreamMetadata
* holding the requested data.
*/

FLAC_API FLAC__StreamMetadata * FLAC__metadata_object_set_raw(FLAC__byte *buffer, FLAC__uint32 length);
/* \} */

#ifdef __cplusplus
Expand Down
36 changes: 3 additions & 33 deletions deps/flac/include/FLAC/ordinals.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2022 Xiph.Org Foundation
* Copyright (C) 2011-2023 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -33,26 +33,10 @@
#ifndef FLAC__ORDINALS_H
#define FLAC__ORDINALS_H

#if defined(_MSC_VER) && _MSC_VER < 1600

/* Microsoft Visual Studio earlier than the 2010 version did not provide
* the 1999 ISO C Standard header file <stdint.h>.
*/

typedef signed __int8 FLAC__int8;
typedef signed __int16 FLAC__int16;
typedef signed __int32 FLAC__int32;
typedef signed __int64 FLAC__int64;
typedef unsigned __int8 FLAC__uint8;
typedef unsigned __int16 FLAC__uint16;
typedef unsigned __int32 FLAC__uint32;
typedef unsigned __int64 FLAC__uint64;

#else

/* For MSVC 2010 and everything else which provides <stdint.h>. */
/* This of course assumes C99 headers */

#include <stdint.h>
#include <stdbool.h>

typedef int8_t FLAC__int8;
typedef uint8_t FLAC__uint8;
Expand All @@ -64,22 +48,8 @@ typedef uint16_t FLAC__uint16;
typedef uint32_t FLAC__uint32;
typedef uint64_t FLAC__uint64;

#endif

typedef int FLAC__bool;

typedef FLAC__uint8 FLAC__byte;


#ifdef true
#undef true
#endif
#ifdef false
#undef false
#endif
#ifndef __cplusplus
#define true 1
#define false 0
#endif

#endif
2 changes: 1 addition & 1 deletion deps/flac/include/FLAC/stream_decoder.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2022 Xiph.Org Foundation
* Copyright (C) 2011-2023 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down
4 changes: 2 additions & 2 deletions deps/flac/include/FLAC/stream_encoder.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
* Copyright (C) 2000-2009 Josh Coalson
* Copyright (C) 2011-2022 Xiph.Org Foundation
* Copyright (C) 2011-2023 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -850,7 +850,7 @@ FLAC_API FLAC__bool FLAC__stream_encoder_set_sample_rate(FLAC__StreamEncoder *en
* <tr> <td><b>5</b></td> <td>true</td> <td>false</td> <td>tukey(0.5)</td> <td>8</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>5</td> <td>0</td> </tr>
* <tr> <td><b>6</b></td> <td>true</td> <td>false</td> <td>subdivide_tukey(2)</td> <td>8</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>
* <tr> <td><b>7</b></td> <td>true</td> <td>false</td> <td>subdivide_tukey(2)</td> <td>12</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>
* <tr> <td><b>8</b></td> <td>true</td> <td>false</td> <td>subdivide_tukey(2)</td> <td>12</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>
* <tr> <td><b>8</b></td> <td>true</td> <td>false</td> <td>subdivide_tukey(3)</td> <td>12</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>
* </table>
*
* \default \c 5
Expand Down
2 changes: 1 addition & 1 deletion deps/flac/lib/cmake/FLAC/flac-config-version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
# The variable CVF_VERSION must be set before calling configure_file().

set(PACKAGE_VERSION "1.4.2")
set(PACKAGE_VERSION "1.4.3")

if (PACKAGE_FIND_VERSION_RANGE)
# Package version must be in the requested version range
Expand Down
4 changes: 2 additions & 2 deletions deps/flac/lib/cmake/FLAC/targets-release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ set_target_properties(FLAC::FLAC PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libFLAC.a"
)

list(APPEND _IMPORT_CHECK_TARGETS FLAC::FLAC )
list(APPEND _IMPORT_CHECK_FILES_FOR_FLAC::FLAC "${_IMPORT_PREFIX}/lib/libFLAC.a" )
list(APPEND _cmake_import_check_targets FLAC::FLAC )
list(APPEND _cmake_import_check_files_for_FLAC::FLAC "${_IMPORT_PREFIX}/lib/libFLAC.a" )

# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
76 changes: 42 additions & 34 deletions deps/flac/lib/cmake/FLAC/targets.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Generated by CMake

if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
message(FATAL_ERROR "CMake >= 2.6.0 required")
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.6...3.19)
cmake_policy(VERSION 2.8.3...3.23)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
Expand All @@ -13,32 +16,34 @@ cmake_policy(VERSION 2.6...3.19)
set(CMAKE_IMPORT_FILE_VERSION 1)

# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_targetsDefined)
set(_targetsNotDefined)
set(_expectedTargets)
foreach(_expectedTarget FLAC::FLAC)
list(APPEND _expectedTargets ${_expectedTarget})
if(NOT TARGET ${_expectedTarget})
list(APPEND _targetsNotDefined ${_expectedTarget})
endif()
if(TARGET ${_expectedTarget})
list(APPEND _targetsDefined ${_expectedTarget})
set(_cmake_targets_defined "")
set(_cmake_targets_not_defined "")
set(_cmake_expected_targets "")
foreach(_cmake_expected_target IN ITEMS FLAC::FLAC)
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(TARGET "${_cmake_expected_target}")
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
else()
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
endif()
endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
set(CMAKE_IMPORT_FILE_VERSION)
unset(_cmake_expected_target)
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT "${_targetsDefined}" STREQUAL "")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
if(NOT _cmake_targets_defined STREQUAL "")
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif()
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)


# Compute the installation prefix relative to this file.
Expand All @@ -64,21 +69,22 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12)
endif()

# Load information for each installed configuration.
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file(GLOB CONFIG_FILES "${_DIR}/targets-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/targets-*.cmake")
foreach(_cmake_config_file IN LISTS _cmake_config_files)
include("${_cmake_config_file}")
endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)

# Cleanup temporary variables.
set(_IMPORT_PREFIX)

# Loop over all imported files and verify that they actually exist
foreach(target ${_IMPORT_CHECK_TARGETS} )
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
if(NOT EXISTS "${file}" )
message(FATAL_ERROR "The imported target \"${target}\" references the file
\"${file}\"
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${_cmake_file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
Expand All @@ -88,9 +94,11 @@ but not all the files it references.
")
endif()
endforeach()
unset(_IMPORT_CHECK_FILES_FOR_${target})
unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach()
unset(_IMPORT_CHECK_TARGETS)
unset(_cmake_target)
unset(_cmake_import_check_targets)

# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
Expand Down
Binary file modified deps/flac/lib/libFLAC.a
Binary file not shown.
2 changes: 1 addition & 1 deletion deps/flac/lib/pkgconfig/flac.pc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ includedir=${prefix}/include

Name: FLAC
Description: Free Lossless Audio Codec Library
Version: 1.4.2
Version: 1.4.3
Requires.private: ogg
Libs: -L${libdir} -lFLAC
Libs.private: -lm
Expand Down

0 comments on commit e621be5

Please sign in to comment.