Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • xiph/flac
  • ePirat/flac
  • steils/flac
  • chouquette/flac
  • iemaghni/flac
  • ktmf01/flac
6 results
Show changes
Commits on Source (2615)
BasedOnStyle: WebKit
AlignAfterOpenBracket: Align
AlignEscapedNewlines: DontAlign
AlignOperands: true
BraceWrapping:
AfterFunction: true
BeforeElse: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: true
BreakConstructorInitializers: BeforeComma
DerivePointerAlignment: false
IndentCaseLabels: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PointerAlignment: Right
SortIncludes: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeParens: Never
TabWidth: 4
UseTab: ForContinuationAndIndentation
name: Generic cross-platform tests
on:
push:
pull_request:
jobs:
build:
strategy:
matrix:
include:
- name: ubuntu-latest-clang-autotools
os: ubuntu-latest
cc: clang
cxx: clang++
build-system: autotools
configure-opts: ''
- name: ubuntu-latest-gcc-cmake
os: ubuntu-latest
cc: gcc
cxx: g++
build-system: cmake
configure-opts: ''
- name: ubuntu-latest-clang-cmake
os: ubuntu-latest
cc: clang
cxx: clang++
build-system: cmake
configure-opts: ''
- name: macos-latest-clang-autotools
os: macos-latest
cc: clang
cxx: clang++
build-system: autotools
configure-opts: ''
- name: macos-latest-clang-cmake
os: macos-latest
cc: clang
cxx: clang++
build-system: cmake
configure-opts: ''
- name: windows-latest-cmake
os: windows-latest
build-system: cmake
configure-opts: ''
- name: windows-latest-cmake-shared
os: windows-latest
build-system: cmake
configure-opts: '-DBUILD_SHARED_LIBS=ON'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
if: startsWith(matrix.build-system,'cmake')
with:
repository: xiph/ogg
path: ./ogg
- name: Install MacOS dependencies
if: startsWith(matrix.os,'macos') && !startsWith(matrix.build-system,'cmake')
run: |
brew update
brew install automake pkg-config libogg libtool vorbis-tools oggz
- name: Install Linux dependencies
if: startsWith(matrix.os,'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libtool-bin libogg-dev vorbis-tools oggz-tools
- name: Install Windows dependencies
if: startsWith(matrix.os,'windows')
run: |
choco install busybox
- name: Build with Autotools
if: startsWith(matrix.build-system,'autotools')
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
./autogen.sh
./configure ${{ matrix.configure-opts }}
make
make check
- name: Prepare CMake build directory
if: startsWith(matrix.build-system,'cmake')
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: mkdir cmake-build
- name: CMake generator
if: startsWith(matrix.build-system,'cmake')
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
working-directory: cmake-build
run: cmake .. -DCMAKE_BUILD_TYPE=Release -DINSTALL_MANPAGES=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.configure-opts }} -DCMAKE_FIND_FRAMEWORK=NEVER
- name: CMake build
if: startsWith(matrix.build-system,'cmake')
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
working-directory: cmake-build
run: cmake --build . --config Release
- name: CMake test
if: startsWith(matrix.build-system,'cmake')
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
working-directory: cmake-build
run: ctest -V -C Release
- name: Upload logs on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: flac-${{ github.sha }}-${{ github.run_id }}-logs
path: |
./**/*.log
./**/out*.meta
name: CIFuzz
on:
pull_request:
push:
branches:
- master
- 1.3.x
jobs:
Fuzzing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer: [address, undefined, memory]
steps:
- name: Build Fuzzers (${{ matrix.sanitizer }})
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'flac'
language: c++
sanitizer: ${{ matrix.sanitizer }}
- name: Run Fuzzers (${{ matrix.sanitizer }})
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'flac'
language: c++
fuzz-seconds: 7200
sanitizer: ${{ matrix.sanitizer }}
- name: Upload Crash
uses: actions/upload-artifact@v4
if: failure() && steps.build.outcome == 'success'
with:
name: ${{ matrix.sanitizer }}-artifacts
path: ./out/artifacts
name: Autotools distcheck and ABI check
on:
push:
branches:
- main
- master
pull_request:
jobs:
distcheck:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: ietf-wg-cellar/flac-test-files
path: ./test-files
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libtool-bin libogg-dev doxygen libxml2-utils w3c-sgml-lib pandoc abi-compliance-checker vorbis-tools oggz-tools
- name: Build with Autotools
run: |
./autogen.sh
./configure
- name: Build and check source package
run: make distcheck
- name: Compute checksum
run: sha256sum ./flac-*.tar.xz
- name: Check binary compatibility
run: |
make
unxz --keep test/abi/abi-libFLAC-1.5.0.dump.xz
unxz --keep test/abi/abi-libFLAC++-1.5.0.dump.xz
abi-compliance-checker -l flac -old test/abi/abi-libFLAC-1.5.0.dump -new test/abi/abi-descriptor-libFLAC-1.5.0.xml
abi-compliance-checker -l flac++ -old test/abi/abi-libFLAC++-1.5.0.dump -new test/abi/abi-descriptor-libFLAC++-1.5.0.xml
- name: Check with flac test files
run: ./src/flac/flac -t test-files/subset/*.flac test-files/uncommon/0[5-9]*.flac test-files/uncommon/10*.flac
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: dist-tarball
path: |
./flac-*.tar.xz
- name: Upload ABI compliance reports
uses: actions/upload-artifact@v4
with:
name: flac-${{ github.sha }}-${{ github.run_id }}-compat
path: |
./compat_reports
- name: Upload logs on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: flac-${{ github.sha }}-${{ github.run_id }}-logs
path: |
./flac-**/**/*.log
./compat_reports
name: Build on MSYS2
on: [ push, pull_request ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
install: autotools mingw-w64-x86_64-gcc mingw-w64-x86_64-libogg
- name: Install pandoc
run: |
choco install pandoc
- name: Build, run tests and prepare package
shell: msys2 {0}
run: |
PATH=$PATH:/c/ProgramData/chocolatey/bin/:/c/Program\ Files/Git/bin/
./autogen.sh
./configure --enable-static --disable-shared # This is because the libtool helper script doesn't handle UTF-8 filenames correctly
make LDFLAGS='-all-static' # Otherwise ogg isn't linked statically
make check
mkdir flac
cp src/flac/flac.exe flac/flac.exe
cp src/metaflac/metaflac.exe flac/metaflac.exe
strip flac/*.exe
cp COPYING.* flac
cp AUTHORS flac
cp README* flac
cp man/*.html flac
- name: Upload logs on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: flac-${{ github.sha }}-${{ github.run_id }}-logs
path: |
./**/*.log
./**/out*.meta
- name: Package build
uses: actions/upload-artifact@v4
with:
name: flac-win64-static-${{ github.sha}}
path: flac
name: Building with specific options
on:
push:
pull_request:
jobs:
build:
strategy:
matrix:
include:
- name: 32-bit-words
cppflags: ''
configure-opts: --disable-64-bit-words
- name: integer-only-library
cppflags: '-DFLAC__INTEGER_ONLY_LIBRARY'
configure-opts: ''
- name: no-asm
cppflags: ''
configure-opts: --disable-asm-optimizations
- name: no-ogg
cppflags: ''
configure-opts: --disable-ogg
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libtool-bin libogg-dev
- name: Build and run tests
env:
CPPFLAGS: ${{ matrix.cppflags }}
run: |
./autogen.sh
./configure --disable-thorough-tests ${{ matrix.configure-opts }}
make
make check
- name: Upload logs on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: flac-${{ github.sha }}-${{ github.run_id }}-logs
path: |
./**/*.log
./**/out*.meta
*.a
*.la
*.lo
*.o
*.so
*.dll
*.dylib
*.exe
.deps
.libs
aclocal.m4
ar-lib
autom4te.cache/
compile
config.guess
config.h
config.h.in
config.log
config.rpath
config.status
config.sub
configure
depcomp
doc/Doxyfile
doc/FLAC.tag
doc/api/
examples/c/decode/file/example_c_decode_file
examples/c/encode/file/example_c_encode_file
examples/cpp/decode/file/example_cpp_decode_file
examples/cpp/encode/file/example_cpp_encode_file
install-sh
libtool
libtool-disable-static
ltmain.sh
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
man/flac.1
man/flac.html
man/metaflac.1
man/metaflac.html
missing
objs/debug
objs/release
src/flac/flac
src/libFLAC++/flac++.pc
src/libFLAC/flac.pc
src/metaflac/metaflac
src/share/getopt/libgetopt.a
src/test_grabbag/cuesheet/test_cuesheet
src/test_grabbag/picture/test_picture
src/test_libFLAC++/test_libFLAC++
src/test_libFLAC/test_libFLAC
src/test_seeking/test_seeking
src/test_streams/test_streams
stamp-h1
test/*.aiff
test/*.aifc
test/*.cmp
test/*.cue
test/*.flac
test/*.log
test/*.oga
test/*.raw
test/*.rf64
test/*.w64
test/*.wav
test/common.sh
test/cuesheet.diff
test/cuesheet.log
test/metaflac-test-files/out.meta
test/metaflac.flac
test/picture.diff
test/picture.log
.dirstamp
/ogg/
oss-fuzz/fuzzer_decoder
oss-fuzz/fuzzer_seek
oss-fuzz/fuzzer_metadata
oss-fuzz/fuzzer_encoder
oss-fuzz/fuzzer_encoder_v2
oss-fuzz/fuzzer_reencoder
oss-fuzz/fuzzer_tool_flac
oss-fuzz/fuzzer_tool_metaflac
/*[Bb]uild*/
/out/
CMakeSettings.json
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
Makefile.in
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
/.vs*/
default:
tags:
- docker
# Image from https://hub.docker.com/_/gcc/ based on Debian
image: gcc:9
autotools:
stage: build
before_script:
- apt-get update &&
apt-get install -y libogg-dev
libtool-bin gettext zip
doxygen graphviz pandoc
# Create an unpriviledged user, required for tests.
- adduser --disabled-password --gecos "Gitlab CI" flac
script:
- ./autogen.sh
- ./configure
- make
- su -c 'make distcheck' flac
cmake:
stage: build
before_script:
- apt-get update &&
apt-get install -y libogg-dev
cmake ninja-build
doxygen graphviz pandoc
# Create an unpriviledged user, required for tests.
- adduser --disabled-password --gecos "Gitlab CI" flac
script:
- mkdir _build
- cmake -S . -B _build -G "Ninja" -DCMAKE_BUILD_TYPE=Release
- chown -R flac .
- su -c 'cmake --build _build' flac
- su -c 'cd _build && ctest -V' flac
language: c
jobs:
include:
- os: linux
dist: focal
arch: arm64
compiler: gcc
env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=-DWITH_ASM=0
- os: linux
dist: focal
arch: arm64
compiler: gcc
env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=
- os: linux
dist: focal
arch: arm64
compiler: gcc
env: BUILD_SYSTEM="autotools" CONFIGURE_OPTS=
# - os: linux
# dist: focal
# arch: arm64
# compiler: clang
# env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=-DWITH_STACK_PROTECTOR=OFF # Clang on focal arm64 seems broken, can't find a way to reproduce this on my machine
- os: linux
dist: focal
arch: arm64
compiler: gcc
env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=-DENABLE_64_BIT_WORDS=OFF
- os: linux
dist: focal
arch: ppc64le
compiler: gcc
env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=-DWITH_ASM=0
- os: linux
dist: focal
arch: ppc64le
compiler: gcc
env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=
- os: linux
dist: focal
arch: ppc64le
compiler: gcc
env: BUILD_SYSTEM="autotools" CONFIGURE_OPTS=
- os: linux
dist: focal
arch: ppc64le
compiler: clang
env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=
- os: linux
dist: focal
arch: ppc64le
compiler: gcc
env: BUILD_SYSTEM="cmake" CONFIGURE_OPTS=-DENABLE_64_BIT_WORDS=OFF
install:
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get -y install libtool-bin libogg-dev; fi
script:
- if [[ "${BUILD_SYSTEM}" == "autotools" ]]; then ./autogen.sh && ./configure $CONFIGURE_OPTS && make && make check; fi
- if [[ "${BUILD_SYSTEM}" == "cmake" ]]; then mkdir cmake-build && cd cmake-build && cmake .. -DCMAKE_BUILD_TYPE=Release -DINSTALL_MANPAGES=OFF $CONFIGURE_OPTS && cat config.h && cmake --build . && travis_wait 30 ctest --output-on-failure; fi
/* FLAC - Free Lossless Audio Codec
* Copyright (C) 2001,2002,2003,2004 Josh Coalson
* Copyright (C) 2001-2009 Josh Coalson
* Copyright (C) 2011-2025 Xiph.Org Foundation
*
* This file is part the FLAC project. FLAC is comprised of several
* components distributed under difference licenses. The codec libraries
* components distributed under different licenses. The codec libraries
* are distributed under Xiph.Org's BSD-like license (see the file
* COPYING.Xiph in this distribution). All other programs, libraries, and
* plugins are distributed under the GPL (see COPYING.GPL). The documentation
......@@ -16,26 +17,44 @@
* distribution.
*/
This file lists major contributors to the FLAC project. This list is not
exhaustive. For an exhaustive list, run the command `git shortlog -s` on
the git repo or visit https://gitlab.xiph.org/xiph/flac/-/graphs/master
FLAC (http://flac.sourceforge.net/) is an Open Source lossless audio
codec developed by Josh Coalson <jcoalson@users.sourceforge.net>.
For a complete list of contributions, run the command `git log` on the
git repo, visit https://github.com/xiph/flac/commits or visit
https://gitlab.xiph.org/xiph/flac/commits
Original author: Josh Coalson <jcoalson@users.sourceforge.net>
Maintainer 2012-2020: Erik de Castro Lopo <erikd@mega-nerd.com>
Maintainer from 2022: Martijn van Beurden <mvanb1@gmail.com>
Website : https://www.xiph.org/flac/
Other major contributors and their contributions:
"lvqcl" <lvqcl@users.sourceforge.net>
* Visual Studio build system.
* Optimisations in the encoder and decoder.
"Janne Hyvärinen" <cse@sci.fi>
* Visual Studio build system.
* Unicode handling on Windows.
"Andrey Astafiev" <andrei@tvcell.ru>
* Russian translation of the HTML documentation
"Miroslav Lichvar" <mirator@upcase.inf.upol.cz>
"Miroslav Lichvar" <lichvarm@phoenix.inf.upol.cz>
* IA-32 assembly versions of several libFLAC routines
"Brady Patterson" <bpat@users.sourceforge.net>
* AIFF file support
* AIFF file support, PPC assembly versions of libFLAC routines
"Daisuke Shimamura" <Daisuke_Shimamura@nifty.com>
* id3 v1/v2 and i18n support in the XMMS plugin
* i18n support in the XMMS plugin
"X-Fixer" <x-fixer@narod.ru>
* Configuration system, tag editing, and file info in the Winamp2 plugin
"Matt Zimmerman" <mdz@debian.org>
* Libtool/autoconf/automake make system, flac man page
This diff is collapsed.
cmake_minimum_required(VERSION 3.12...3.31)
if(NOT (CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES OR DEFINED ENV{CFLAGS} OR DEFINED ENV{CXXFLAGS}))
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo")
endif()
project(FLAC VERSION 1.5.0) # HOMEPAGE_URL "https://www.xiph.org/flac/")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
option(BUILD_CXXLIBS "Build libFLAC++" ON)
option(BUILD_PROGRAMS "Build and install programs" ON)
option(BUILD_EXAMPLES "Build and install examples" ON)
option(BUILD_TESTING "Build tests" ON)
option(BUILD_DOCS "Build and install doxygen documents" ON)
option(WITH_FORTIFY_SOURCE "Enable protection against buffer overflows" ON)
option(WITH_STACK_PROTECTOR "Enable GNU GCC stack smash protection" ON)
option(INSTALL_MANPAGES "Install MAN pages" ON)
option(INSTALL_PKGCONFIG_MODULES "Install PkgConfig modules" ON)
option(INSTALL_CMAKE_CONFIG_MODULE "Install CMake package-config module" ON)
option(WITH_OGG "ogg support (default: test for libogg)" ON)
option(BUILD_SHARED_LIBS "Build shared instead of static libraries" OFF)
option(ENABLE_MULTITHREADING "Enable multithreading if pthreads is available" ON)
set(VERSION ${PROJECT_VERSION})
if(NOT UNIX)
# This is to make sure testing works when building with a DLL
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/objs)
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/objs)
endif()
if(WITH_OGG)
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ogg")
add_subdirectory("ogg")
set(OGG_FOUND 1 CACHE INTERNAL "ogg has been added as subdirectory")
set_target_properties(ogg PROPERTIES FOLDER Libraries)
if(BUILD_TESTING)
set_target_properties(test_bitwise test_framing PROPERTIES FOLDER Tests)
endif()
else()
if(NOT TARGET Ogg::ogg)
find_package(Ogg REQUIRED)
else()
set(OGG_FOUND 1 CACHE INTERNAL "ogg has already been built")
endif()
set(OGG_PACKAGE "ogg")
endif()
endif()
find_program (HAVE_GIT git)
if(HAVE_GIT)
execute_process(
COMMAND git --git-dir=.git describe --tags --exact-match
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
execute_process(
COMMAND git --git-dir=.git log -1 --pretty=format:%h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
execute_process(
COMMAND git --git-dir=.git log -1 --pretty=format:%cd --date=format:%Y%m%d
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
endif()
if(NOT WIN32)
find_package(Iconv)
set(HAVE_ICONV ${Iconv_FOUND})
endif()
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
set(CMAKE_C_FLAGS "-Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG ${CMAKE_C_FLAGS_RELEASE}")
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${CMAKE_CXX_FLAGS_RELEASE}")
endif()
if(MSVC)
set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /Oi /Ot /Oy /DNDEBUG ${CMAKE_C_FLAGS_RELEASE}")
endif()
include(CMakePackageConfigHelpers)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include(CheckSymbolExists)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)
include(CheckLibraryExists)
include(GNUInstallDirs)
include(UseSystemExtensions)
include(TestBigEndian)
enable_testing()
check_include_file("byteswap.h" HAVE_BYTESWAP_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("stdint.h" HAVE_STDINT_H)
check_include_file("stdbool.h" HAVE_STDBOOL_H)
check_include_file("arm_neon.h" FLAC__HAS_NEONINTRIN)
if(NOT HAVE_STDINT_H OR NOT HAVE_STDBOOL_H)
message(SEND_ERROR "Header stdint.h and/or stdbool.h not found")
endif()
if(MSVC)
check_include_file("intrin.h" FLAC__HAS_X86INTRIN)
else()
check_include_file("x86intrin.h" FLAC__HAS_X86INTRIN)
endif()
if(ANDROID AND CMAKE_SYSTEM_VERSION VERSION_LESS 24 AND (CMAKE_SYSTEM_PROCESSOR MATCHES "i686" OR CMAKE_SYSTEM_PROCESSOR MATCHES "armv7-a"))
# fseeko/ftello may link, but it's not usable before Android API 24 on 32-bit Android
# https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md
message(STATUS "Disabling fseeko/ftello for 32-bit Android before API 24")
set(HAVE_FSEEKO 0 CACHE INTERNAL "")
else()
check_function_exists(fseeko HAVE_FSEEKO)
endif()
check_c_source_compiles("int main() { return __builtin_bswap16 (0) ; }" HAVE_BSWAP16)
check_c_source_compiles("int main() { return __builtin_bswap32 (0) ; }" HAVE_BSWAP32)
check_c_source_compiles("
#include <langinfo.h>
int main()
{
char* cs = nl_langinfo(CODESET);
return !cs;
}"
HAVE_LANGINFO_CODESET)
test_big_endian(CPU_IS_BIG_ENDIAN)
check_c_compiler_flag(-Werror HAVE_WERROR_FLAG)
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_DECL_AFTER_STMT_FLAG)
check_c_compiler_flag(-mstackrealign HAVE_STACKREALIGN_FLAG)
check_cxx_compiler_flag(-Weffc++ HAVE_WEFFCXX_FLAG)
if(MINGW AND (WITH_FORTIFY_SOURCE OR WITH_STACK_PROTECTOR))
check_library_exists("ssp.a" __stack_chk_fail "" HAVE_LIBSSP)
if(NOT HAVE_LIBSSP)
message(WARNING "Could not find libssp in MinGW, stack protection and/or FORTIFY_SOURCE are unavailable")
else()
link_libraries("ssp.a")
# static libraries don't carry over other static libraries in mingw
# we need to export it in the pkg-config
set(FLAC_STATIC_LIBS "-lssp")
endif()
elseif(NOT MSVC)
set(HAVE_LIBSSP 1)
endif()
if(WITH_STACK_PROTECTOR)
if(NOT MSVC AND NOT EMSCRIPTEN)
check_c_compiler_flag("-fstack-protector-strong" HAVE_STACK_PROTECTOR_FLAG)
endif()
endif()
if(HAVE_WERROR_FLAG)
option(ENABLE_WERROR "Enable -Werror in all Makefiles" OFF)
endif()
add_compile_options(
$<$<BOOL:${MSVC}>:/wd4267>
$<$<BOOL:${MSVC}>:/wd4996>
$<$<BOOL:${ENABLE_WERROR}>:-Werror>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:${HAVE_WEFFCXX_FLAG}>>:-Weffc++>
$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:${HAVE_DECL_AFTER_STMT_FLAG}>>:-Wdeclaration-after-statement>)
if(WITH_FORTIFY_SOURCE AND HAVE_LIBSSP)
add_definitions(-D_FORTIFY_SOURCE=2)
endif()
if(HAVE_STACK_PROTECTOR_FLAG AND HAVE_LIBSSP)
add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-fstack-protector-strong>)
endif()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND HAVE_STACKREALIGN_FLAG)
add_compile_options($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:-mstackrealign>)
endif()
include_directories("include")
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
add_definitions(-DHAVE_CONFIG_H)
if(MSVC)
add_definitions(
-D_CRT_SECURE_NO_WARNINGS
-D_USE_MATH_DEFINES)
endif()
if(CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
add_definitions(-DFLAC__OVERFLOW_DETECT)
endif()
if(ENABLE_MULTITHREADING)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
if(CMAKE_USE_PTHREADS_INIT)
set(HAVE_PTHREAD 1)
endif()
endif()
add_subdirectory("src")
if(BUILD_DOCS)
add_subdirectory("doc")
endif()
if(BUILD_EXAMPLES)
add_subdirectory("examples")
endif()
if(BUILD_TESTING)
add_subdirectory("test")
endif()
# The following folder layout is mostly for MSVC
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_target_properties(FLAC grabbag getopt replaygain_analysis replaygain_synthesis utf8 PROPERTIES FOLDER Libraries)
if(BUILD_CXXLIBS)
set_target_properties(FLAC++ PROPERTIES FOLDER Libraries)
endif()
if(BUILD_PROGRAMS)
set_target_properties(flacapp metaflac PROPERTIES FOLDER Programs)
endif()
if(BUILD_TESTING)
set_target_properties(test_libFLAC test_libs_common test_picture test_seeking test_streams test_cuesheet PROPERTIES FOLDER Tests)
if(BUILD_CXXLIBS)
set_target_properties(test_libFLAC++ PROPERTIES FOLDER Tests)
endif()
endif()
if(BUILD_EXAMPLES)
set_target_properties(decode_file encode_file PROPERTIES FOLDER Examples)
if(BUILD_CXXLIBS)
set_target_properties(decode_file_cxx encode_file_cxx PROPERTIES FOLDER Examples)
endif()
endif()
if(BUILD_UTILS)
set_target_properties(flacdiff flactimer PROPERTIES FOLDER Utils)
endif()
configure_file(config.cmake.h.in config.h)
if(INSTALL_CMAKE_CONFIG_MODULE)
install(
EXPORT targets
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
NAMESPACE FLAC::)
export(EXPORT targets NAMESPACE FLAC:: FILE FLACTargets.cmake)
configure_package_config_file(
${PROJECT_SOURCE_DIR}/flac-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/flac-config.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/flac-config-version.cmake COMPATIBILITY AnyNewerVersion)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/flac-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/flac-config-version.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/flac-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/flac-config-version.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
endif()
file(GLOB FLAC_HEADERS "include/FLAC/*.h")
file(GLOB FLAC++_HEADERS "include/FLAC++/*.h")
install(FILES ${FLAC_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/FLAC")
install(FILES ${FLAC++_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/FLAC++")
if(INSTALL_MANPAGES)
find_program (HAVE_PANDOC pandoc)
if(HAVE_PANDOC)
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/man")
add_custom_command(
OUTPUT man/flac.1
COMMAND pandoc --standalone --to man "${CMAKE_SOURCE_DIR}/man/flac.md" > man/flac.1
)
add_custom_command(
OUTPUT man/metaflac.1
COMMAND pandoc --standalone --to man "${CMAKE_SOURCE_DIR}/man/metaflac.md" > man/metaflac.1
)
add_custom_command(
OUTPUT man/flac.html
COMMAND pandoc --standalone --embed-resources --to html "${CMAKE_SOURCE_DIR}/man/flac.md" > man/flac.html || pandoc --self-contained --to html "${CMAKE_SOURCE_DIR}/man/flac.md" > man/flac.html
)
add_custom_command(
OUTPUT man/metaflac.html
COMMAND pandoc --standalone --embed-resources --to html "${CMAKE_SOURCE_DIR}/man/metaflac.md" > man/metaflac.html || pandoc --self-contained --to html "${CMAKE_SOURCE_DIR}/man/metaflac.md" > man/metaflac.html
)
add_custom_target(man ALL DEPENDS man/flac.1 man/metaflac.1 man/flac.html man/metaflac.html)
install(FILES "${CMAKE_BINARY_DIR}/man/flac.1" "${CMAKE_BINARY_DIR}/man/metaflac.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
else()
if(EXISTS "${CMAKE_SOURCE_DIR}/man/flac.1" AND EXISTS "${CMAKE_SOURCE_DIR}/man/metaflac.1")
install(FILES "man/flac.1" "man/metaflac.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
else()
message(SEND_ERROR "Pandoc nor prebuild manpages are found. Cannot install manpages. Set INSTALL_MANPAGES to OFF to build without man pages")
endif()
endif()
endif()
Thanks for considering contributing to the FLAC project!
Contributing to FLAC is possible in many ways. Among them are
- Reporting bugs or other issues at https://github.com/xiph/flac/issues
- Submitting patches at https://github.com/xiph/flac/pulls
- Testing FLAC playing devices and software at
https://wiki.hydrogenaud.io/index.php?title=FLAC_decoder_testbench
General communication not specific to issues is generally done through
the FLAC mailing lists:
- For user questions and discussions:
https://lists.xiph.org/mailman/listinfo/flac
- For developer questions and discussions:
https://lists.xiph.org/mailman/listinfo/flac-dev
## Goals
Since FLAC is an open-source project, it's important to have a set of
goals that everyone works to. They may change slightly from time to time
but they're a good guideline. Changes should be in line with the goals
and should not attempt to embrace any of the anti-goals.
**Goals**
- FLAC should be and stay an open format with an open-source reference
implementation.
- FLAC should be lossless. This seems obvious but lossy compression
seems to creep into every audio codec. This goal also means that flac
should stay archival quality and be truly lossless for all input.
Testing of releases should be thorough.
- FLAC should yield respectable compression, on par or better than other
lossless codecs.
- FLAC should allow at least realtime decoding on even modest hardware.
- FLAC should support fast sample-accurate seeking.
- FLAC should allow gapless playback of consecutive streams. This follows from the lossless goal.
- The FLAC project owes a lot to the many people who have advanced the
audio compression field so freely, and aims also to contribute through
the open-source development of new ideas.
**Anti-goals**
- Lossy compression. There are already many suitable lossy formats (Ogg
Vorbis, MP3, etc.).
- Copy prevention, DRM, etc. There is no intention to add any copy
prevention methods. Of course, we can't stop someone from encrypting a
FLAC stream in another container (e.g. the way Apple encrypts AAC in
MP4 with FairPlay), that is the choice of the user.
## Contributing patches
Contributions to FLAC should be licensed with the same license as the
part of the FLAC project the contribution belongs to. These are
- libFLAC and libFLAC++ are licensed under Xiph.org's
BSD-like license (see COPYING.Xiph), so contributions to these
libraries should also be licensed under this license, otherwise they
cannot be accepted
- the flac and metaflac command line programs are licensed under GPLv2,
see COPYING.GPL
- the helper libraries for flac and metaflac (which are in src/share)
are licensed under varying licenses, see the license preamble for each
file to see how they are licensed
Patches can be contributed through GitHub as a Pull Request.
Alternatively you can supply patches through the mailing list.
## Code style
FLAC does have its own peculiar coding style that does not seem to fit
general categories. You can use `git clang-format` to have your patch
auto-formatted similar to the rest of the code.
This diff is collapsed.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
......@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
......@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
......@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
......@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
......@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
......@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
......@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
......@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
......@@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
......@@ -16,97 +17,109 @@ freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LIBRARY GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
......@@ -133,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
......@@ -255,7 +268,7 @@ distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
......@@ -282,23 +295,31 @@ of these things:
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
......@@ -347,7 +368,7 @@ Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
......@@ -390,7 +411,7 @@ excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
......@@ -453,18 +474,18 @@ convey the exclusion of warranty; and each file should have at least the
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
Lesser General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
......@@ -479,3 +500,5 @@ necessary. Here is a sample; alter the names:
Ty Coon, President of Vice
That's all there is to it!
Copyright (C) 2000,2001,2002,2003,2004 Josh Coalson
Copyright (C) 2000-2009 Josh Coalson
Copyright (C) 2011-2025 Xiph.Org Foundation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
......@@ -11,7 +12,7 @@ notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Xiph.org Foundation nor the names of its
- Neither the name of the Xiph.Org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
......
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "all"=.\all.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name all_dynamic
End Project Dependency
Begin Project Dependency
Project_Dep_Name all_static
End Project Dependency
}}}
###############################################################################
Project: "all_dynamic"=.\all_dynamic.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name flac
End Project Dependency
Begin Project Dependency
Project_Dep_Name metaflac
End Project Dependency
Begin Project Dependency
Project_Dep_Name in_flac
End Project Dependency
Begin Project Dependency
Project_Dep_Name flac_mac
End Project Dependency
Begin Project Dependency
Project_Dep_Name flac_ren
End Project Dependency
Begin Project Dependency
Project_Dep_Name grabbag_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name replaygain_analysis_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name replaygain_synthesis_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name getopt_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC_dynamic
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC++_dynamic
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC++_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libOggFLAC_dynamic
End Project Dependency
Begin Project Dependency
Project_Dep_Name libOggFLAC_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libOggFLAC++_dynamic
End Project Dependency
Begin Project Dependency
Project_Dep_Name libOggFLAC++_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_common_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name utf8_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_cuesheet
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_libFLAC
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_libFLAC++
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_libOggFLAC
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_libOggFLAC++
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_streams
End Project Dependency
}}}
###############################################################################
Project: "all_static"=.\all_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name flac
End Project Dependency
Begin Project Dependency
Project_Dep_Name metaflac
End Project Dependency
Begin Project Dependency
Project_Dep_Name in_flac
End Project Dependency
Begin Project Dependency
Project_Dep_Name flac_mac
End Project Dependency
Begin Project Dependency
Project_Dep_Name flac_ren
End Project Dependency
Begin Project Dependency
Project_Dep_Name grabbag_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name replaygain_analysis_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name replaygain_synthesis_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name getopt_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC++_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libOggFLAC_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libOggFLAC++_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_common_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name utf8_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_cuesheet
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_libFLAC
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_libFLAC++
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_libOggFLAC
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_libOggFLAC++
End Project Dependency
Begin Project Dependency
Project_Dep_Name test_streams
End Project Dependency
}}}
###############################################################################
Project: "flac"=.\src\flac\flac.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name grabbag_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name replaygain_analysis_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name replaygain_synthesis_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name getopt_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libOggFLAC_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name utf8_static
End Project Dependency
}}}
###############################################################################
Project: "flac_mac"=.\src\monkeys_audio_utilities\flac_mac\flac_mac.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "flac_ren"=.\src\monkeys_audio_utilities\flac_ren\flac_ren.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "replaygain_analysis_static"=.\src\share\replaygain_analysis\replaygain_analysis_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "replaygain_synthesis_static"=.\src\share\replaygain_synthesis\replaygain_synthesis_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "getopt_static"=.\src\share\getopt\getopt_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "grabbag_static"=.\src\share\grabbag\grabbag_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libFLAC_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name replaygain_analysis_static
End Project Dependency
}}}
###############################################################################
Project: "in_flac"=.\src\plugin_winamp2\in_flac.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libFLAC_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_common_static
End Project Dependency
}}}
###############################################################################
Project: "libFLAC_dynamic"=.\src\libFLAC\libFLAC_dynamic.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "libFLAC_static"=.\src\libFLAC\libFLAC_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "libFLAC++_dynamic"=".\src\libFLAC++\libFLAC++_dynamic.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libFLAC_dynamic
End Project Dependency
}}}
###############################################################################
Project: "libFLAC++_static"=".\src\libFLAC++\libFLAC++_static.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libFLAC_static
End Project Dependency
}}}
###############################################################################
Project: "libOggFLAC_dynamic"=.\src\libOggFLAC\libOggFLAC_dynamic.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libFLAC_dynamic
End Project Dependency
}}}
###############################################################################
Project: "libOggFLAC_static"=.\src\libOggFLAC\libOggFLAC_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libFLAC_static
End Project Dependency
}}}
###############################################################################
Project: "libOggFLAC++_dynamic"=".\src\libOggFLAC++\libOggFLAC++_dynamic.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libOggFLAC_dynamic
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC++_dynamic
End Project Dependency
}}}
###############################################################################
Project: "libOggFLAC++_static"=".\src\libOggFLAC++\libOggFLAC++_static.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libOggFLAC_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC++_static
End Project Dependency
}}}
###############################################################################
Project: "metaflac"=.\src\metaflac\metaflac.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name replaygain_analysis_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name getopt_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name grabbag_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name utf8_static
End Project Dependency
}}}
###############################################################################
Project: "plugin_common_static"=.\src\plugin_common\plugin_common_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name replaygain_synthesis_static
End Project Dependency
Begin Project Dependency
Project_Dep_Name libFLAC_static
End Project Dependency
}}}
###############################################################################
Project: "test_cuesheet"=.\src\test_grabbag\cuesheet\test_cuesheet.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name grabbag_static
End Project Dependency
}}}
###############################################################################
Project: "test_libFLAC"=.\src\test_libFLAC\test_libFLAC.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libFLAC_static
End Project Dependency
}}}
###############################################################################
Project: "test_libFLAC++"=".\src\test_libFLAC++\test_libFLAC++.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libFLAC++_static
End Project Dependency
}}}
###############################################################################
Project: "test_libOggFLAC"=.\src\test_libOggFLAC\test_libOggFLAC.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libOggFLAC_static
End Project Dependency
}}}
###############################################################################
Project: "test_libOggFLAC++"=".\src\test_libOggFLAC++\test_libOggFLAC++.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name libOggFLAC++_static
End Project Dependency
}}}
###############################################################################
Project: "test_streams"=.\src\test_streams\test_streams.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "utf8_static"=.\src\share\utf8\utf8_static.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2001,2002,2003,2004 Josh Coalson
# Copyright (C) 2001-2009 Josh Coalson
# Copyright (C) 2011-2025 Xiph.Org Foundation
#
# This file is part the FLAC project. FLAC is comprised of several
# components distributed under difference licenses. The codec libraries
# components distributed under different licenses. The codec libraries
# are distributed under Xiph.Org's BSD-like license (see the file
# COPYING.Xiph in this distribution). All other programs, libraries, and
# plugins are distributed under the GPL (see COPYING.GPL). The documentation
......@@ -28,23 +29,33 @@
# distclean: remove everything except what goes in the distribution
#
SUBDIRS = doc include man src test build flac.pbproj obj
ACLOCAL_AMFLAGS = -I m4
DISTCLEANFILES = libtool-disable-static
SUBDIRS = doc include m4 man src test oss-fuzz
if EXAMPLES
SUBDIRS += examples
endif
EXTRA_DIST = \
CMakeLists.txt \
config.cmake.h.in \
flac-config.cmake.in \
cmake/CheckA64NEON.c.in \
cmake/CheckA64NEON.cmake \
cmake/CheckCPUArch.c.in \
cmake/CheckCPUArch.cmake \
cmake/FindOgg.cmake \
cmake/UseSystemExtensions.cmake \
CHANGELOG.md \
COPYING.FDL \
COPYING.GPL \
COPYING.LGPL \
FLAC.dsw \
Makefile.lite \
all.dsp \
all_dynamic.dsp \
all_static.dsp \
COPYING.Xiph \
README.md \
autogen.sh \
config.rpath \
depcomp \
ltmain.sh \
strip_fPIC.sh
ltmain.sh
AUTOMAKE_OPTIONS = foreign
CLEANFILES = *~
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2001,2002,2003,2004 Josh Coalson
#
# This file is part the FLAC project. FLAC is comprised of several
# components distributed under difference licenses. The codec libraries
# are distributed under Xiph.Org's BSD-like license (see the file
# COPYING.Xiph in this distribution). All other programs, libraries, and
# plugins are distributed under the GPL (see COPYING.GPL). The documentation
# is distributed under the Gnu FDL (see COPYING.FDL). Each file in the
# FLAC distribution contains at the top the terms under which it may be
# distributed.
#
# Since this particular file is relevant to all components of FLAC,
# it may be distributed under the Xiph.Org license, which is the least
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
#
# GNU Makefile
#
# Useful targets
#
# all : build all libraries and programs in the default configuration (currently 'release')
# debug : build all libraries and programs in debug mode
# valgrind: build all libraries and programs in debug mode, dynamically linked and ready for valgrind
# release : build all libraries and programs in release mode
# test : run the unit and stream tests
# clean : remove all non-distro files
#
topdir = .
.PHONY: all doc src libFLAC libFLAC++ libOggFLAC libOggFLAC++ share plugin_common plugin_xmms flac metaflac test_grabbag test_libFLAC test_libFLAC++ test_libOggFLAC test_libOggFLAC++ test_streams
all: doc src
DEFAULT_CONFIG = release
CONFIG = $(DEFAULT_CONFIG)
debug : CONFIG = debug
valgrind: CONFIG = valgrind
release : CONFIG = release
debug : all
valgrind: all
release : all
doc:
(cd $@ ; $(MAKE) -f Makefile.lite)
src:
(cd $@ ; $(MAKE) -f Makefile.lite $(CONFIG))
libFLAC:
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
libFLAC++: libFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
libOggFLAC: libFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
libOggFLAC++: libFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
share: libFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
flac: libFLAC libOggFLAC share
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
metaflac: libFLAC share
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
plugin_common: libFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
plugin_xmms: libFLAC plugin_common
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
test_streams: libFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
test_grabbag: share
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
test_libFLAC: libFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
test_libFLAC++: libFLAC libFLAC++
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
test_libOggFLAC: libFLAC libOggFLAC
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
test_libOggFLAC++: libFLAC libOggFLAC libOggFLAC++
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
test: debug
(cd test ; $(MAKE) -f Makefile.lite debug)
testv: valgrind
(cd test ; $(MAKE) -f Makefile.lite valgrind)
testr: release
(cd test ; $(MAKE) -f Makefile.lite release)
clean:
-(cd doc ; $(MAKE) -f Makefile.lite clean)
-(cd src ; $(MAKE) -f Makefile.lite clean)
-(cd test ; $(MAKE) -f Makefile.lite clean)