├── .gitmodules ├── source ├── external │ ├── libsndfile │ │ ├── src │ │ │ ├── G72x │ │ │ │ ├── README │ │ │ │ └── ChangeLog │ │ │ ├── make-static-lib-hidden-privates.sh │ │ │ ├── GSM610 │ │ │ │ ├── gsm_destroy.c │ │ │ │ ├── COPYRIGHT │ │ │ │ ├── gsm_create.c │ │ │ │ ├── config.h │ │ │ │ ├── gsm_option.c │ │ │ │ ├── gsm.h │ │ │ │ ├── README │ │ │ │ ├── decode.c │ │ │ │ ├── ChangeLog │ │ │ │ ├── table.c │ │ │ │ ├── code.c │ │ │ │ └── preprocess.c │ │ │ ├── test_endswap.def │ │ │ ├── version-metadata.rc.in │ │ │ ├── id3.h │ │ │ ├── ALAC │ │ │ │ ├── EndianPortable.h │ │ │ │ ├── shift.h │ │ │ │ ├── dplib.h │ │ │ │ ├── ALACDecoder.h │ │ │ │ ├── alac_decoder.h │ │ │ │ └── aglib.h │ │ │ ├── chanmap.h │ │ │ ├── test_main.h │ │ │ ├── macos.c │ │ │ ├── test_binheader_writef.c │ │ │ ├── test_strncpy_crlf.c │ │ │ ├── ima_oki_adpcm.h │ │ │ ├── ogg_vcomment.h │ │ │ ├── test_main.c │ │ │ └── windows.c │ │ ├── ossfuzz │ │ │ ├── .gitignore │ │ │ ├── testinput.h │ │ │ ├── ossfuzz.sh │ │ │ ├── sndfile_fuzzer.cc │ │ │ ├── ci_oss.sh │ │ │ ├── standaloneengine.cc │ │ │ └── sndfile_alt_fuzzer.cc │ │ ├── docs │ │ │ ├── _includes │ │ │ │ └── logo.html │ │ │ ├── libsndfile.jpg │ │ │ ├── _config.yml │ │ │ ├── _layouts │ │ │ │ ├── page.html │ │ │ │ ├── default.html │ │ │ │ └── home.html │ │ │ ├── print.css │ │ │ ├── tutorial.md │ │ │ ├── development.md │ │ │ ├── win32.md │ │ │ ├── embedded_files.md │ │ │ ├── sndfile_info.md │ │ │ ├── lists.md │ │ │ ├── bugs.md │ │ │ ├── libsndfile.css │ │ │ └── donate.md │ │ ├── Scripts │ │ │ ├── asan-configure.sh │ │ │ ├── cmake-build.sh │ │ │ ├── clang-sanitize.sh │ │ │ ├── linux-to-win-cross-configure.sh │ │ │ ├── build-test-tarball.mk.in │ │ │ └── git-pre-commit-hook │ │ ├── cmake │ │ │ ├── CheckCPUArch.c.in │ │ │ ├── TestInline.c.in │ │ │ ├── SndFileConfig.cmake.in │ │ │ ├── CheckCPUArch.cmake │ │ │ ├── CMakeAutoGen.cmake │ │ │ ├── FindSpeex.cmake │ │ │ ├── sqlite │ │ │ │ └── FindSQLite3.cmake │ │ │ ├── FindSndio.cmake │ │ │ ├── FindOgg.cmake │ │ │ ├── FindOpus.cmake │ │ │ ├── FindMpg123.cmake │ │ │ ├── FindFLAC.cmake │ │ │ ├── Findmp3lame.cmake │ │ │ ├── SetupABIVersions.cmake │ │ │ ├── TestInline.cmake │ │ │ └── ClipMode.cmake │ │ ├── ChangeLog │ │ ├── Octave │ │ │ ├── PKG_ADD │ │ │ ├── Readme.txt │ │ │ ├── format.h │ │ │ ├── sndfile_load.m │ │ │ ├── sndfile_play.m │ │ │ ├── sndfile_save.m │ │ │ ├── octave_test.m │ │ │ └── octave_test.sh │ │ ├── tests │ │ │ ├── pipe_test.def │ │ │ ├── benchmark.def │ │ │ ├── header_test.def │ │ │ ├── rdwr_test.def │ │ │ ├── floating_point_test.def │ │ │ ├── utils.def │ │ │ ├── generate.h │ │ │ ├── pcm_test.def │ │ │ ├── scale_clip_test.def │ │ │ ├── dft_cmp.h │ │ │ ├── benchmark-1.0.0rc2 │ │ │ ├── sfversion.c │ │ │ ├── benchmark-1.0.0 │ │ │ ├── write_read_test.def │ │ │ ├── benchmark-1.0.18pre16-mingus │ │ │ ├── benchmark-1.0.18pre16-hendrix │ │ │ ├── benchmark-1.0.6pre10-coltrane │ │ │ ├── benchmark-1.0.6pre10-miles │ │ │ ├── benchmark-0.0.28 │ │ │ ├── sftest.c │ │ │ ├── pedantic-header-test.sh.in │ │ │ ├── generate.c │ │ │ └── largefile_test.c │ │ ├── .editorconfig │ │ ├── SECURITY.md │ │ ├── Win32 │ │ │ ├── testprog.c │ │ │ └── README-precompiled-dll.txt │ │ ├── sndfile.pc.in │ │ ├── CODEOWNERS │ │ ├── man │ │ │ ├── sndfile-play.1 │ │ │ ├── sndfile-concat.1 │ │ │ ├── sndfile-salvage.1 │ │ │ ├── sndfile-cmp.1 │ │ │ ├── sndfile-info.1 │ │ │ └── sndfile-interleave.1 │ │ ├── m4 │ │ │ ├── flexible_array.m4 │ │ │ ├── mkoctfile_version.m4 │ │ │ ├── ax_require_defined.m4 │ │ │ └── ax_recursive_eval.m4 │ │ ├── vcpkg.json │ │ ├── regtest │ │ │ └── regtest.h │ │ ├── Building-for-Android.md │ │ ├── libsndfile.spec.in │ │ ├── CONTRIBUTING.md │ │ ├── README │ │ └── examples │ │ │ ├── sndfilehandle.cc │ │ │ └── list_formats.c │ └── libresample │ │ ├── src │ │ ├── configtemplate.h │ │ ├── config.h │ │ ├── filterkit.h │ │ └── resample_defs.h │ │ ├── include │ │ └── libresample.h │ │ ├── LICENSE-BSD.txt │ │ ├── Makefile │ │ ├── Makefile.in │ │ └── configure.in ├── mac │ ├── vutu.icns │ └── Info.plist ├── resources │ ├── D-DIN.otf │ ├── D-DIN-Italic.otf │ └── about_resources.txt ├── common │ ├── vutuParameters.h │ ├── vutuView.h │ ├── version.h │ ├── vutu.h │ ├── vutuProcessor.h │ └── vutuController.h ├── windows │ └── hidpi.manifest └── widgets │ ├── sampleDisplay.h │ └── vutuPartialsDisplay.h ├── LICENSE ├── changeLog.txt └── README.md /.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/G72x/README: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/external/libsndfile/ossfuzz/.gitignore: -------------------------------------------------------------------------------- 1 | sndfile_fuzzer 2 | -------------------------------------------------------------------------------- /source/mac/vutu.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madronalabs/vutu/HEAD/source/mac/vutu.icns -------------------------------------------------------------------------------- /source/resources/D-DIN.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madronalabs/vutu/HEAD/source/resources/D-DIN.otf -------------------------------------------------------------------------------- /source/resources/D-DIN-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madronalabs/vutu/HEAD/source/resources/D-DIN-Italic.otf -------------------------------------------------------------------------------- /source/external/libsndfile/docs/_includes/logo.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/external/libsndfile/Scripts/asan-configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | CFLAGS="-fsanitize=address -g" CXXFLAGS=${CFLAGS} ./configure 4 | 5 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/libsndfile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madronalabs/vutu/HEAD/source/external/libsndfile/docs/libsndfile.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Vutu is Copyright (C) 2022 Madrona Labs LLC. 3 | 4 | Vutu is distributed under the terms of the GPLv3. See COPYING for details. 5 | 6 | -------------------------------------------------------------------------------- /source/external/libsndfile/ossfuzz/testinput.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); 4 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/CheckCPUArch.c.in: -------------------------------------------------------------------------------- 1 | int main(void) { 2 | #if @CHECK_CPU_ARCH_DEFINES@ 3 | return 0; 4 | #else 5 | fail 6 | #endif 7 | } 8 | -------------------------------------------------------------------------------- /source/external/libsndfile/ChangeLog: -------------------------------------------------------------------------------- 1 | For changes, please see the git commit history on github: 2 | 3 | https://github.com/libsndfile/libsndfile/commits/master 4 | -------------------------------------------------------------------------------- /source/external/libsndfile/Octave/PKG_ADD: -------------------------------------------------------------------------------- 1 | autoload ("sfread", "sndfile.oct"); 2 | autoload ("sfversion", "sndfile.oct"); 3 | autoload ("sfwrite", "sndfile.oct"); 4 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/_config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | author: "The libsndfile team" 3 | version: "1.1.0" 4 | 5 | markdown: kramdown 6 | plugins: 7 | - jekyll-default-layout 8 | --- 9 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 6 |
7 |
8 | {{ content }} 9 |
10 |
11 | -------------------------------------------------------------------------------- /source/resources/about_resources.txt: -------------------------------------------------------------------------------- 1 | 2 | D-DIN Fonts: 3 | Copyright (C) 2017 Datto Inc. https://www.datto.com/fonts/d-din, 4 | Licensed under the SIL Open Font License, Version 1.1. 5 | 6 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/TestInline.c.in: -------------------------------------------------------------------------------- 1 | static @INLINE_KEYWORD@ void test_inline(void) 2 | { 3 | return; 4 | } 5 | 6 | int main (void) 7 | { 8 | test_inline (); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /source/external/libsndfile/Scripts/cmake-build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | rm -rf CMakeCache.txt CMakeFiles/ _Build 4 | 5 | mkdir _Build 6 | cd _Build 7 | cmake .. 8 | cmake --build . 9 | ctest -V 10 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/print.css: -------------------------------------------------------------------------------- 1 | body { 2 | background:white; 3 | color:black; 4 | } 5 | 6 | h1{ 7 | background:white; 8 | color:black; 9 | } 10 | 11 | h2 { 12 | background:white; 13 | color:#666; 14 | } 15 | -------------------------------------------------------------------------------- /source/external/libresample/src/configtemplate.h: -------------------------------------------------------------------------------- 1 | /* Run configure to generate config.h automatically on any 2 | system supported by GNU autoconf. For all other systems, 3 | use this file as a template to create config.h 4 | */ 5 | 6 | #undef HAVE_INTTYPES_H 7 | 8 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/pipe_test.def: -------------------------------------------------------------------------------- 1 | autogen definitions pipe_test.tpl; 2 | 3 | data_type = { 4 | type_name = short ; 5 | }; 6 | 7 | data_type = { 8 | type_name = float ; 9 | }; 10 | 11 | data_type = { 12 | type_name = double ; 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /source/external/libsndfile/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | insert_final_newline = true 5 | 6 | [*.{h,hpp,c,tpl,def}] 7 | indent_style = tab 8 | tab_width = 4 9 | 10 | [*.py] 11 | indent_style = space 12 | indent_size = 4 13 | 14 | [*.yml] 15 | indent_style = space 16 | indent_size = 2 17 | -------------------------------------------------------------------------------- /source/common/vutuParameters.h: -------------------------------------------------------------------------------- 1 | // VST3 example code for madronalib 2 | // (c) 2020, Madrona Labs LLC, all rights reserved 3 | // see LICENSE.txt for details 4 | 5 | #pragma once 6 | 7 | 8 | #include "mldsp.h" 9 | #include "madronalib.h" 10 | #include "MLParameters.h" 11 | 12 | using namespace ml; 13 | 14 | 15 | -------------------------------------------------------------------------------- /source/external/libresample/src/config.h: -------------------------------------------------------------------------------- 1 | /* src/config.h. Generated from configtemplate.h by configure. */ 2 | /* Run configure to generate config.h automatically on any 3 | system supported by GNU autoconf. For all other systems, 4 | use this file as a template to create config.h 5 | */ 6 | 7 | #define HAVE_INTTYPES_H 1 8 | 9 | -------------------------------------------------------------------------------- /source/external/libsndfile/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | ------- | ------------------ | 7 | | 1.1.x | :white_check_mark: | 8 | 9 | ## Reporting a Vulnerability 10 | 11 | Please send report privately to evpobry@gmail.com, and include how would you like to be credited. 12 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/tutorial.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 | 5 | # libsndfile Tutorial 6 | 7 | **More coming soon.** 8 | 9 | For now, the best place to look for example code is the `examples/` directory of the source code distribution and the 10 | libsndfile test suite which is located in the `tests/` directory of the source code distribution. 11 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/benchmark.def: -------------------------------------------------------------------------------- 1 | autogen definitions benchmark.tpl; 2 | 3 | data_type = { 4 | type_name = short ; 5 | multiplier = "32700.0" ; 6 | }; 7 | 8 | data_type = { 9 | type_name = int ; 10 | multiplier = "32700.0 * (1 << 16)" ; 11 | }; 12 | 13 | data_type = { 14 | type_name = float ; 15 | multiplier = "1.0" ; 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /source/external/libsndfile/Win32/testprog.c: -------------------------------------------------------------------------------- 1 | /* Simple test program to make sure that Win32 linking to libsndfile is 2 | ** working. 3 | */ 4 | 5 | #include 6 | 7 | #include "sndfile.h" 8 | 9 | int 10 | main (void) 11 | { static char strbuffer [256] ; 12 | sf_command (NULL, SFC_GET_LIB_VERSION, strbuffer, sizeof (strbuffer)) ; 13 | puts (strbuffer) ; 14 | return 0 ; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /source/external/libsndfile/Scripts/clang-sanitize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This is known to work with clang-3.4 from Debian testing/unstable. 4 | # 2013/07/14 5 | 6 | export CC=clang 7 | export CXX=clang++ 8 | export CFLAGS="-O3 -fsanitize=address,integer,undefined" 9 | export CXXFLAGS="-O3 -fsanitize=address,integer,undefined" 10 | 11 | ./configure --enable-gcc-werror 12 | 13 | make clean all check 14 | -------------------------------------------------------------------------------- /source/external/libsndfile/sndfile.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: sndfile 7 | Description: A library for reading and writing audio files 8 | Requires: 9 | Requires.private: @EXTERNAL_XIPH_REQUIRE@ @EXTERNAL_MPEG_REQUIRE@ 10 | Version: @VERSION@ 11 | Libs: -L${libdir} -lsndfile 12 | Libs.private: @EXTERNAL_MPEG_LIBS@ 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /source/external/libsndfile/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # The owners of this repository. In order of suggestions as reviewers. 2 | * @evpobr @SoapGentoo @arthurt @erikd 3 | 4 | # Autotools 5 | configure.ac Makefile.am @SoapGentoo @erikd 6 | 7 | # CMake 8 | CMakeLists.txt /cmake/ @evpobr 9 | 10 | # Ogg Opus format 11 | /src/ogg_opus.c @arthurt 12 | 13 | # Documentation 14 | /doc/ /man/ @evpobr 15 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/header_test.def: -------------------------------------------------------------------------------- 1 | autogen definitions header_test.tpl; 2 | 3 | data_type = { 4 | name = "short" ; 5 | format = "SF_FORMAT_PCM_16" ; 6 | } ; 7 | 8 | data_type = { 9 | name = "int" ; 10 | format = "SF_FORMAT_PCM_32" ; 11 | } ; 12 | 13 | data_type = { 14 | name = "float" ; 15 | format = "SF_FORMAT_FLOAT" ; 16 | } ; 17 | 18 | data_type = { 19 | name = "double" ; 20 | format = "SF_FORMAT_DOUBLE" ; 21 | } ; 22 | 23 | -------------------------------------------------------------------------------- /source/windows/hidpi.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | True/PM 6 | PerMonitorV2, PerMonitor 7 | 8 | 9 | -------------------------------------------------------------------------------- /source/external/libsndfile/Scripts/linux-to-win-cross-configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | case "$1" in 4 | w32) 5 | compiler_name=i686-w64-mingw32 6 | ;; 7 | w64) 8 | compiler_name=x86_64-w64-mingw32 9 | ;; 10 | *) 11 | echo "$0 (w32|w64) " 12 | exit 0 13 | ;; 14 | esac 15 | 16 | shift 17 | 18 | build_cpu=$(dpkg-architecture -qDEB_BUILD_GNU_CPU) 19 | build_host=$build_cpu-linux 20 | 21 | ./configure --host=$compiler_name --target=$compiler_name --build=$build_host \ 22 | --program-prefix='' --disable-sqlite --disable-static $@ 23 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/make-static-lib-hidden-privates.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # This script takes a static library and removes all non-public symbols. 4 | # Ie, it makes a static lib whose symbols are far less likely to clash with 5 | # the symbols of another shared or static library. 6 | 7 | grep sf_ Symbols.gnu-binutils | sed -e "s/[ ;]//g" > Symbols.static 8 | 9 | ld -r --whole-archive .libs/libsndfile.a -o libsndfile_a.o 10 | 11 | objcopy --keep-global-symbols=Symbols.static libsndfile_a.o libsndfile.o 12 | 13 | rm -f libsndfile.a 14 | ar cru libsndfile.a libsndfile.o 15 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/gsm_destroy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | #include "gsm.h" 8 | #include "config.h" 9 | 10 | #ifdef HAS_STDLIB_H 11 | # include 12 | #else 13 | # ifdef HAS_MALLOC_H 14 | # include 15 | # else 16 | extern void free () ; 17 | # endif 18 | #endif 19 | 20 | void gsm_destroy (gsm S) 21 | { 22 | if (S) 23 | free ((char *) S) ; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/development.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 | 5 | # libsndfile Development 6 | 7 | libsndfile is being developed by a small community of users and hackers. People 8 | interested in helping can raise an issue on Github. 9 | 10 | The main repository can be found on Github: 11 | 12 | 13 | 14 | and includes [instuctions](https://github.com/libsndfile/libsndfile/blob/master/README.md) 15 | on how to build libsndfile from the Git repo. 16 | 17 | If you are interested in how to add a new format to a libsndfile, you may find 18 | this [FAQ](new_file_type_howto.md) helpful. 19 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/rdwr_test.def: -------------------------------------------------------------------------------- 1 | autogen definitions rdwr_test.tpl; 2 | 3 | data_type = { 4 | name = "short" ; 5 | type = "short" ; 6 | format = "SF_FORMAT_PCM_16" ; 7 | } ; 8 | 9 | data_type = { 10 | name = "int" ; 11 | type = "int" ; 12 | format = "SF_FORMAT_PCM_32" ; 13 | } ; 14 | 15 | data_type = { 16 | name = "float" ; 17 | type = "float" ; 18 | format = "SF_FORMAT_FLOAT" ; 19 | } ; 20 | 21 | data_type = { 22 | name = "double" ; 23 | type = "double" ; 24 | format = "SF_FORMAT_DOUBLE" ; 25 | } ; 26 | 27 | data_type = { 28 | name = "raw" ; 29 | type = "unsigned char" ; 30 | format = "SF_FORMAT_PCM_U8" ; 31 | } ; 32 | 33 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/floating_point_test.def: -------------------------------------------------------------------------------- 1 | autogen definitions floating_point_test.tpl; 2 | 3 | endian_type = { 4 | end_name = little ; 5 | end_type = SF_ENDIAN_LITTLE ; 6 | } ; 7 | 8 | endian_type = { 9 | end_name = big ; 10 | end_type = SF_ENDIAN_BIG ; 11 | } ; 12 | 13 | float_type = { 14 | float_name = float ; 15 | minor_type = SF_FORMAT_FLOAT ; 16 | } ; 17 | 18 | float_type = { 19 | float_name = double ; 20 | minor_type = SF_FORMAT_DOUBLE ; 21 | } ; 22 | 23 | int_type = { 24 | int_name = short ; 25 | int_max = "0x7FFF" ; 26 | } ; 27 | 28 | int_type = { 29 | int_name = int ; 30 | int_max = "0x7FFFFFFF" ; 31 | } ; 32 | 33 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ page.title }} 7 | 8 | 9 | 10 | 11 | {{ content }} 12 |
13 |
14 |

The libsndfile home page is here.

15 |

The libsndfile version: {{ site.version }}.

16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/win32.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 | 5 | # Building libsndfile on Win32 6 | 7 | **Note : For pre-compiled binaries for windows, both for win32 and win64, see 8 | the main web page.** 9 | 10 | There are currently two build systems; the official GNU autotool based one and 11 | a more limited and experimental CMake based build system. 12 | 13 | libsndfile is written to be compiled by a compiler which supports large chunks 14 | of the 1999 ISO C Standard (tested with GCC, Clang and Visual Studio 2015). 15 | 16 | It is recommended to use CMake and Visual Studio to build libsndfile on Windows 17 | but you can try the [MinGW](http://www.mingw.org/) compiler suite with Autotools 18 | or CMake buildsystem. 19 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, 2 | Technische Universitaet Berlin 3 | 4 | Any use of this software is permitted provided that this notice is not 5 | removed and that neither the authors nor the Technische Universitaet Berlin 6 | are deemed to have made any representations as to the suitability of this 7 | software for any purpose nor are held responsible for any defects of 8 | this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 9 | 10 | As a matter of courtesy, the authors request to be informed about uses 11 | this software has found, about bugs in this software, and about any 12 | improvements that may be of general interest. 13 | 14 | Berlin, 28.11.1994 15 | Jutta Degener 16 | Carsten Bormann 17 | -------------------------------------------------------------------------------- /changeLog.txt: -------------------------------------------------------------------------------- 1 | 2 | Vutu change log 3 | ------------------------- 4 | 5 | version 0.9.10: Nov 30, 2023 6 | - increased noise width range 7 | 8 | version 0.9.9: Nov 22, 2023 9 | - added export button labels 10 | - changed UI lib for Mojave compatibility 11 | 12 | version 0.9.8: Nov 8, 2023 13 | - fixed bugs 14 | - increased max import time to 60s 15 | 16 | version 0.9.7: Aug 28, 2023 17 | - added source in/out GUI 18 | - improved partials drawing 19 | - fixed play click at end bug 20 | 21 | version 0.9.6: Jun 17, 2023 22 | - added fundamental pitch setting 23 | - added noise width 24 | - freq display to log scale 25 | 26 | version 0.9.5: Jan 21, 2023 27 | - added audio export 28 | 29 | version 0.9.4: Jan 16, 2023 30 | - fixed startup bug 31 | 32 | verson 0.9.3: Jan 7, 2023 33 | - first public working version. 34 | 35 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/test_endswap.def: -------------------------------------------------------------------------------- 1 | autogen definitions test_endswap.tpl; 2 | 3 | int_type = { 4 | name = short ; 5 | value = '0x3210' ; 6 | format = FMT_SHORT ; 7 | } ; 8 | 9 | int_type = { 10 | name = int ; 11 | value = '0x76543210' ; 12 | format = FMT_INT ; 13 | } ; 14 | 15 | int_type = { 16 | name = int64_t ; 17 | value = '0x0807050540302010LL' ; 18 | format = FMT_INT64 ; 19 | } ; 20 | 21 | int_size = { 22 | name = 16 ; 23 | typename = int16_t ; 24 | value = '0x4142' ; 25 | strval = "AB" ; 26 | } ; 27 | 28 | int_size = { 29 | name = 32 ; 30 | typename = int32_t ; 31 | value = '0x30313233' ; 32 | strval = "0123" ; 33 | } ; 34 | 35 | int_size = { 36 | name = 64 ; 37 | typename = int64_t ; 38 | value = '0x3031323334353637' ; 39 | strval = "01234567" ; 40 | } ; 41 | -------------------------------------------------------------------------------- /source/external/libsndfile/man/sndfile-play.1: -------------------------------------------------------------------------------- 1 | .Dd September 10, 2021 2 | .Dt SNDFILE-PLAY 1 3 | .Os 4 | .Sh NAME 5 | .Nm sndfile-play 6 | .Nd play a sound file 7 | .Sh SYNOPSIS 8 | .Nm sndfile-play 9 | .Ar 10 | .Sh DESCRIPTION 11 | .Nm 12 | plays one or more sound files on various operating systems using standard audio 13 | output APIs. The following table summarizes which audio API is used where: 14 | .Pp 15 | .Bl -tag -width MacOSX10XXX -compact 16 | .It Linux 17 | ALSA or OSS 18 | .It OpenBSD 19 | sndio 20 | .It FreeBSD 21 | /dev/dsp (OSS) 22 | .It NetBSD 23 | /dev/audio 24 | .It Solaris 25 | /dev/audio 26 | .It MacOSX 10.6 27 | CoreAudio 28 | .It MacOSX 10.7 29 | AudioToolbox 30 | .It Win32 31 | waveOut 32 | .El 33 | .Sh SEE ALSO 34 | .Lk http://libsndfile.github.io/libsndfile/ 35 | .Sh AUTHORS 36 | .An Erik de Castro Lopo Aq Mt erikd@mega-nerd.com 37 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/embedded_files.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 | 5 | # Embedded Sound Files 6 | 7 | By using the open SNDFILE with a file descriptor function: 8 | 9 | SNDFILE* sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) ; 10 | 11 | it is possible to open sound files embedded within larger files. There are 12 | however a couple of caveats: 13 | 14 | * Read/Write mode (SFM_RDWR) is not supported. 15 | * Writing of embedded files is only supported at the end of the file. 16 | * Reading of embedded files is only supported at file offsets greater than zero. 17 | * Not all file formats are supported (currently only WAV, AIFF and AU). 18 | 19 | The test program **multi_file_test.c** in the **tests/** directory of the source 20 | code tarball shows how this functionality is used to read and write embedded 21 | files. 22 | -------------------------------------------------------------------------------- /source/external/libsndfile/Octave/Readme.txt: -------------------------------------------------------------------------------- 1 | The libsndfile Modules for GNU Octave 2 | ===================================== 3 | 4 | These modules are currently known to work with version 3.0 of GNU Octave on 5 | Linux. They have not been tested elsewhere. 6 | 7 | 8 | Build Requirements 9 | ------------------ 10 | 11 | In order to build these libsndfile related modules for GNU Octave on a Debian 12 | GNU/Linux (or Debian derived) system, you will need (on top of what is normally 13 | required to build libsndfile) the package: 14 | 15 | octaveX.Y-headers 16 | 17 | where X.Y matches the version number of your installation of GNU Octave. 18 | 19 | The configure script in the top level libsndfile directory will detect the 20 | presence and correct versions of the Octave build tools. The building of these 21 | modules will only go ahead if everything is correct. 22 | 23 | 24 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/gsm_create.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | #include "config.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | 14 | 15 | #include "gsm.h" 16 | #include "gsm610_priv.h" 17 | 18 | gsm gsm_create (void) 19 | { 20 | gsm r ; 21 | 22 | r = malloc (sizeof (struct gsm_state)) ; 23 | if (!r) return r ; 24 | 25 | memset ((char *) r, 0, sizeof (struct gsm_state)) ; 26 | r->nrp = 40 ; 27 | 28 | return r ; 29 | } 30 | 31 | /* Added for libsndfile : May 6, 2002. Not sure if it works. */ 32 | void gsm_init (gsm state) 33 | { 34 | memset (state, 0, sizeof (struct gsm_state)) ; 35 | state->nrp = 40 ; 36 | } 37 | 38 | -------------------------------------------------------------------------------- /source/external/libsndfile/man/sndfile-concat.1: -------------------------------------------------------------------------------- 1 | .Dd November 2, 2014 2 | .Dt SNDFILE-CONCAT 1 3 | .Os 4 | .Sh NAME 5 | .Nm sndfile-concat 6 | .Nd concatenate audio data from two or more audio files 7 | .Sh SYNOPSIS 8 | .Nm sndfile-concat 9 | .Ar infile1 10 | .Ar infile2 11 | .Ar ... 12 | .Ar outfile 13 | .Sh DESCRIPTION 14 | .Nm 15 | generates a new output file by concatenating the audio data 16 | of two or more input files. The encoding of the output file 17 | is the encoding used in 18 | .Ar infile1 . 19 | Audio data from the subsequent files are converted to this encoding. 20 | The only restriction is that the files must have 21 | the same number of channels. 22 | The output file is overwritten if it already exists. 23 | .Sh EXIT STATUS 24 | .Ex -std 25 | .Sh SEE ALSO 26 | .Lk http://libsndfile.github.io/libsndfile/ 27 | .Sh AUTHORS 28 | .An Erik de Castro Lopo Aq Mt erikd@mega-nerd.com 29 | -------------------------------------------------------------------------------- /source/external/libsndfile/man/sndfile-salvage.1: -------------------------------------------------------------------------------- 1 | .Dd November 2, 2014 2 | .Dt SNDFILE-SALVAGE 1 3 | .Os 4 | .Sh NAME 5 | .Nm sndfile-salvage 6 | .Nd salvage audio data from WAV files longer than 4G 7 | .Sh SYNOPSIS 8 | .Nm sndfile-salvage 9 | .Ar toolong.wav 10 | .Ar fixed64.wav 11 | .Sh DESCRIPTION 12 | Audio files using the WAV file container are inherently limited to 4G of data 13 | size fields in the WAV header being stored as unsigned 32bit integers. 14 | Many applications have trouble with these WAV files 15 | that are more the 4G in size. 16 | .Nm 17 | rewrites the WAV file into a W64 file with the same audio content. 18 | This file is overwritten if it already exists. 19 | .Sh EXIT STATUS 20 | .Ex -std 21 | .Sh SEE ALSO 22 | .Lk http://libsndfile.github.io/libsndfile/ 23 | .\".Lk http://en.wikipedia.org/wiki/RF64 24 | .Sh AUTHORS 25 | .An Erik de Castro Lopo Aq Mt erikd@mega-nerd.com 26 | -------------------------------------------------------------------------------- /source/external/libsndfile/man/sndfile-cmp.1: -------------------------------------------------------------------------------- 1 | .Dd November 2, 2014 2 | .Dt SNDFILE-CMP 1 3 | .Os 4 | .Sh NAME 5 | .Nm sndfile-cmp 6 | .Nd compare two audio files 7 | .Sh SYNOPSIS 8 | .Nm sndfile-cmp 9 | .Ar file1 10 | .Ar file2 11 | .Sh DESCRIPTION 12 | .Nm 13 | compares the audio data of two sound files. 14 | For two files to compare as being the same, their channel counts, sample rate, 15 | audio data lengths and actual audio data must match. 16 | Other differences such as string metadata like song title, artist etc and their 17 | presence or absence are ignored. 18 | .Sh EXIT STATUS 19 | .Bl -tag -width 1n -compact 20 | .It 0 21 | The audio data is the same. 22 | .It 1 23 | The audio data differs. 24 | .El 25 | .Sh SEE ALSO 26 | .Lk http://libsndfile.github.io/libsndfile/ 27 | .Sh AUTHORS 28 | .An Conrad Parker Aq Mt conrad@metadecks.org 29 | .An Erik de Castro Lopo Aq Mt erikd@mega-nerd.com 30 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/utils.def: -------------------------------------------------------------------------------- 1 | autogen definitions utils.tpl; 2 | 3 | float_type = { 4 | name = float ; 5 | }; 6 | 7 | float_type = { 8 | name = double ; 9 | }; 10 | 11 | /*----------------------------------*/ 12 | 13 | io_type = { 14 | io_element = short ; 15 | format_str = "\"% d\"" ; 16 | }; 17 | 18 | io_type = { 19 | io_element = int ; 20 | format_str = "\"% d\"" ; 21 | }; 22 | 23 | io_type = { 24 | io_element = float ; 25 | format_str = "\"% g\"" ; 26 | }; 27 | 28 | io_type = { 29 | io_element = double ; 30 | format_str = "\"% g\"" ; 31 | }; 32 | 33 | read_op = { 34 | op_element = read ; 35 | count_name = items ; 36 | }; 37 | 38 | read_op = { 39 | op_element = readf ; 40 | count_name = frames ; 41 | }; 42 | 43 | write_op = { 44 | op_element = write ; 45 | count_name = items ; 46 | }; 47 | 48 | write_op = { 49 | op_element = writef ; 50 | count_name = frames ; 51 | }; 52 | 53 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | #ifndef CONFIG_H 8 | #define CONFIG_H 9 | 10 | #define HAS_STDLIB_H 1 /* /usr/include/stdlib.h */ 11 | #define HAS_FCNTL_H 1 /* /usr/include/fcntl.h */ 12 | 13 | #define HAS_FSTAT 1 /* fstat syscall */ 14 | #define HAS_FCHMOD 1 /* fchmod syscall */ 15 | #define HAS_CHMOD 1 /* chmod syscall */ 16 | #define HAS_FCHOWN 1 /* fchown syscall */ 17 | #define HAS_CHOWN 1 /* chown syscall */ 18 | 19 | #define HAS_STRING_H 1 /* /usr/include/string.h */ 20 | 21 | #define HAS_UNISTD_H 1 /* /usr/include/unistd.h */ 22 | #define HAS_UTIME 1 /* POSIX utime(path, times) */ 23 | #define HAS_UTIME_H 1 /* UTIME header file */ 24 | 25 | #endif /* CONFIG_H */ 26 | 27 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/generate.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2007-2011 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU General Public License as published by 6 | ** the Free Software Foundation; either version 2 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | void generate_file (const char * filename, int format, int len) ; 20 | -------------------------------------------------------------------------------- /source/mac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | Vutu 7 | NSHumanReadableCopyright 8 | 2022 Madrona Labs LLC 9 | CFBundleDevelopmentRegion 10 | English 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIconFile 14 | vutu.icns 15 | CFBundleIdentifier 16 | com.madronalabs.vutu 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundleVersion 20 | 0.9.10 21 | CFBundleShortVersionString 22 | 0.9.10 23 | CSResourcesFileMapped 24 | 25 | NSHighResolutionCapable 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/version-metadata.rc.in: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS 4 | 1 VERSIONINFO 5 | FILEVERSION @WIN_RC_VERSION@,0 6 | PRODUCTVERSION @WIN_RC_VERSION@,0 7 | FILEOS VOS__WINDOWS32 8 | FILETYPE VFT_DLL 9 | FILESUBTYPE VFT2_UNKNOWN 10 | FILEFLAGSMASK 0x00000000 11 | FILEFLAGS 0x00000000 12 | { 13 | BLOCK "StringFileInfo" 14 | { 15 | BLOCK "040904e4" 16 | { 17 | VALUE "FileDescription", "A library for reading and writing audio files." 18 | VALUE "FileVersion", "@CLEAN_VERSION@.0\0" 19 | VALUE "Full Version", "@PACKAGE_VERSION@" 20 | VALUE "InternalName", "libsndfile" 21 | VALUE "LegalCopyright", "Copyright (C) 1999-2012, Licensed LGPL" 22 | VALUE "ProductName", "libsndfile-1 DLL" 23 | VALUE "ProductVersion", "@CLEAN_VERSION@.0\0" 24 | VALUE "Language", "Language Neutral" 25 | } 26 | } 27 | BLOCK "VarFileInfo" 28 | { 29 | VALUE "Translation", 0x0409, 0x04E4 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vutu 2 | 3 | `vutu` uses the the [loris](http://www.cerlsoundgroup.org/Loris/) library to analyze and synthesize sounds. 4 | 5 | ## building 6 | 7 | The following libraries are required: 8 | - [Loris](https://github.com/madronalabs/loris) 9 | - [madronalib](https://github.com/madronalabs/madronalib) 10 | - [mlvg](https://github.com/madronalabs/mlvg) 11 | - [SDL2](https://www.libsdl.org) 12 | 13 | Vutu can be built with CMake: 14 | ``` 15 | - mkdir build 16 | - cd build 17 | - cmake -GXcode .. (for Mac) 18 | ``` 19 | 20 | The libsndfile and libresample libraries are also included. Because some configuration is required to get these to work, they are compiled here from source. 21 | 22 | On MacOS, we link to SDL2.framework. Get the latest SDL2 .dmg, place SDL2.framework into /Library/Frameworks, and CMake should take care of the rest. 23 | 24 | Everything is theoretically cross-platform but I'm currently working on Mac and have not been testing on Windows. 25 | 26 | -------------------------------------------------------------------------------- /source/external/libsndfile/man/sndfile-info.1: -------------------------------------------------------------------------------- 1 | .Dd November 2, 2014 2 | .Dt SNDFILE-INFO 1 3 | .Os 4 | .Sh NAME 5 | .Nm sndfile-info 6 | .Nd display information about sound files 7 | .Sh SYNOPSIS 8 | .Nm sndfile-info 9 | .Op Fl -broadcast 10 | .Op Fl -cart 11 | .Op Fl -channel-map 12 | .Op Fl -instrument 13 | .Ar 14 | .Sh DESCRIPTION 15 | .Nm 16 | displays basic information about sound files 17 | such as format, number of channels, samplerate, and length. 18 | The following options are recognized: 19 | .Pp 20 | .Bl -tag -compact -width channelmapXXXX 21 | .It Fl -broadcast 22 | Display broadcast (BWF) info. 23 | .It Fl -cart 24 | Display the cart chunk of a WAV (or related) file. 25 | .It Fl -channel-map 26 | Display channel map. 27 | .It Fl -instrument 28 | Display instrument info: 29 | a base note, gain, velocity, key, and loop points. 30 | .El 31 | .Sh SEE ALSO 32 | .Lk http://libsndfile.github.io/libsndfile/ 33 | .Sh AUTHORS 34 | .An Erik de Castro Lopo Aq Mt erikd@mega-nerd.com . 35 | -------------------------------------------------------------------------------- /source/external/libresample/src/filterkit.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | 3 | resamplesubs.c 4 | 5 | Real-time library interface by Dominic Mazzoni 6 | 7 | Based on resample-1.7: 8 | http://www-ccrma.stanford.edu/~jos/resample/ 9 | 10 | Dual-licensed as LGPL and BSD; see README.md and LICENSE* files. 11 | 12 | **********************************************************************/ 13 | 14 | /* Definitions */ 15 | #include "resample_defs.h" 16 | 17 | /* 18 | * FilterUp() - Applies a filter to a given sample when up-converting. 19 | * FilterUD() - Applies a filter to a given sample when up- or down- 20 | */ 21 | 22 | float lrsFilterUp(float Imp[], float ImpD[], UWORD Nwing, BOOL Interp, 23 | float *Xp, double Ph, int Inc); 24 | 25 | float lrsFilterUD(float Imp[], float ImpD[], UWORD Nwing, BOOL Interp, 26 | float *Xp, double Ph, int Inc, double dhb); 27 | 28 | void lrsLpFilter(double c[], int N, double frq, double Beta, int Num); 29 | -------------------------------------------------------------------------------- /source/external/libsndfile/Octave/format.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2007-2011 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU Lesser General Public License as published by 6 | ** the Free Software Foundation; either version 2.1 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU Lesser General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU Lesser General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | int format_of_str (const std::string & fmt) ; 20 | 21 | void string_of_format (std::string & fmt, int format) ; 22 | -------------------------------------------------------------------------------- /source/external/libsndfile/ossfuzz/ossfuzz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | # This script is called by the oss-fuzz main project when compiling the fuzz 4 | # targets. This script is regression tested by ci_oss.sh. 5 | 6 | # Save off the current folder as the build root. 7 | export BUILD_ROOT=$PWD 8 | 9 | echo "CC: ${CC:-}" 10 | echo "CXX: ${CXX:-}" 11 | echo "LIB_FUZZING_ENGINE: ${LIB_FUZZING_ENGINE:-}" 12 | echo "CFLAGS: ${CFLAGS:-}" 13 | echo "CXXFLAGS: ${CXXFLAGS:-}" 14 | echo "OUT: ${OUT:-}" 15 | 16 | export MAKEFLAGS+="-j$(nproc)" 17 | 18 | # Install dependencies 19 | apt-get -y install autoconf autogen automake libtool pkg-config python 20 | 21 | # For now, do not install the following libraries (as they won't be in the 22 | # final image): 23 | # libasound2-dev libflac-dev libogg-dev libopus-dev libvorbis-dev 24 | 25 | # Compile the fuzzer. 26 | autoreconf -vif 27 | ./configure --disable-shared --enable-ossfuzzers 28 | make V=1 29 | 30 | # Copy the fuzzer to the output directory. 31 | cp -v ossfuzz/sndfile_fuzzer $OUT/ 32 | cp -v ossfuzz/sndfile_alt_fuzzer $OUT/ 33 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/_layouts/home.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | keywords: WAV AIFF AU SVX PAF NIST W64 libsndfile sound audio dsp Linux 4 | robots: nofollow 5 | title: libsndfile home page 6 | --- 7 | 8 | 29 | 30 |
31 |
32 | {{ content }} 33 |
34 |
35 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/pcm_test.def: -------------------------------------------------------------------------------- 1 | autogen definitions pcm_test.tpl; 2 | 3 | data_type = { 4 | name = "bits_8" ; 5 | item_count = 127 ; 6 | short_func = "arith_shift_left (k * ((k % 2) ? 1 : -1), 8)" ; 7 | int_func = "arith_shift_left (k * ((k % 2) ? 1 : -1), 24)" ; 8 | float_func = "(k * ((k % 2) ? 1 : -1))" ; 9 | } ; 10 | 11 | data_type = { 12 | name = "bits_16" ; 13 | item_count = 1024 ; 14 | short_func = "(k * ((k % 2) ? 3 : -3))" ; 15 | int_func = "arith_shift_left (k * ((k % 2) ? 3 : -3), 16)" ; 16 | float_func = "(k * ((k % 2) ? 3 : -3))" ; 17 | } ; 18 | 19 | data_type = { 20 | name = "bits_24" ; 21 | item_count = 1024 ; 22 | short_func = "(k * ((k % 2) ? 3 : -3))" ; 23 | int_func = "arith_shift_left (k * ((k % 2) ? 3333 : -3333), 8)" ; 24 | float_func = "(k * ((k % 2) ? 3333 : -3333))" ; 25 | } ; 26 | 27 | data_type = { 28 | name = "bits_32" ; 29 | item_count = 1024 ; 30 | short_func = "(k * ((k % 2) ? 3 : -3))" ; 31 | int_func = "(k * ((k % 2) ? 333333 : -333333))" ; 32 | float_func = "(k * ((k % 2) ? 333333 : -333333))" ; 33 | } ; 34 | 35 | -------------------------------------------------------------------------------- /source/external/libsndfile/ossfuzz/sndfile_fuzzer.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "sndfile_fuzz_header.h" 9 | 10 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) 11 | { VIO_DATA vio_data ; 12 | SF_VIRTUAL_IO vio ; 13 | SF_INFO sndfile_info ; 14 | SNDFILE *sndfile = NULL ; 15 | float* read_buffer = NULL ; 16 | 17 | int err = sf_init_file(data, size, &sndfile, &vio_data, &vio, &sndfile_info) ; 18 | if (err) 19 | goto EXIT_LABEL ; 20 | 21 | // Just the right number of channels. Create some buffer space for reading. 22 | read_buffer = (float*)malloc(sizeof(float) * sndfile_info.channels); 23 | if (read_buffer == NULL) 24 | abort() ; 25 | 26 | while (sf_readf_float(sndfile, read_buffer, 1)) 27 | { 28 | // Do nothing with the data. 29 | } 30 | 31 | EXIT_LABEL: 32 | 33 | if (sndfile != NULL) 34 | sf_close(sndfile) ; 35 | 36 | free(read_buffer) ; 37 | 38 | return 0 ; 39 | } 40 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/sndfile_info.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: sndfile-info 4 | --- 5 | 6 | Here is an example of the output from the **sndfile-info** program 7 | distributed with libsndfile. 8 | 9 | This file was opened and parsed correctly but had been truncated so that 10 | the values in the **FORM** and **SSND** chunks were incorrect. 11 | 12 | ``` 13 | erikd@hendrix > examples/sndfile-info truncated.aiff 14 | truncated.aiff 15 | size : 200000 16 | FORM : 307474 (should be 199992) 17 | AIFF 18 | COMM : 18 19 | Sample Rate : 16000 20 | Samples : 76857 21 | Channels : 2 22 | Sample Size : 16 23 | SSND : 307436 (should be 199946) 24 | Offset : 0 25 | Block Size : 0 26 | 27 | -------------------------------- 28 | Sample Rate : 16000 29 | Frames : 76857 30 | Channels : 2 31 | Bit Width : 16 32 | Format : 0x00020001 33 | Sections : 1 34 | Seekable : TRUE 35 | Signal Max : 32766 36 | ``` 37 | -------------------------------------------------------------------------------- /source/external/libsndfile/m4/flexible_array.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis MN_C99_FLEXIBLE_ARRAY 2 | dnl 3 | dnl Dose the compiler support the 1999 ISO C Standard "stuct hack". 4 | dnl @version 1.1 Mar 15 2004 5 | dnl @author Erik de Castro Lopo 6 | dnl 7 | dnl Permission to use, copy, modify, distribute, and sell this file for any 8 | dnl purpose is hereby granted without fee, provided that the above copyright 9 | dnl and this permission notice appear in all copies. No representations are 10 | dnl made about the suitability of this software for any purpose. It is 11 | dnl provided "as is" without express or implied warranty. 12 | 13 | AC_DEFUN([MN_C99_FLEXIBLE_ARRAY], 14 | [AC_CACHE_CHECK(C99 struct flexible array support, 15 | ac_cv_c99_flexible_array, 16 | 17 | # Initialize to unknown 18 | ac_cv_c99_flexible_array=no 19 | 20 | AC_TRY_LINK([[ 21 | #include 22 | typedef struct { 23 | int k; 24 | char buffer [] ; 25 | } MY_STRUCT ; 26 | ]], 27 | [ MY_STRUCT *p = calloc (1, sizeof (MY_STRUCT) + 42); ], 28 | ac_cv_c99_flexible_array=yes, 29 | ac_cv_c99_flexible_array=no 30 | ))] 31 | ) # MN_C99_FLEXIBLE_ARRAY 32 | 33 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/scale_clip_test.def: -------------------------------------------------------------------------------- 1 | autogen definitions scale_clip_test.tpl; 2 | 3 | float_type = { 4 | float_type_name = "float" ; 5 | float_short_name = "flt" ; 6 | float_upper_name = "FLOAT" ; 7 | float_to_int = "lrintf" ; 8 | } ; 9 | 10 | float_type = { 11 | float_type_name = "double" ; 12 | float_short_name = "dbl" ; 13 | float_upper_name = "DOUBLE" ; 14 | float_to_int = "lrint" ; 15 | } ; 16 | 17 | 18 | 19 | int_type = { 20 | int_type_name = "short" ; 21 | int_short_name = "s" ; 22 | int_max_value = "0x7FFFF" ; 23 | } ; 24 | 25 | int_type = { 26 | int_type_name = "int" ; 27 | int_short_name = "i" ; 28 | int_max_value = "0x7FFFFFFF" ; 29 | } ; 30 | 31 | 32 | 33 | data_type = { 34 | name = "16" ; 35 | bit_count = 16 ; 36 | error_val = "1.0 / 0x8000" ; 37 | } ; 38 | 39 | data_type = { 40 | name = "24" ; 41 | bit_count = 24 ; 42 | error_val = "1.0 / 0x800000" ; 43 | } ; 44 | 45 | data_type = { 46 | name = "32" ; 47 | bit_count = 32 ; 48 | error_val = "1.0 / 0x80000000" ; 49 | } ; 50 | 51 | data_type = { 52 | name = "08" ; 53 | bit_count = 8 ; 54 | error_val = "1.0 / 0x80" ; 55 | } ; 56 | 57 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/dft_cmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2002-2015 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU General Public License as published by 6 | ** the Free Software Foundation; either version 2 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | 20 | #define DFT_DATA_LENGTH (8192) 21 | 22 | double dft_cmp_float (int linenum, const float *orig, const float *test, int len, double tolerance, int allow_exit) ; 23 | 24 | double dft_cmp_double (int linenum, const double *orig, const double *test, int len, double tolerance, int allow_exit) ; 25 | 26 | -------------------------------------------------------------------------------- /source/common/vutuView.h: -------------------------------------------------------------------------------- 1 | // VST3 example code for madronalib 2 | // (c) 2020, Madrona Labs LLC, all rights reserved 3 | // see LICENSE.txt for details 4 | 5 | #pragma once 6 | 7 | #include "MLAppView.h" 8 | #include "MLPlatformView.h" 9 | #include "MLWidget.h" 10 | #include "MLView.h" 11 | 12 | #include "vutuParameters.h" 13 | 14 | // constrain window if true 15 | constexpr bool kFixedRatioSize {false}; 16 | const Vec2 kDefaultGridUnits{ 32, 16 }; 17 | const int kDefaultGridUnitSize(36); 18 | 19 | const ml::Rect kDefaultPopupSize{0, 0, 3.5, 3.5}; 20 | const ml::Rect kDefaultPopupStartRect{0, 0, 1, 1}; 21 | 22 | 23 | class VutuView final : 24 | public ml::AppView 25 | { 26 | public: 27 | 28 | VutuView(TextFragment appName, size_t instanceNum); 29 | ~VutuView(); 30 | 31 | // AppView interface 32 | void initializeResources(NativeDrawContext* nvg) override; 33 | void layoutView(DrawContext dc) override; 34 | void onGUIEvent(const GUIEvent& event) override {}; 35 | void onResize(Vec2 newSize) override {}; 36 | 37 | // Actor interface 38 | void onMessage(Message m) override; 39 | 40 | // VutuView interface 41 | void makeWidgets(const ParameterDescriptionList& pdl); 42 | 43 | 44 | }; 45 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/id3.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2008-2019 Erik de Castro Lopo 3 | ** Copyright (C) 2019 Arthur Taylor 4 | ** 5 | ** This program is free software ; you can redistribute it and/or modify 6 | ** it under the terms of the GNU Lesser General Public License as published by 7 | ** the Free Software Foundation ; either version 2.1 of the License, or 8 | ** (at your option) any later version. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY ; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU Lesser General Public License for more details. 14 | ** 15 | ** You should have received a copy of the GNU Lesser General Public License 16 | ** along with this program ; if not, write to the Free Software 17 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef SF_SRC_ID3_H 21 | #define SF_SRC_ID3_H 22 | 23 | int id3_skip (SF_PRIVATE * psf) ; 24 | 25 | const char *id3_lookup_v1_genre (int number) ; 26 | 27 | const char *id3_process_v2_genre (const char *genre) ; 28 | 29 | #endif /* SF_SRC_ID3_H */ 30 | -------------------------------------------------------------------------------- /source/external/libsndfile/vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", 3 | "name": "libsndfile", 4 | "description": "A library for reading and writing audio files", 5 | "version-semver": "1.1.0", 6 | "default-features": [ 7 | "external-libs", 8 | "mpeg" 9 | ], 10 | "features": { 11 | "external-libs": { 12 | "description": "Enable FLAC, Vorbis, and Opus codecs", 13 | "dependencies": [ 14 | "libvorbis", 15 | "libflac", 16 | "opus" 17 | ] 18 | }, 19 | "mpeg": { 20 | "description": "Enable MPEG codecs", 21 | "dependencies": [ 22 | "mpg123", 23 | "mp3lame" 24 | ] 25 | }, 26 | "regtest": { 27 | "description": "Build regtest", 28 | "dependencies": [ 29 | "sqlite3" 30 | ] 31 | }, 32 | "experimental": { 33 | "description": "Enable experimental code", 34 | "dependencies": [ 35 | "speex" 36 | ] 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/SndFileConfig.cmake.in: -------------------------------------------------------------------------------- 1 | set(SndFile_VERSION @PROJECT_VERSION@) 2 | set(SndFile_VERSION_MAJOR @PROJECT_VERSION_MAJOR@) 3 | set(SndFile_VERSION_MINOR @PROJECT_VERSION_MINOR@) 4 | set(SndFile_VERSION_PATCH @PROJECT_VERSION_PATCH@) 5 | 6 | set (SndFile_WITH_EXTERNAL_LIBS @SndFile_WITH_EXTERNAL_LIBS@) 7 | set (SndFile_WITH_MPEG @SndFile_WITH_MPEG@) 8 | 9 | @PACKAGE_INIT@ 10 | 11 | include (CMakeFindDependencyMacro) 12 | 13 | if (SndFile_WITH_EXTERNAL_LIBS AND NOT @BUILD_SHARED_LIBS@) 14 | find_dependency (Ogg 1.3) 15 | find_dependency (Vorbis) 16 | find_dependency (FLAC) 17 | find_dependency (Opus) 18 | endif () 19 | 20 | if (SndFile_WITH_MPEG AND NOT @BUILD_SHARED_LIBS@) 21 | find_dependency (mp3lame) 22 | find_dependency (MPG123) 23 | endif () 24 | 25 | include (${CMAKE_CURRENT_LIST_DIR}/SndFileTargets.cmake) 26 | 27 | set_and_check (SndFile_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") 28 | set (SNDFILE_INCLUDE_DIR ${SndFile_INCLUDE_DIR}) 29 | 30 | set (SndFile_LIBRARY SndFile::sndfile) 31 | set (SNDFILE_LIBRARY SndFile::sndfile) 32 | set (SndFile_LIBRARIES SndFile::sndfile) 33 | set (SNDFILE_LIBRARIES SndFile::sndfile) 34 | 35 | 36 | check_required_components(SndFile) 37 | 38 | set (SNDFILE_FOUND 1) 39 | -------------------------------------------------------------------------------- /source/external/libsndfile/ossfuzz/ci_oss.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | PROJECT_NAME=libsndfile 6 | 7 | # Clone the oss-fuzz repository 8 | git clone https://github.com/google/oss-fuzz.git /tmp/ossfuzz 9 | 10 | if [[ ! -d /tmp/ossfuzz/projects/${PROJECT_NAME} ]] 11 | then 12 | echo "Could not find the ${PROJECT_NAME} project in ossfuzz" 13 | 14 | # Exit with a success code while the libsndfile project is not expected to exist 15 | # on oss-fuzz. 16 | exit 0 17 | fi 18 | 19 | # Work out which branch to clone from, inside Docker 20 | BRANCH=${GITHUB_REF} 21 | 22 | # Modify the oss-fuzz Dockerfile so that we're checking out the current reference on CI. 23 | sed -i "s@RUN.*@RUN git config --global remote.origin.fetch '+refs/pull/*:refs/remotes/origin/pull/*' \&\& git clone https://github.com/libsndfile/libsndfile.git /src/libsndfile \&\& cd /src/libsndfile \&\& git checkout -b ${BRANCH}@" /tmp/ossfuzz/projects/${PROJECT_NAME}/Dockerfile 24 | 25 | # Try and build the fuzzers 26 | pushd /tmp/ossfuzz 27 | python3 infra/helper.py build_image --pull ${PROJECT_NAME} 28 | python3 infra/helper.py build_fuzzers ${PROJECT_NAME} 29 | python3 infra/helper.py check_build ${PROJECT_NAME} --engine libfuzzer --sanitizer address --architecture x86_64 30 | popd 31 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/ALAC/EndianPortable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Apple Inc. All rights reserved. 3 | ** Copyright (C) 2013-2014 Erik de Castro Lopo 4 | * 5 | * @APPLE_APACHE_LICENSE_HEADER_START@ 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License") ; 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | * @APPLE_APACHE_LICENSE_HEADER_END@ 20 | */ 21 | 22 | // 23 | // EndianPortable.h 24 | // 25 | // Copyright 2011 Apple Inc. All rights reserved. 26 | // 27 | 28 | #ifndef _EndianPortable_h 29 | #define _EndianPortable_h 30 | 31 | #include 32 | 33 | #define Swap16NtoB(x) H2BE_16 (x) 34 | #define Swap16BtoN(x) BE2H_16 (x) 35 | 36 | #define Swap32NtoB(x) H2BE_32 (x) 37 | #define Swap32BtoN(x) BE2H_32 (x) 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/ALAC/shift.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2014 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU Lesser General Public License as published by 6 | ** the Free Software Foundation; either version 2.1 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU Lesser General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU Lesser General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #if __GNUC__ 20 | #define ALWAYS_INLINE __attribute__ ((always_inline)) 21 | #elif defined _MSC_VER 22 | #define ALWAYS_INLINE __forceinline 23 | #else 24 | #define ALWAYS_INLINE 25 | #endif 26 | 27 | 28 | static inline int32_t ALWAYS_INLINE 29 | arith_shift_left (int32_t x, int shift) 30 | { return (int32_t) (((uint32_t) x) << shift) ; 31 | } /* arith_shift_left */ 32 | -------------------------------------------------------------------------------- /source/external/libresample/include/libresample.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | 3 | resample.h 4 | 5 | Real-time library interface by Dominic Mazzoni 6 | 7 | Based on resample-1.7: 8 | http://www-ccrma.stanford.edu/~jos/resample/ 9 | 10 | Dual-licensed as LGPL and BSD; see README.md and LICENSE* files. 11 | 12 | **********************************************************************/ 13 | 14 | #pragma once 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif /* __cplusplus */ 19 | 20 | void *resample_open(int highQuality, 21 | double minFactor, 22 | double maxFactor); 23 | 24 | void *resample_dup(const void *handle); 25 | 26 | int resample_get_filter_width(const void *handle); 27 | 28 | int resample_process(void *handle, 29 | double factor, 30 | const float *inBuffer, 31 | int inBufferLen, 32 | int lastFlag, 33 | int *inBufferUsed, 34 | float *outBuffer, 35 | int outBufferLen); 36 | 37 | void resample_close(void *handle); 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif /* __cplusplus */ 42 | 43 | -------------------------------------------------------------------------------- /source/common/version.h: -------------------------------------------------------------------------------- 1 | 2 | // vutu (c) 2022, Madrona Labs LLC, all rights reserved 3 | // see LICENSE.txt for details 4 | 5 | #define MAJOR_VERSION_STR "0" 6 | #define MAJOR_VERSION_INT 0 7 | 8 | #define SUB_VERSION_STR "9" 9 | #define SUB_VERSION_INT 9 10 | 11 | #define RELEASE_NUMBER_STR "10" 12 | #define RELEASE_NUMBER_INT 10 13 | 14 | #define BETA_NUMBER_STR "0" 15 | #define BETA_NUMBER_INT 0 16 | 17 | #define BUILD_NUMBER_INT 0 18 | 19 | #define SHORT_VERSION_STR "0.9.10" 20 | #define VERSION_STR SHORT_VERSION_STR 21 | 22 | #define FULL_VERSION_STR "0.9.10" 23 | 24 | #if defined(__x86_64__) || defined(_M_X64) 25 | #define ML_ARCH "x86_64" 26 | #elif defined(i386) || defined(__i386__) || defined(__i386) || defined(_M_IX86) 27 | #define ML_ARCH "x86_32"; 28 | #elif defined(__arm__) || defined(__aarch64__) 29 | #define ML_ARCH "Arm" 30 | #else 31 | #define ML_ARCH "unknown" 32 | warning ML_ARCH is undefined! 33 | #endif 34 | 35 | inline const char* getAppVersion() 36 | { 37 | return (FULL_VERSION_STR); 38 | } 39 | 40 | inline const char* getAppName() 41 | { 42 | return (stringPluginName); 43 | } 44 | 45 | inline const char* getMakerName() 46 | { 47 | return (stringCompanyName); 48 | } 49 | 50 | inline const char* getAppArchitecture() 51 | { 52 | return (ML_ARCH); 53 | } 54 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/CheckCPUArch.cmake: -------------------------------------------------------------------------------- 1 | macro (_CHECK_CPU_ARCH ARCH ARCH_DEFINES VARIABLE) 2 | if (NOT DEFINED HAVE_${VARIABLE}) 3 | message (STATUS "Check CPU architecture is ${ARCH}") 4 | set (CHECK_CPU_ARCH_DEFINES ${ARCH_DEFINES}) 5 | configure_file (${PROJECT_SOURCE_DIR}/cmake/CheckCPUArch.c.in ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c @ONLY) 6 | try_compile (HAVE_${VARIABLE} "${PROJECT_BINARY_DIR}" 7 | "${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckCPUArch.c") 8 | if(HAVE_${VARIABLE}) 9 | message (STATUS "Check CPU architecture is ${ARCH} - yes") 10 | set (${VARIABLE} 1 CACHE INTERNAL "Result of CHECK_CPU_ARCH_X64" FORCE) 11 | else () 12 | message (STATUS "Check CPU architecture is ${ARCH} - no") 13 | endif () 14 | endif () 15 | endmacro (_CHECK_CPU_ARCH) 16 | 17 | macro (CHECK_CPU_ARCH_X64 VARIABLE) 18 | _CHECK_CPU_ARCH (x64 "defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)" ${VARIABLE}) 19 | endmacro (CHECK_CPU_ARCH_X64) 20 | 21 | macro (CHECK_CPU_ARCH_X86 VARIABLE) 22 | _CHECK_CPU_ARCH (x86 "defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) ||defined( __i386) || defined(_M_IX86)" ${VARIABLE}) 23 | endmacro (CHECK_CPU_ARCH_X86) 24 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/lists.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: libsndfile Mailing Lists 4 | --- 5 | 6 | # libsndfile Mailing Lists 7 | 8 | **Note**: These mailing lists are not maintained by the libsndfile team anymore. 9 | Use [GitHub issues and pull requests instead](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests). 10 | 11 | There are three mailing lists for libsndfile: 12 | 13 | - **libsndfile-announce@mega-nerd.com**   14 | [Subscribe](mailto:libsndfile-announce-request@mega-nerd.com?subject=subscribe) 15 | A list which will announce each new release of libsndfile. Noone can 16 | post to this list except the author. 17 | - **libsndfile-devel@mega-nerd.com**   18 | [Subscribe](mailto:libsndfile-devel-request@mega-nerd.com?subject=subscribe) 19 | A list for discussing bugs, porting issues and feature requests. 20 | Posting is restricted to subscribers. 21 | - **libsndfile-users@mega-nerd.com**   22 | [Subscribe](mailto:libsndfile-users-request@mega-nerd.com?subject=subscribe) 23 | A list for discussing the use of libsndfile in other programs. 24 | Posting is restricted to subscribers. 25 | 26 | The libsndfile-devel and libsndfile-users list will automatically receive a copy 27 | of all emails to the libsndfile-announce list. 28 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/chanmap.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2009-2011 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU Lesser General Public License as published by 6 | ** the Free Software Foundation; either version 2.1 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU Lesser General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU Lesser General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | typedef struct 20 | { /* The tag in the AIFF or CAF file. */ 21 | int channel_layout_tag ; 22 | 23 | /* The equivalent array of SF_CHANNEL_MAP_* entries. */ 24 | const int * channel_map ; 25 | 26 | const char * name ; 27 | } AIFF_CAF_CHANNEL_MAP ; 28 | 29 | 30 | int aiff_caf_find_channel_layout_tag (const int *chan_map, int channels) ; 31 | 32 | const AIFF_CAF_CHANNEL_MAP * aiff_caf_of_channel_layout_tag (int tag) ; 33 | -------------------------------------------------------------------------------- /source/external/libsndfile/m4/mkoctfile_version.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis OCTAVE_MKOCTFILE_VERSION 2 | dnl 3 | dnl Find the version of mkoctfile. 4 | dnl @version 1.0 Aug 23 2007 5 | dnl @author Erik de Castro Lopo 6 | dnl 7 | dnl Permission to use, copy, modify, distribute, and sell this file for any 8 | dnl purpose is hereby granted without fee, provided that the above copyright 9 | dnl and this permission notice appear in all copies. No representations are 10 | dnl made about the suitability of this software for any purpose. It is 11 | dnl provided "as is" without express or implied warranty. 12 | dnl 13 | 14 | AC_DEFUN([OCTAVE_MKOCTFILE_VERSION], 15 | [ 16 | 17 | 18 | AC_ARG_WITH(mkoctfile, 19 | AS_HELP_STRING([--with-mkoctfile], [choose the mkoctfile version]), 20 | [ with_mkoctfile=$withval ]) 21 | 22 | test -z "$with_mkoctfile" && with_mkoctfile=mkoctfile 23 | 24 | AC_CHECK_PROG(HAVE_MKOCTFILE,$with_mkoctfile,yes,no) 25 | 26 | if test "x$ac_cv_prog_HAVE_MKOCTFILE" = "xyes" ; then 27 | MKOCTFILE=$with_mkoctfile 28 | 29 | AC_MSG_CHECKING([for version of $MKOCTFILE]) 30 | MKOCTFILE_VERSION=`$with_mkoctfile --version 2>&1 | sed 's/mkoctfile, version //g'` 31 | AC_MSG_RESULT($MKOCTFILE_VERSION) 32 | fi 33 | 34 | AC_SUBST(MKOCTFILE) 35 | AC_SUBST(MKOCTFILE_VERSION) 36 | 37 | ])# OCTAVE_MKOCTFILE_VERSION 38 | 39 | -------------------------------------------------------------------------------- /source/external/libresample/LICENSE-BSD.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003, Dominic Mazzoni 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, this 11 | list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 21 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /source/external/libsndfile/m4/ax_require_defined.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # https://www.gnu.org/software/autoconf-archive/ax_require_defined.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_REQUIRE_DEFINED(MACRO) 8 | # 9 | # DESCRIPTION 10 | # 11 | # AX_REQUIRE_DEFINED is a simple helper for making sure other macros have 12 | # been defined and thus are available for use. This avoids random issues 13 | # where a macro isn't expanded. Instead the configure script emits a 14 | # non-fatal: 15 | # 16 | # ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found 17 | # 18 | # It's like AC_REQUIRE except it doesn't expand the required macro. 19 | # 20 | # Here's an example: 21 | # 22 | # AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) 23 | # 24 | # LICENSE 25 | # 26 | # Copyright (c) 2014 Mike Frysinger 27 | # 28 | # Copying and distribution of this file, with or without modification, are 29 | # permitted in any medium without royalty provided the copyright notice 30 | # and this notice are preserved. This file is offered as-is, without any 31 | # warranty. 32 | 33 | #serial 2 34 | 35 | AC_DEFUN([AX_REQUIRE_DEFINED], [dnl 36 | m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) 37 | ])dnl AX_REQUIRE_DEFINED 38 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/gsm_option.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | #include "gsm610_priv.h" 8 | 9 | #include "gsm.h" 10 | 11 | int gsm_option (gsm r, int opt, int * val) 12 | { 13 | int result = -1 ; 14 | 15 | switch (opt) { 16 | case GSM_OPT_LTP_CUT: 17 | #ifdef LTP_CUT 18 | result = r->ltp_cut ; 19 | if (val) r->ltp_cut = *val ; 20 | #endif 21 | break ; 22 | 23 | case GSM_OPT_VERBOSE: 24 | #ifndef NDEBUG 25 | result = r->verbose ; 26 | if (val) r->verbose = *val ; 27 | #endif 28 | break ; 29 | 30 | case GSM_OPT_FAST: 31 | 32 | #if defined (FAST) && defined (USE_FLOAT_MUL) 33 | result = r->fast ; 34 | if (val) r->fast = !!*val ; 35 | #endif 36 | break ; 37 | 38 | case GSM_OPT_FRAME_CHAIN: 39 | 40 | #ifdef WAV49 41 | result = r->frame_chain ; 42 | if (val) r->frame_chain = *val ; 43 | #endif 44 | break ; 45 | 46 | case GSM_OPT_FRAME_INDEX: 47 | 48 | #ifdef WAV49 49 | result = r->frame_index ; 50 | if (val) r->frame_index = *val ; 51 | #endif 52 | break ; 53 | 54 | case GSM_OPT_WAV49: 55 | 56 | #ifdef WAV49 57 | result = r->wav_fmt ; 58 | if (val) r->wav_fmt = !!*val ; 59 | #endif 60 | break ; 61 | 62 | default: 63 | break ; 64 | } 65 | return result ; 66 | } 67 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/gsm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | #ifndef GSM_H 8 | #define GSM_H 9 | 10 | #include /* for FILE * */ 11 | 12 | /* 13 | * Interface 14 | */ 15 | 16 | typedef struct gsm_state * gsm ; 17 | typedef short gsm_signal ; /* signed 16 bit */ 18 | typedef unsigned char gsm_byte ; 19 | typedef gsm_byte gsm_frame [33] ; /* 33 * 8 bits */ 20 | 21 | #define GSM_MAGIC 0xD /* 13 kbit/s RPE-LTP */ 22 | 23 | #define GSM_PATCHLEVEL 10 24 | #define GSM_MINOR 0 25 | #define GSM_MAJOR 1 26 | 27 | #define GSM_OPT_VERBOSE 1 28 | #define GSM_OPT_FAST 2 29 | #define GSM_OPT_LTP_CUT 3 30 | #define GSM_OPT_WAV49 4 31 | #define GSM_OPT_FRAME_INDEX 5 32 | #define GSM_OPT_FRAME_CHAIN 6 33 | 34 | gsm gsm_create (void) ; 35 | 36 | /* Added for libsndfile : May 6, 2002 */ 37 | void gsm_init (gsm) ; 38 | 39 | void gsm_destroy (gsm) ; 40 | 41 | int gsm_print (FILE *, gsm, gsm_byte *) ; 42 | int gsm_option (gsm, int, int *) ; 43 | 44 | void gsm_encode (gsm, gsm_signal *, gsm_byte *) ; 45 | int gsm_decode (gsm, gsm_byte *, gsm_signal *) ; 46 | 47 | int gsm_explode (gsm, gsm_byte *, gsm_signal *) ; 48 | void gsm_implode (gsm, gsm_signal *, gsm_byte *) ; 49 | 50 | #endif /* GSM_H */ 51 | 52 | 53 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/benchmark-1.0.0rc2: -------------------------------------------------------------------------------- 1 | Benchmarking libsndfile-1.0.0rc2 2 | -------------------------------- 3 | Each test takes a little over 5 seconds. 4 | 5 | Raw write PCM_16 : 31638069 samples per sec 6 | Raw read PCM_16 : 62788982 samples per sec 7 | 8 | Native endian I/O : 9 | Write short to PCM_16 : 82.37% of raw write 10 | Read short from PCM_16 : 82.17% of raw read 11 | Write int to PCM_24 : 30.80% of raw write 12 | Read int from PCM_24 : 37.95% of raw read 13 | Write float to PCM_16 : 36.22% of raw write 14 | Read float from PCM_16 : 23.32% of raw read 15 | Write float to PCM_24 : 28.41% of raw write 16 | Read float from PCM_24 : 28.41% of raw read 17 | Write float to FLOAT : 28.41% of raw write 18 | Read float from FLOAT : 57.50% of raw read 19 | 20 | Endian swapped I/O : 21 | Write short to PCM_16 : 21.73% of raw write 22 | Read short from PCM_16 : 23.37% of raw read 23 | Write int to PCM_24 : 31.02% of raw write 24 | Read int from PCM_24 : 38.24% of raw read 25 | Write float to PCM_16 : 35.51% of raw write 26 | Read float from PCM_16 : 19.16% of raw read 27 | Write float to PCM_24 : 27.37% of raw write 28 | Read float from PCM_24 : 28.74% of raw read 29 | Write float to FLOAT : 15.11% of raw write 30 | Read float from FLOAT : 15.60% of raw read 31 | 32 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/CMakeAutoGen.cmake: -------------------------------------------------------------------------------- 1 | # CMake implementation of AutoGen 2 | # Copyright (C) 2017 Anonymous Maarten 3 | 4 | set(AUTOGEN_SCRIPT "${CMAKE_MODULE_PATH}/CMakeAutoGenScript.cmake") 5 | 6 | function(lsf_autogen DIR_REL NAME_WE) 7 | set(EXTS ${ARGN}) 8 | set(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${DIR_REL}/${NAME_WE}.def") 9 | set(OUTPUTS) 10 | foreach(EXT ${EXTS}) 11 | list(APPEND OUTPUTS "${NAME_WE}.${EXT}") 12 | endforeach() 13 | add_autogen_target("${INPUT}" "${CMAKE_CURRENT_BINARY_DIR}/${DIR_REL}" ${OUTPUTS}) 14 | endfunction() 15 | 16 | function(add_autogen_target INPUT OUTPUTDIR) 17 | set(OUTPUTFILES "${ARGN}") 18 | 19 | if (OUTPUTDIR) 20 | set(PREFIX "${OUTPUTDIR}/") 21 | else() 22 | set(PREFIX "") 23 | endif() 24 | 25 | set(ARTIFACTS) 26 | foreach(OUTPUTFILE ${OUTPUTFILES}) 27 | list(APPEND ARTIFACTS "${PREFIX}${OUTPUTFILE}") 28 | endforeach() 29 | 30 | set(EXTRA_ARGS) 31 | if (AUTOGEN_DEBUG) 32 | list(APPEND EXTRA_ARGS "-DDEBUG=1") 33 | endif() 34 | if (OUTPUTDIR) 35 | list(APPEND EXTRA_ARGS "-DOUTPUTDIR=${OUTPUTDIR}") 36 | endif() 37 | 38 | add_custom_command( 39 | OUTPUT ${ARTIFACTS} 40 | COMMAND ${CMAKE_COMMAND} "-DDEFINITION=${INPUT}" ${EXTRA_ARGS} -P "${AUTOGEN_SCRIPT}" 41 | MAIN_DEPENDENCY "${INPUT}" 42 | DEPENDS "${AUTOGEN_SCRIPT}" 43 | COMMENT "CMakeAutoGen: generating ${OUTPUTFILES}" 44 | WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" 45 | ) 46 | endfunction() 47 | -------------------------------------------------------------------------------- /source/external/libsndfile/Win32/README-precompiled-dll.txt: -------------------------------------------------------------------------------- 1 | Notes on Using the Pre-compiled libsndfile DLL. 2 | =============================================== 3 | 4 | In order to use this pre-compiled DLL with Visual Studio, you will need to 5 | generate a .LIB file from the DLL. 6 | 7 | This can be achieved as follows: 8 | 9 | 1) In a CMD window, change to the directory containing this file and 10 | run the command: 11 | 12 | lib /machine:i386 /def:libsndfile-1.def 13 | 14 | You now have two files: 15 | 16 | libsndfile-1.dll 17 | libsndfile-1.lib 18 | 19 | to be used with VisualStudio. 20 | 21 | If the lib command fails with a command saying "'lib' is not recognized as 22 | an internal or external command, operable program or batch file", you need 23 | to find the location of "lib.exe" and add that directory to your PATH 24 | environment variable. Another alternative is to use the "Visual Studio 2005 25 | Command Prompt" Start menu item: 26 | 27 | Start -> 28 | All Programs -> 29 | Visual Studio 2005 -> 30 | Visual Studio Tools -> 31 | Visual Studio 2005 Command Prompt 32 | 33 | If for some reason these instructions don't work for you or you are still 34 | not able to use the libsndfile DLL with you project, please do not contact 35 | the main author of libsndfile. Instead, join the libsndfile-users mailing 36 | list : 37 | 38 | http://www.mega-nerd.com/libsndfile/lists.html 39 | 40 | and ask a question there. 41 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/FindSpeex.cmake: -------------------------------------------------------------------------------- 1 | # - Find Speex 2 | # Find the native Speex includes and libraries 3 | # 4 | # SPEEX_INCLUDE_DIRS - where to find speex.h, etc. 5 | # SPEEX_LIBRARIES - List of libraries when using Speex. 6 | # SPEEX_FOUND - True if Speex found. 7 | 8 | if (SPEEX_INCLUDE_DIR) 9 | set (SPEEX_FIND_QUIETLY TRUE) 10 | endif () 11 | 12 | find_package (PkgConfig QUIET) 13 | pkg_check_modules (PC_SPEEX QUIET speex) 14 | 15 | set (SPEEX_VERSION ${PC_SPEEX_VERSION}) 16 | 17 | find_path (SPEEX_INCLUDE_DIR speex/speex.h 18 | HINTS 19 | ${PC_SPEEX_INCLUDEDIR} 20 | ${PC_SPEEX_INCLUDE_DIRS} 21 | ${SPEEX_ROOT} 22 | ) 23 | find_library (SPEEX_LIBRARY 24 | NAMES 25 | speex 26 | libspeex 27 | HINTS 28 | ${PC_SPEEX_LIBDIR} 29 | ${PC_SPEEX_LIBRARY_DIRS} 30 | ${SPEEX_ROOT} 31 | ) 32 | 33 | include (FindPackageHandleStandardArgs) 34 | find_package_handle_standard_args (Speex 35 | REQUIRED_VARS 36 | SPEEX_LIBRARY 37 | SPEEX_INCLUDE_DIR 38 | VERSION_VAR 39 | SPEEX_VERSION 40 | ) 41 | 42 | if (SPEEX_FOUND) 43 | set (SPEEX_LIBRARIES ${SPEEX_LIBRARY}) 44 | set (SPEEX_INCLUDE_DIRS ${SPEEX_INCLUDE_DIR}) 45 | 46 | if (NOT TARGET Speex::Speex) 47 | add_library (Speex::Speex UNKNOWN IMPORTED) 48 | set_target_properties (Speex::Speex PROPERTIES 49 | INTERFACE_INCLUDE_DIRECTORIES "${SPEEX_INCLUDE_DIRS}" 50 | IMPORTED_LOCATION "${SPEEX_LIBRARIES}" 51 | ) 52 | endif () 53 | endif () 54 | 55 | mark_as_advanced (SPEEX_INCLUDE_DIR SPEEX_LIBRARY) 56 | -------------------------------------------------------------------------------- /source/common/vutu.h: -------------------------------------------------------------------------------- 1 | // mlvg test application 2 | // Copyright (C) 2019-2022 Madrona Labs LLC 3 | // This software is provided 'as-is', without any express or implied warranty. 4 | // See LICENSE.txt for details. 5 | 6 | #define stringAppName "Vutu" 7 | #define stringAppNameLC "vutu" 8 | #define stringMakerName "Madrona Labs" 9 | 10 | #define MAJOR_VERSION_STR "0" 11 | #define MAJOR_VERSION_INT 0 12 | 13 | #define SUB_VERSION_STR "1" 14 | #define SUB_VERSION_INT 1 15 | 16 | #define RELEASE_NUMBER_STR "0" 17 | #define RELEASE_NUMBER_INT 0 18 | 19 | #define BETA_NUMBER_STR "0" 20 | #define BETA_NUMBER_INT 0 21 | 22 | #define BUILD_NUMBER_INT 0 23 | 24 | #define SHORT_VERSION_STR "0.1.0" 25 | #define VERSION_STR SHORT_VERSION_STR 26 | 27 | #define FULL_VERSION_STR "0.1.0" 28 | 29 | #if defined(__x86_64__) || defined(_M_X64) 30 | #define ML_ARCH "x86_64" 31 | #elif defined(i386) || defined(__i386__) || defined(__i386) || defined(_M_IX86) 32 | #define ML_ARCH "x86_32"; 33 | #elif defined(__arm__) || defined(__aarch64__) 34 | #define ML_ARCH "Arm" 35 | #else 36 | #define ML_ARCH "unknown" 37 | warning ML_ARCH is undefined! 38 | #endif 39 | 40 | 41 | inline const char* getAppVersion() 42 | { 43 | return (FULL_VERSION_STR); 44 | } 45 | 46 | inline const char* getAppName() 47 | { 48 | return (stringAppName); 49 | } 50 | 51 | inline const char* getMakerName() 52 | { 53 | return (stringMakerName); 54 | } 55 | 56 | inline const char* getAppArchitecture() 57 | { 58 | return (ML_ARCH); 59 | } 60 | 61 | -------------------------------------------------------------------------------- /source/external/libsndfile/regtest/regtest.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2005-2011 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU General Public License as published by 6 | ** the Free Software Foundation; either version 2 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | typedef struct REG_DB_tag REG_DB ; 20 | 21 | /* In database.c */ 22 | REG_DB * db_open (const char * db_name) ; 23 | 24 | int db_create (const char * dbname) ; 25 | 26 | int db_close (REG_DB * db_handle) ; 27 | 28 | int db_file_exists (REG_DB * db_handle, const char * filename) ; 29 | int db_add_file (REG_DB * db_handle, const char * filename) ; 30 | int db_check_file (REG_DB * db_handle, const char * filename) ; 31 | 32 | int db_list_all (REG_DB * db_handle) ; 33 | int db_check_all (REG_DB * db_handle) ; 34 | int db_del_entry (REG_DB * db_handle, const char * entry) ; 35 | 36 | /* In checksum.c */ 37 | int calc_checksum (SNDFILE * file, const SF_INFO * info) ; 38 | 39 | -------------------------------------------------------------------------------- /source/external/libsndfile/Building-for-Android.md: -------------------------------------------------------------------------------- 1 | # Building for Android 2 | 3 | Assuming the Android Ndk is installed at location `/path/to/toolchain`, building 4 | libsndfile for Android (arm-linux-androideabi) should be as simple as: 5 | ``` 6 | autoreconf -vif 7 | export ANDROID_TOOLCHAIN_HOME=/path/to/android/toolchain 8 | ./Scripts/android-configure.sh 9 | make 10 | ``` 11 | The `Scripts/android-configure.sh` contains four of variables; `ANDROID_NDK_VER`, 12 | `ANDROID_GCC_VER`, `ANDROID_API_VER` and `ANDROID_TARGET` that can be overridden 13 | by setting them before the script is run. 14 | 15 | Since I (erikd), do almost zero Android development, I am happy accept patches 16 | for this documentation and script to improve its utility for real Android 17 | developers. 18 | 19 | --- 20 | 21 | ## Using CMake 22 | 23 | (Tested on Linux) 24 | 25 | For convenience, export the following variables: 26 | 27 | ``` 28 | export ANDROID_ABI=arm64-v8a 29 | export ANDROID_PLATFORM_API_LEVEL=29 30 | export NDK_ROOT=/path/to/android/ndk 31 | ``` 32 | 33 | Set `ANDROID_ABI`, `ANDROID_PLATFORM_API_LEVEL` according to your target system. Now cd into the libsndfile root directory, and run 34 | 35 | ``` 36 | cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake -DANDROID_ABI=$ANDROID_ABI -DANDROID_PLATFORM=$ANDROID_PLATFORM_API_LEVEL 37 | ``` 38 | 39 | cd into `build` and run make 40 | 41 | ``` 42 | cd build 43 | make [-j ] 44 | ``` 45 | 46 | This will build libsndfile for android. 47 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/sfversion.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 1999-2011 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU General Public License as published by 6 | ** the Free Software Foundation; either version 2 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "sfconfig.h" 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | #include 27 | 28 | #define BUFFER_SIZE (256) 29 | 30 | 31 | int 32 | main (void) 33 | { static char strbuffer [BUFFER_SIZE] ; 34 | const char * ver ; 35 | 36 | sf_command (NULL, SFC_GET_LIB_VERSION, strbuffer, sizeof (strbuffer)) ; 37 | ver = sf_version_string () ; 38 | 39 | if (strcmp (ver, strbuffer) != 0) 40 | { printf ("Version mismatch : '%s' != '%s'\n\n", ver, strbuffer) ; 41 | exit (1) ; 42 | } ; 43 | 44 | printf ("%s", strbuffer) ; 45 | 46 | return 0 ; 47 | } /* main */ 48 | 49 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/test_main.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2008-2016 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU Lesser General Public License as published by 6 | ** the Free Software Foundation; either version 2.1 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU Lesser General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU Lesser General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | static inline void 20 | print_test_name (const char * name) 21 | { printf (" %-40s : ", name) ; 22 | fflush (stdout) ; 23 | } /* print_test_name */ 24 | 25 | 26 | 27 | void test_conversions (void) ; 28 | void test_endswap (void) ; 29 | void test_log_printf (void) ; 30 | void test_binheader_writef (void) ; 31 | void test_file_io (void) ; 32 | 33 | void test_float_convert (void) ; 34 | void test_double_convert (void) ; 35 | 36 | void test_audio_detect (void) ; 37 | void test_ima_oki_adpcm (void) ; 38 | 39 | void test_psf_strlcpy_crlf (void) ; 40 | void test_broadcast_var (void) ; 41 | 42 | void test_cart_var (void) ; 43 | 44 | void test_nms_adpcm (void) ; 45 | -------------------------------------------------------------------------------- /source/widgets/sampleDisplay.h: -------------------------------------------------------------------------------- 1 | 2 | // ml-gui: GUI library for madronalib apps 3 | // Copyright (c) 2019 Madrona Labs LLC. http://www.madronalabs.com 4 | // Distributed under the MIT license: http://madrona-labs.mit-license.org/ 5 | 6 | #pragma once 7 | 8 | #include "MLDSPSample.h" 9 | #include "mlvg.h" 10 | #include "vutuPartials.h" 11 | 12 | using namespace ml; 13 | 14 | class SampleDisplay : public Widget 15 | { 16 | static constexpr float kBracketWidth = 1.f/4.f; 17 | 18 | bool paintSample(ml::DrawContext dc); 19 | 20 | Rect getControlRect(int cIdx); 21 | void updateParamValue(MessageList& r, Interval val, uint32_t flags); 22 | 23 | bool _initialized{ false }; 24 | bool sampleDirty_{ false }; 25 | 26 | std::unique_ptr< DrawableImage > _backingLayer; 27 | const ml::Sample * _pSample{nullptr}; 28 | ml::DrawContext _prevDC{nullptr}; 29 | 30 | float _playbackTime{0}; 31 | float sampleDuration_{0}; 32 | Interval analysisInterval_{0, 1}; 33 | 34 | enum controlIdx 35 | { 36 | leftControl = 0, 37 | rightControl, 38 | none 39 | }; 40 | float _dragX1{0}; 41 | int currentDragControl_{none}; 42 | 43 | public: 44 | SampleDisplay(WithValues p) : Widget(p) {} 45 | 46 | // Widget implementation 47 | void resize(ml::DrawContext d) override; 48 | MessageList animate(int elapsedTimeInMs, ml::DrawContext dc) override; 49 | void draw(ml::DrawContext d) override; 50 | MessageList processGUIEvent(const GUICoordinates& gc, GUIEvent e) override; 51 | void receiveNamedRawPointer(Path name, void* ptr) override; 52 | 53 | 54 | }; 55 | 56 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/README: -------------------------------------------------------------------------------- 1 | GSM 06.10 13 kbit/s RPE/LTP speech codec 2 | ---------------------------------------- 3 | 4 | All the file in this directory were written by Jutta Degener 5 | and Carsten Borman for The Communications and Operating Systems 6 | Research Group (KBS) at the Technische Universitaet Berlin. 7 | 8 | Their work was released under the following license which is 9 | assumed to be compatible with The GNU Lesser General Public License. 10 | 11 | ---------------------------------------------------------------------------- 12 | 13 | Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, 14 | Technische Universitaet Berlin 15 | 16 | Any use of this software is permitted provided that this notice is not 17 | removed and that neither the authors nor the Technische Universitaet Berlin 18 | are deemed to have made any representations as to the suitability of this 19 | software for any purpose nor are held responsible for any defects of 20 | this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 21 | 22 | As a matter of courtesy, the authors request to be informed about uses 23 | this software has found, about bugs in this software, and about any 24 | improvements that may be of general interest. 25 | 26 | Berlin, 28.11.1994 27 | Jutta Degener (jutta@cs.tu-berlin.de) 28 | Carsten Bormann (cabo@cs.tu-berlin.de) 29 | 30 | ---------------------------------------------------------------------------- 31 | 32 | Jutta Degener and Carsten Bormann's work can be found on their homepage 33 | at: 34 | 35 | http://kbs.cs.tu-berlin.de/~jutta/toast.html 36 | 37 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/sqlite/FindSQLite3.cmake: -------------------------------------------------------------------------------- 1 | # - Find SQLite3 2 | # Find the native SQLite3 includes and libraries 3 | # 4 | # SQLite3_INCLUDE_DIRS - where to find sqlite3.h, etc. 5 | # SQLite3_LIBRARIES - List of libraries when using SQLite3. 6 | # SQLite3_FOUND - True if SQLite3 found. 7 | 8 | if (SQLite3_INCLUDE_DIR) 9 | # Already in cache, be silent 10 | set (SQLite3_FIND_QUIETLY TRUE) 11 | endif () 12 | 13 | find_package (PkgConfig QUIET) 14 | pkg_check_modules (PC_SQLite3 QUIET sqlite3) 15 | 16 | set (SQLite3_VERSION ${PC_SQLite3_VERSION}) 17 | 18 | find_path (SQLite3_INCLUDE_DIR sqlite3.h 19 | HINTS 20 | ${PC_SQLite3_INCLUDEDIR} 21 | ${PC_SQLite3_INCLUDE_DIRS} 22 | ${SQLite3_ROOT} 23 | ) 24 | 25 | find_library (SQLite3_LIBRARY 26 | NAMES 27 | sqlite3 28 | HINTS 29 | ${PC_SQLite3_LIBDIR} 30 | ${PC_SQLite3_LIBRARY_DIRS} 31 | ${SQLite3_ROOT} 32 | ) 33 | 34 | include (FindPackageHandleStandardArgs) 35 | 36 | find_package_handle_standard_args (SQLite3 37 | REQUIRED_VARS 38 | SQLite3_LIBRARY 39 | SQLite3_INCLUDE_DIR 40 | VERSION_VAR 41 | SQLite3_VERSION 42 | ) 43 | 44 | if (SQLite3_FOUND) 45 | set (SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR}) 46 | set (SQLite3_LIBRARIES ${SQLite3_LIBRARY}) 47 | if (NOT TARGET SQLite::SQLite3) 48 | add_library (SQLite::SQLite3 UNKNOWN IMPORTED) 49 | set_target_properties (SQLite::SQLite3 PROPERTIES 50 | INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIRS}" 51 | IMPORTED_LOCATION "${SQLite3_LIBRARIES}" 52 | ) 53 | endif () 54 | endif () 55 | 56 | mark_as_advanced (SQLite3_INCLUDE_DIR SQLite3_LIBRARY) 57 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/benchmark-1.0.0: -------------------------------------------------------------------------------- 1 | Benchmarking libsndfile-1.0.0 2 | ----------------------------- 3 | Each test takes a little over 5 seconds. 4 | 5 | Raw write PCM_16 : 31084269 samples per sec 6 | Raw read PCM_16 : 63597065 samples per sec 7 | 8 | Native endian I/O : 9 | Write short to PCM_16 : 83.19% of raw write 10 | Read short from PCM_16 : 82.93% of raw read 11 | Write int to PCM_24 : 31.12% of raw write 12 | Read int from PCM_24 : 37.90% of raw read 13 | Write float to PCM_16 : 37.00% of raw write 14 | Read float from PCM_16 : 45.53% of raw read 15 | Write float to PCM_24 : 29.08% of raw write 16 | Read float from PCM_24 : 28.48% of raw read 17 | Write float to PCM_32 : 22.08% of raw write 18 | Read float from PCM_32 : 31.21% of raw read 19 | Write float to FLOAT : 28.70% of raw write 20 | Read float from FLOAT : 56.32% of raw read 21 | 22 | Endian swapped I/O : 23 | Write short to PCM_16 : 22.08% of raw write 24 | Read short from PCM_16 : 23.20% of raw read 25 | Write int to PCM_24 : 30.96% of raw write 26 | Read int from PCM_24 : 37.76% of raw read 27 | Write float to PCM_16 : 35.82% of raw write 28 | Read float from PCM_16 : 22.61% of raw read 29 | Write float to PCM_24 : 27.70% of raw write 30 | Read float from PCM_24 : 28.37% of raw read 31 | Write float to PCM_32 : 20.77% of raw write 32 | Read float from PCM_32 : 23.46% of raw read 33 | Write float to FLOAT : 15.03% of raw write 34 | Read float from FLOAT : 15.43% of raw read 35 | 36 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/decode.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | #include 8 | 9 | #include "gsm610_priv.h" 10 | 11 | /* 12 | * 4.3 FIXED POINT IMPLEMENTATION OF THE RPE-LTP DECODER 13 | */ 14 | 15 | static void Postprocessing ( 16 | struct gsm_state * S, 17 | register int16_t * s) 18 | { 19 | register int k ; 20 | register int16_t msr = S->msr ; 21 | register int16_t tmp ; 22 | 23 | for (k = 160 ; k-- ; s++) 24 | { tmp = GSM_MULT_R (msr, 28180) ; 25 | msr = GSM_ADD (*s, tmp) ; /* Deemphasis */ 26 | *s = GSM_ADD (msr, msr) & 0xFFF8 ; /* Truncation & Upscaling */ 27 | } 28 | S->msr = msr ; 29 | } 30 | 31 | void Gsm_Decoder ( 32 | struct gsm_state * S, 33 | 34 | int16_t * LARcr, /* [0..7] IN */ 35 | 36 | int16_t * Ncr, /* [0..3] IN */ 37 | int16_t * bcr, /* [0..3] IN */ 38 | int16_t * Mcr, /* [0..3] IN */ 39 | int16_t * xmaxcr, /* [0..3] IN */ 40 | int16_t * xMcr, /* [0..13*4] IN */ 41 | 42 | int16_t * s) /* [0..159] OUT */ 43 | { 44 | int j, k ; 45 | int16_t erp [40], wt [160] ; 46 | int16_t *drp = S->dp0 + 120 ; 47 | 48 | for (j = 0 ; j <= 3 ; j++, xmaxcr++, bcr++, Ncr++, Mcr++, xMcr += 13) 49 | { Gsm_RPE_Decoding (/*-S,-*/ *xmaxcr, *Mcr, xMcr, erp) ; 50 | Gsm_Long_Term_Synthesis_Filtering (S, *Ncr, *bcr, erp, drp) ; 51 | 52 | for (k = 0 ; k <= 39 ; k++) wt [j * 40 + k] = drp [k] ; 53 | } 54 | 55 | Gsm_Short_Term_Synthesis_Filter (S, LARcr, wt, s) ; 56 | Postprocessing (S, s) ; 57 | } 58 | 59 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/FindSndio.cmake: -------------------------------------------------------------------------------- 1 | # - Find SoundIO (sndio) includes and libraries 2 | # 3 | # SNDIO_FOUND - True if SNDIO_INCLUDE_DIR & SNDIO_LIBRARY are 4 | # found 5 | # SNDIO_LIBRARIES - Set when SNDIO_LIBRARY is found 6 | # SNDIO_INCLUDE_DIRS - Set when SNDIO_INCLUDE_DIR is found 7 | # 8 | # SNDIO_INCLUDE_DIR - where to find sndio.h, etc. 9 | # SNDIO_LIBRARY - the sndio library 10 | # 11 | 12 | if (SNDIO_INCLUDE_DIR) 13 | # Already in cache, be silent 14 | set (SNDIO_FIND_QUIETLY TRUE) 15 | endif () 16 | 17 | find_package (PkgConfig QUIET) 18 | pkg_check_modules (PC_SNDIO QUIET sndio) 19 | 20 | set (SNDIO_VERSION ${PC_SNDIO_VERSION}) 21 | 22 | find_path (SNDIO_INCLUDE_DIR 23 | NAMES 24 | sndio.h 25 | HINTS 26 | ${PC_SNDIO_INCLUDEDIR} 27 | ${PC_SNDIO_INCLUDE_DIRS} 28 | ${SNDIO_ROOT} 29 | ) 30 | 31 | find_library (SNDIO_LIBRARY 32 | NAMES 33 | sndio 34 | HINTS 35 | ${PC_SNDIO_LIBDIR} 36 | ${PC_SNDIO_LIBRARY_DIRS} 37 | ${SNDIO_ROOT} 38 | ) 39 | 40 | include (FindPackageHandleStandardArgs) 41 | find_package_handle_standard_args (Sndio 42 | REQUIRED_VARS 43 | SNDIO_LIBRARY 44 | SNDIO_INCLUDE_DIR 45 | VERSION_VAR 46 | SNDIO_VERSION 47 | ) 48 | 49 | if (SNDIO_FOUND) 50 | set (SNDIO_LIBRARIES ${SNDIO_LIBRARY}) 51 | set (SNDIO_INCLUDE_DIRS ${SNDIO_INCLUDE_DIR}) 52 | if (NOT TARGET Sndio::Sndio) 53 | add_library (Sndio::Sndio UNKNOWN IMPORTED) 54 | set_target_properties (Sndio::Sndio PROPERTIES 55 | INTERFACE_INCLUDE_DIRECTORIES "${SNDIO_INCLUDE_DIRS}" 56 | IMPORTED_LOCATION "${SNDIO_LIBRARIES}" 57 | ) 58 | endif() 59 | endif() 60 | 61 | mark_as_advanced (SNDIO_INCLUDE_DIR SNDIO_LIBRARY) 62 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/FindOgg.cmake: -------------------------------------------------------------------------------- 1 | # - Find ogg 2 | # Find the native ogg includes and libraries 3 | # 4 | # OGG_INCLUDE_DIRS - where to find ogg.h, etc. 5 | # OGG_LIBRARIES - List of libraries when using ogg. 6 | # OGG_FOUND - True if ogg found. 7 | 8 | if (OGG_INCLUDE_DIR) 9 | # Already in cache, be silent 10 | set(OGG_FIND_QUIETLY TRUE) 11 | endif () 12 | 13 | find_package (PkgConfig QUIET) 14 | pkg_check_modules (PC_OGG QUIET ogg>=1.3.0) 15 | 16 | set (OGG_VERSION ${PC_OGG_VERSION}) 17 | 18 | find_path (OGG_INCLUDE_DIR ogg/ogg.h 19 | HINTS 20 | ${PC_OGG_INCLUDEDIR} 21 | ${PC_OGG_INCLUDE_DIRS} 22 | ${OGG_ROOT} 23 | ) 24 | # MSVC built ogg may be named ogg_static. 25 | # The provided project files name the library with the lib prefix. 26 | find_library (OGG_LIBRARY 27 | NAMES 28 | ogg 29 | ogg_static 30 | libogg 31 | libogg_static 32 | HINTS 33 | ${PC_OGG_LIBDIR} 34 | ${PC_OGG_LIBRARY_DIRS} 35 | ${OGG_ROOT} 36 | ) 37 | # Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND 38 | # to TRUE if all listed variables are TRUE. 39 | include (FindPackageHandleStandardArgs) 40 | find_package_handle_standard_args (Ogg 41 | REQUIRED_VARS 42 | OGG_LIBRARY 43 | OGG_INCLUDE_DIR 44 | VERSION_VAR 45 | OGG_VERSION 46 | ) 47 | 48 | if (OGG_FOUND) 49 | set (OGG_LIBRARIES ${OGG_LIBRARY}) 50 | set (OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR}) 51 | 52 | if(NOT TARGET Ogg::ogg) 53 | add_library(Ogg::ogg UNKNOWN IMPORTED) 54 | set_target_properties(Ogg::ogg PROPERTIES 55 | INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIRS}" 56 | IMPORTED_LOCATION "${OGG_LIBRARIES}" 57 | ) 58 | endif () 59 | endif () 60 | 61 | mark_as_advanced (OGG_INCLUDE_DIR OGG_LIBRARY) 62 | -------------------------------------------------------------------------------- /source/external/libsndfile/Octave/sndfile_load.m: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2002-2011 Erik de Castro Lopo 2 | ## 3 | ## This program is free software; you can redistribute it and/or modify 4 | ## it under the terms of the GNU General Public License as published by 5 | ## the Free Software Foundation; either version 2, or (at your option) 6 | ## any later version. 7 | ## 8 | ## This program is distributed in the hope that it will be useful, but 9 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 10 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | ## General Public License for more details. 12 | ## 13 | ## You should have received a copy of the GNU General Public License 14 | ## along with this file. If not, write to the Free Software Foundation, 15 | ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 | 17 | ## -*- texinfo -*- 18 | ## @deftypefn {Function File} {} sndfile_load (@var{filename}) 19 | ## Load data from the file given by @var{filename}. 20 | ## @end deftypefn 21 | 22 | ## Author: Erik de Castro Lopo 23 | ## Description: Load the sound data from the given file name 24 | 25 | function [data fs] = sndfile_load (filename) 26 | 27 | if (nargin != 1), 28 | error ("Need an input filename") ; 29 | endif 30 | 31 | samplerate = -1 ; 32 | samplingrate = -1 ; 33 | wavedata = -1 ; 34 | 35 | 36 | eval (sprintf ('load -f %s', filename)) ; 37 | 38 | if (samplerate > 0), 39 | fs = samplerate ; 40 | elseif (samplingrate > 0), 41 | fs = samplingrate ; 42 | else 43 | error ("Not able to find sample rate.") ; 44 | endif 45 | 46 | if (max (size (wavedata)) > 1), 47 | data = wavedata ; 48 | else 49 | error ("Not able to find waveform data.") ; 50 | endif 51 | 52 | endfunction 53 | -------------------------------------------------------------------------------- /source/external/libresample/Makefile: -------------------------------------------------------------------------------- 1 | # Run configure to generate Makefile from Makefile.in on 2 | # any system supported by GNU autoconf. For all other 3 | # systems, use this file as a template to create a 4 | # working Makefile. 5 | 6 | CC = gcc 7 | CFLAGS += -g -O2 8 | LDFLAGS += 9 | 10 | LIBS = -lm 11 | 12 | AR = /usr/bin/ar 13 | RANLIB = ranlib 14 | srcdir=. 15 | 16 | OBJS = \ 17 | src/resample.c.o \ 18 | src/resamplesubs.c.o \ 19 | src/filterkit.c.o 20 | 21 | TARGETS = libresample.a tests/testresample 22 | DIRS=tests 23 | 24 | all: $(TARGETS) 25 | 26 | libresample.a: $(OBJS) Makefile 27 | $(AR) ruv libresample.a $(OBJS) 28 | ranlib libresample.a 29 | 30 | tests/testresample: libresample.a $(srcdir)/tests/testresample.c 31 | $(CC) -o tests/testresample \ 32 | $(CFLAGS) $(LDFLAGS) $(srcdir)/tests/testresample.c \ 33 | libresample.a $(LIBS) 34 | 35 | tests/compareresample: libresample.a $(srcdir)/tests/compareresample.c 36 | $(CC) -o tests/compareresample \ 37 | $(CFLAGS) $(LDFLAGS) $(srcdir)/tests/compareresample.c \ 38 | libresample.a -lsamplerate $(LIBS) 39 | 40 | tests/resample-sndfile: libresample.a $(srcdir)/tests/resample-sndfile.c 41 | $(CC) -o tests/resample-sndfile \ 42 | $(CFLAGS) $(LDFLAGS) $(srcdir)/tests/resample-sndfile.c \ 43 | libresample.a -lsndfile $(LIBS) 44 | 45 | $(DIRS): 46 | mkdir $(DIRS) 47 | 48 | clean: 49 | rm -f $(TARGETS) $(OBJS) 50 | 51 | distclean: clean 52 | rm -f Makefile 53 | rm -f config.status config.cache config.log src/config.h 54 | rm -f *~ src/*~ tests/*~ include/*~ 55 | 56 | $(OBJS): %.c.o: $(srcdir)/%.c Makefile $(srcdir)/include/libresample.h \ 57 | $(srcdir)/src/resample_defs.h $(srcdir)/src/filterkit.h $(srcdir)/src/config.h 58 | $(CC) -c $(CFLAGS) $< -o $@ 59 | -------------------------------------------------------------------------------- /source/external/libresample/Makefile.in: -------------------------------------------------------------------------------- 1 | # Run configure to generate Makefile from Makefile.in on 2 | # any system supported by GNU autoconf. For all other 3 | # systems, use this file as a template to create a 4 | # working Makefile. 5 | 6 | CC = @CC@ 7 | CFLAGS += @CFLAGS@ 8 | LDFLAGS += @LDFLAGS@ 9 | 10 | LIBS = @LIBS@ -lm 11 | 12 | AR = @AR@ 13 | RANLIB = @RANLIB@ 14 | srcdir=@srcdir@ 15 | 16 | OBJS = \ 17 | src/resample.c.o \ 18 | src/resamplesubs.c.o \ 19 | src/filterkit.c.o 20 | 21 | TARGETS = @TARGETS@ 22 | DIRS=tests 23 | 24 | all: $(TARGETS) 25 | 26 | libresample.a: $(OBJS) Makefile 27 | $(AR) ruv libresample.a $(OBJS) 28 | ranlib libresample.a 29 | 30 | tests/testresample: libresample.a $(srcdir)/tests/testresample.c 31 | $(CC) -o tests/testresample \ 32 | $(CFLAGS) $(LDFLAGS) $(srcdir)/tests/testresample.c \ 33 | libresample.a $(LIBS) 34 | 35 | tests/compareresample: libresample.a $(srcdir)/tests/compareresample.c 36 | $(CC) -o tests/compareresample \ 37 | $(CFLAGS) $(LDFLAGS) $(srcdir)/tests/compareresample.c \ 38 | libresample.a -lsamplerate $(LIBS) 39 | 40 | tests/resample-sndfile: libresample.a $(srcdir)/tests/resample-sndfile.c 41 | $(CC) -o tests/resample-sndfile \ 42 | $(CFLAGS) $(LDFLAGS) $(srcdir)/tests/resample-sndfile.c \ 43 | libresample.a -lsndfile $(LIBS) 44 | 45 | $(DIRS): 46 | mkdir $(DIRS) 47 | 48 | clean: 49 | rm -f $(TARGETS) $(OBJS) 50 | 51 | distclean: clean 52 | rm -f Makefile 53 | rm -f config.status config.cache config.log src/config.h 54 | rm -f *~ src/*~ tests/*~ include/*~ 55 | 56 | $(OBJS): %.c.o: $(srcdir)/%.c Makefile $(srcdir)/include/libresample.h \ 57 | $(srcdir)/src/resample_defs.h $(srcdir)/src/filterkit.h $(srcdir)/src/config.h 58 | $(CC) -c $(CFLAGS) $< -o $@ 59 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/macos.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2003-2011 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU Lesser General Public License as published by 6 | ** the Free Software Foundation; either version 2.1 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU Lesser General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU Lesser General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "sfconfig.h" 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #include "sndfile.h" 26 | #include "sfendian.h" 27 | #include "common.h" 28 | 29 | #define STR_MARKER MAKE_MARKER ('S', 'T', 'R', ' ') 30 | 31 | int 32 | macos_guess_file_type (SF_PRIVATE * psf, const char *filename) 33 | { static char rsrc_name [1024] ; 34 | struct stat statbuf ; 35 | 36 | snprintf (rsrc_name, sizeof (rsrc_name), "%s/rsrc", filename) ; 37 | 38 | /* If there is no resource fork, just return. */ 39 | if (stat (rsrc_name, &statbuf) != 0) 40 | { psf_log_printf (psf, "No resource fork.\n") ; 41 | return 0 ; 42 | } ; 43 | 44 | if (statbuf.st_size == 0) 45 | { psf_log_printf (psf, "Have zero size resource fork.\n") ; 46 | return 0 ; 47 | } ; 48 | 49 | return 0 ; 50 | } /* macos_guess_file_type */ 51 | 52 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/write_read_test.def: -------------------------------------------------------------------------------- 1 | autogen definitions write_read_test.tpl; 2 | 3 | data_type = { 4 | type_name = char ; 5 | data_type = short ; 6 | data_field = s ; 7 | error_func = CHAR_ERROR ; 8 | format_char = "0x%X" ; 9 | max_val = "32000.0" ; 10 | max_error = "255" ; 11 | } ; 12 | 13 | data_type = { 14 | type_name = short ; 15 | data_type = short ; 16 | data_field = s ; 17 | error_func = INT_ERROR ; 18 | format_char = "0x%X" ; 19 | max_val = "32000.0" ; 20 | max_error = "0" ; 21 | } ; 22 | 23 | data_type = { 24 | type_name = "20bit" ; 25 | data_type = int ; 26 | data_field = i ; 27 | error_func = BIT_20_ERROR ; 28 | format_char = "0x%X" ; 29 | max_val = "(1.0 * 0x7F00000)" ; 30 | max_error = "4096" ; 31 | } ; 32 | 33 | data_type = { 34 | type_name = "24bit" ; 35 | data_type = int ; 36 | data_field = i ; 37 | error_func = TRIBYTE_ERROR ; 38 | format_char = "0x%X" ; 39 | max_val = "(1.0 * 0x7F000000)" ; 40 | max_error = "256" ; 41 | } ; 42 | 43 | data_type = { 44 | type_name = int ; 45 | data_type = int ; 46 | data_field = i ; 47 | error_func = INT_ERROR ; 48 | format_char = "0x%X" ; 49 | max_val = "(1.0 * 0x7F000000)" ; 50 | max_error = "0" ; 51 | } ; 52 | 53 | /* Lite remove start */ 54 | 55 | data_type = { 56 | type_name = float ; 57 | data_type = float ; 58 | data_field = f ; 59 | error_func = FLOAT_ERROR ; 60 | format_char = "%g" ; 61 | max_val = "1.0" ; 62 | max_error = "0" ; 63 | } ; 64 | 65 | data_type = { 66 | type_name = double ; 67 | data_type = double ; 68 | data_field = d ; 69 | error_func = FLOAT_ERROR ; 70 | format_char = "%g" ; 71 | max_val = "1.0" ; 72 | max_error = "0" ; 73 | } ; 74 | 75 | /* Lite remove end */ 76 | -------------------------------------------------------------------------------- /source/common/vutuProcessor.h: -------------------------------------------------------------------------------- 1 | // vutu 2 | // (c) 2020, Madrona Labs LLC, all rights reserved 3 | // see LICENSE.txt for details 4 | 5 | #pragma once 6 | 7 | #include "mldsp.h" 8 | #include "madronalib.h" 9 | #include "MLPlatform.h" 10 | #include "MLSignalProcessor.h" 11 | #include "MLDSPUtils.h" 12 | #include "vutuParameters.h" 13 | #include "MLRtAudioProcessor.h" 14 | #include "MLActor.h" 15 | #include "MLMath2D.h" 16 | #include "MLDSPSample.h" 17 | 18 | #include "loris.h" 19 | 20 | using namespace ml; 21 | 22 | constexpr int kInputChannels = 0; 23 | constexpr int kOutputChannels = 2; 24 | constexpr int kSampleRate = 48000; 25 | 26 | void readParameterDescriptions(ParameterDescriptionList& params); 27 | 28 | 29 | class VutuProcessor final : 30 | public RtAudioProcessor 31 | { 32 | // sine generators. 33 | SineGen testSine; 34 | 35 | public: 36 | VutuProcessor(TextFragment appName, size_t instanceNum, 37 | size_t nInputs, size_t nOutputs, 38 | int sampleRate, const ParameterDescriptionList& pdl); 39 | ~VutuProcessor() = default; 40 | 41 | void processVector(MainInputs inputs, MainOutputs outputs, void *stateDataUnused) override; 42 | 43 | void onMessage(Message msg) override; 44 | 45 | private: 46 | 47 | Path _controllerName; 48 | 49 | int testCounter{0}; 50 | 51 | Symbol playbackState{"off"}; 52 | size_t playbackSampleIdx{0}; 53 | //size_t playbackCounter{0}; 54 | 55 | Interval analysisInterval{0, 0}; 56 | 57 | ml::Sample* _pSourceSampleInController{nullptr}; 58 | ml::Sample _sourceSample; 59 | ml::Sample* _pSynthesizedSample{nullptr}; 60 | 61 | 62 | Loris::PartialList* _pLorisPartials{ nullptr }; 63 | 64 | void togglePlaybackState(Symbol whichSample); 65 | 66 | }; 67 | -------------------------------------------------------------------------------- /source/widgets/vutuPartialsDisplay.h: -------------------------------------------------------------------------------- 1 | 2 | // ml-gui: GUI library for madronalib apps 3 | // Copyright (c) 2019 Madrona Labs LLC. http://www.madronalabs.com 4 | // Distributed under the MIT license: http://madrona-labs.mit-license.org/ 5 | 6 | #pragma once 7 | 8 | #include "mlvg.h" 9 | #include "vutuPartials.h" 10 | 11 | using namespace ml; 12 | 13 | class VutuPartialsDisplay : public Widget 14 | { 15 | void paintPartials(ml::DrawContext dc); 16 | 17 | bool _initialized{ false }; 18 | bool _partialsDirty{ true }; 19 | 20 | 21 | std::unique_ptr< DrawableImage > _backingLayer; 22 | 23 | const VutuPartialsData * _pPartials{nullptr}; 24 | 25 | 26 | ml::DrawContext _prevDC{nullptr}; 27 | float prevFundamental{0}; 28 | Timer redrawTimer_; 29 | 30 | public: 31 | 32 | virtual void handleMessage(Message msg, MessageList* r) override 33 | { 34 | //std::cout << "partialsDisplay got message: " << msg << "\n"; 35 | Widget::handleMessage(msg, r); 36 | } 37 | 38 | VutuPartialsDisplay(WithValues p) : Widget(p) {} 39 | 40 | // Widget implementation 41 | void resize(ml::DrawContext d) override; 42 | MessageList animate(int elapsedTimeInMs, ml::DrawContext dc) override; 43 | void draw(ml::DrawContext d) override; 44 | void receiveNamedRawPointer(Path name, void* ptr) override; 45 | 46 | void redrawPartials(); 47 | 48 | // overriding this because we will probably need multiple parameters. 49 | bool knowsParam(Path paramName) override 50 | { 51 | // user param in "param" property 52 | if(Path(getTextProperty("param")) == paramName) 53 | { 54 | return true; 55 | } 56 | if(paramName == "fundamental") 57 | { 58 | return true; 59 | } 60 | 61 | 62 | return false; 63 | } 64 | 65 | 66 | }; 67 | 68 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/FindOpus.cmake: -------------------------------------------------------------------------------- 1 | # - Find opus 2 | # Find the native opus includes and libraries 3 | # 4 | # OPUS_INCLUDE_DIRS - where to find opus.h, etc. 5 | # OPUS_LIBRARIES - List of libraries when using opus. 6 | # OPUS_FOUND - True if Opus found. 7 | 8 | if (OPUS_INCLUDE_DIR) 9 | # Already in cache, be silent 10 | set(OPUS_FIND_QUIETLY TRUE) 11 | endif () 12 | 13 | find_package (Ogg QUIET) 14 | 15 | find_package (PkgConfig QUIET) 16 | pkg_check_modules(PC_OPUS QUIET opus>=1.1) 17 | 18 | set (OPUS_VERSION ${PC_OPUS_VERSION}) 19 | 20 | find_path (OPUS_INCLUDE_DIR opus/opus.h 21 | HINTS 22 | ${PC_OPUS_INCLUDEDIR} 23 | ${PC_OPUS_INCLUDE_DIRS} 24 | ${OPUS_ROOT} 25 | ) 26 | 27 | # MSVC built opus may be named opus_static. 28 | # The provided project files name the library with the lib prefix. 29 | 30 | find_library (OPUS_LIBRARY 31 | NAMES 32 | opus 33 | opus_static 34 | libopus 35 | libopus_static 36 | HINTS 37 | ${PC_OPUS_LIBDIR} 38 | ${PC_OPUS_LIBRARY_DIRS} 39 | ${OPUS_ROOT} 40 | ) 41 | 42 | # Handle the QUIETLY and REQUIRED arguments and set OPUS_FOUND 43 | # to TRUE if all listed variables are TRUE. 44 | include(FindPackageHandleStandardArgs) 45 | find_package_handle_standard_args (Opus 46 | REQUIRED_VARS 47 | OPUS_LIBRARY 48 | OPUS_INCLUDE_DIR 49 | OGG_FOUND 50 | VERSION_VAR 51 | OPUS_VERSION 52 | ) 53 | 54 | if (OPUS_FOUND) 55 | set (OPUS_LIBRARIES ${OPUS_LIBRARY}) 56 | set (OPUS_INCLUDE_DIRS ${OPUS_INCLUDE_DIR}) 57 | 58 | if (NOT TARGET Opus::opus) 59 | add_library (Opus::opus UNKNOWN IMPORTED) 60 | set_target_properties (Opus::opus PROPERTIES 61 | INTERFACE_INCLUDE_DIRECTORIES "${OPUS_INCLUDE_DIRS}" 62 | IMPORTED_LOCATION "${OPUS_LIBRARIES}" 63 | ) 64 | endif () 65 | endif () 66 | 67 | mark_as_advanced(OPUS_INCLUDE_DIR OPUS_LIBRARY) 68 | -------------------------------------------------------------------------------- /source/external/libsndfile/Octave/sndfile_play.m: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2002-2011 Erik de Castro Lopo 2 | ## 3 | ## This program is free software; you can redistribute it and/or modify 4 | ## it under the terms of the GNU General Public License as published by 5 | ## the Free Software Foundation; either version 2, or (at your option) 6 | ## any later version. 7 | ## 8 | ## This program is distributed in the hope that it will be useful, but 9 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 10 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | ## General Public License for more details. 12 | ## 13 | ## You should have received a copy of the GNU General Public License 14 | ## along with this file. If not, write to the Free Software Foundation, 15 | ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 | 17 | ## -*- texinfo -*- 18 | ## @deftypefn {Function File} {} sndfile_play (@var{data, fs}) 19 | ## Play @var{data} at sample rate @var{fs} using the sndfile-play 20 | ## program. 21 | ## @end deftypefn 22 | 23 | ## Author: Erik de Castro Lopo 24 | ## Description: Play the given data as a sound file 25 | 26 | function sndfile_play (data, fs) 27 | 28 | if nargin != 2, 29 | error ("Need two input arguments: data and fs.") ; 30 | endif 31 | 32 | if (max (size (fs)) > 1), 33 | error ("Second parameter fs must be a single value.") ; 34 | endif 35 | 36 | [nr nc] = size (data) ; 37 | 38 | if (nr > nc), 39 | data = data' ; 40 | endif 41 | 42 | samplerate = fs ; 43 | wavedata = data ; 44 | 45 | filename = tmpnam () ; 46 | 47 | cmd = sprintf ("save -mat-binary %s fs data", filename) ; 48 | 49 | eval (cmd) ; 50 | 51 | cmd = sprintf ("sndfile-play %s", filename) ; 52 | 53 | [output, status] = system (cmd) ; 54 | 55 | if (status), 56 | disp (outout) ; 57 | endif 58 | 59 | endfunction 60 | -------------------------------------------------------------------------------- /source/external/libsndfile/Octave/sndfile_save.m: -------------------------------------------------------------------------------- 1 | ## Copyright (C) 2002-2011 Erik de Castro Lopo 2 | ## 3 | ## This program is free software; you can redistribute it and/or modify 4 | ## it under the terms of the GNU General Public License as published by 5 | ## the Free Software Foundation; either version 2, or (at your option) 6 | ## any later version. 7 | ## 8 | ## This program is distributed in the hope that it will be useful, but 9 | ## WITHOUT ANY WARRANTY; without even the implied warranty of 10 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | ## General Public License for more details. 12 | ## 13 | ## You should have received a copy of the GNU General Public License 14 | ## along with this file. If not, write to the Free Software Foundation, 15 | ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 | 17 | ## -*- texinfo -*- 18 | ## @deftypefn {Function File} {} sndfile_save (@var{filename, data, fs}) 19 | ## Save the given @var{data} as audio data to the given at @var{fs}. Set 20 | ## the sample rate to @var{fs}. 21 | ## @end deftypefn 22 | 23 | ## Author: Erik de Castro Lopo 24 | ## Description: Save data as a sound file 25 | 26 | function sndfile_save (filename, data, fs) 27 | 28 | if nargin != 3, 29 | error ("Need three input arguments: filename, data and fs.") ; 30 | endif 31 | 32 | if (! isstr (filename)), 33 | error ("First parameter 'filename' is must be a string.") ; 34 | endif 35 | 36 | if (max (size (fs)) > 1), 37 | error ("Second parameter 'fs' must be a single value, not an array or matrix.") ; 38 | endif 39 | 40 | [nr nc] = size (data) ; 41 | 42 | if (nr > nc), 43 | data = data' ; 44 | endif 45 | 46 | samplerate = fs ; 47 | wavedata = data ; 48 | 49 | str = sprintf ("save -mat-binary %s samplerate wavedata", filename) ; 50 | 51 | eval (str) ; 52 | 53 | endfunction 54 | -------------------------------------------------------------------------------- /source/external/libsndfile/Octave/octave_test.m: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007-2011 Erik de Castro Lopo 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 | 17 | # These tests are nowhere near comprehensive. 18 | 19 | printf (" Running Octave tests : ") ; 20 | fflush (stdout) ; 21 | 22 | filename = "whatever" ; 23 | srate_out = 32000 ; 24 | fmt_out = "wav-float" ; 25 | 26 | t = (2 * pi / srate_out * (0:srate_out-1))' ; 27 | data_out = sin (440.0 * t) ; 28 | 29 | # Write out a file. 30 | sfwrite (filename, data_out, srate_out, fmt_out) ; 31 | 32 | # Read it back in again. 33 | [ data_in, srate_in, fmt_in ] = sfread (filename) ; 34 | 35 | if (srate_in != srate_out) 36 | error ("\n\nSample rate mismatch : %d -> %d.\n\n", srate_out, srate_in) ; 37 | endif 38 | 39 | # Octave strcmp return 1 for the same. 40 | if (strcmp (fmt_in, fmt_out) != 1) 41 | error ("\n\nFormat error : '%s' -> '%s'.\n\n", fmt_out, fmt_in) ; 42 | endif 43 | 44 | err = max (abs (data_out - data_in)) ; 45 | 46 | if (err > 1e-7) 47 | error ("err : %g\n", err) ; 48 | endif 49 | 50 | printf ("ok") ; 51 | 52 | unlink (filename) ; 53 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/FindMpg123.cmake: -------------------------------------------------------------------------------- 1 | # - Find mpg123 2 | # Find the native mpg123 includes and libraries 3 | # 4 | # MPG123_INCLUDE_DIRS - where to find mpg123.h, etc. 5 | # MPG123_LIBRARIES - List of libraries when using mpg123. 6 | # MPG123_FOUND - True if Mpg123 found. 7 | 8 | if (MPG123_INCLUDE_DIR) 9 | # Already in cache, be silent 10 | set(MPG123_FIND_QUIETLY TRUE) 11 | endif () 12 | 13 | find_package (PkgConfig QUIET) 14 | pkg_check_modules(PC_MPG123 QUIET libmpg123>=1.25.10) 15 | 16 | set (MPG123_VERSION ${PC_MPG123_VERSION}) 17 | 18 | find_path (MPG123_INCLUDE_DIR mpg123.h 19 | HINTS 20 | ${PC_MPG123_INCLUDEDIR} 21 | ${PC_MPG123_INCLUDE_DIRS} 22 | ${MPG123_ROOT} 23 | ) 24 | 25 | # MSVC built mpg123 may be named mpg123_static. 26 | # The provided project files name the library with the lib prefix. 27 | 28 | find_library (MPG123_LIBRARY 29 | NAMES 30 | mpg123 31 | mpg123_static 32 | libmpg123 33 | libmpg123_static 34 | HINTS 35 | ${PC_MPG123_LIBDIR} 36 | ${PC_MPG123_LIBRARY_DIRS} 37 | ${MPG123_ROOT} 38 | ) 39 | 40 | # Handle the QUIETLY and REQUIRED arguments and set MPG123_FOUND 41 | # to TRUE if all listed variables are TRUE. 42 | include(FindPackageHandleStandardArgs) 43 | find_package_handle_standard_args (Mpg123 44 | REQUIRED_VARS 45 | MPG123_LIBRARY 46 | MPG123_INCLUDE_DIR 47 | VERSION_VAR 48 | MPG123_VERSION 49 | ) 50 | 51 | if (MPG123_FOUND) 52 | set (MPG123_LIBRARIES ${MPG123_LIBRARY}) 53 | set (MPG123_INCLUDE_DIRS ${MPG123_INCLUDE_DIR}) 54 | 55 | if (NOT TARGET MPG123::libmpg123) 56 | add_library (MPG123::libmpg123 UNKNOWN IMPORTED) 57 | set_target_properties (MPG123::libmpg123 PROPERTIES 58 | INTERFACE_INCLUDE_DIRECTORIES "${MPG123_INCLUDE_DIRS}" 59 | IMPORTED_LOCATION "${MPG123_LIBRARIES}" 60 | ) 61 | endif () 62 | endif () 63 | 64 | mark_as_advanced(MPG123_INCLUDE_DIR MPG123_LIBRARY) 65 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/test_binheader_writef.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2017 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU Lesser General Public License as published by 6 | ** the Free Software Foundation; either version 2.1 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU Lesser General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU Lesser General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "sfconfig.h" 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #include "common.h" 28 | 29 | #include "test_main.h" 30 | 31 | void 32 | test_binheader_writef (void) 33 | { char buffer [18] ; 34 | SF_PRIVATE sf_private, *psf ; 35 | int k, errors = 0 ; 36 | 37 | print_test_name ("Testing binheader_writef") ; 38 | 39 | memset (&sf_private, 0, sizeof (sf_private)) ; 40 | 41 | psf = &sf_private ; 42 | for (k = 0 ; errors == 0 && k < 10 ; k++) 43 | { psf_strlcpy (buffer, sizeof (buffer), "abcdefghijklmnop") ; 44 | buffer [k] = 0 ; 45 | 46 | psf_binheader_writef (psf, "Ep", BHWp (buffer)) ; 47 | 48 | if ((psf->header.indx & 1) != 0) 49 | errors = 1 ; 50 | } ; 51 | 52 | free (psf->header.ptr) ; 53 | 54 | if (errors) 55 | { puts ("\nExiting due to errors.\n") ; 56 | exit (1) ; 57 | } ; 58 | 59 | puts ("ok") ; 60 | } /* test_log_printf */ 61 | 62 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/benchmark-1.0.18pre16-mingus: -------------------------------------------------------------------------------- 1 | Benchmarking libsndfile-1.0.18pre15 2 | ----------------------------------- 3 | Each test takes a little over 5 seconds. 4 | 5 | Raw write PCM_16 : 178237074 samples per sec 6 | Raw read PCM_16 : 368885269 samples per sec 7 | 8 | Native endian I/O : 9 | Write short to PCM_16 : 98.84% of raw write 10 | Read short from PCM_16 : 147.10% of raw read 11 | Write int to PCM_24 : 33.74% of raw write 12 | Read int from PCM_24 : 30.82% of raw read 13 | Write int to PCM_32 : 48.34% of raw write 14 | Read int from PCM_32 : 62.43% of raw read 15 | Write float to PCM_16 : 41.86% of raw write 16 | Read float from PCM_16 : 36.73% of raw read 17 | Write float to PCM_24 : 28.38% of raw write 18 | Read float from PCM_24 : 19.50% of raw read 19 | Write float to PCM_32 : 23.68% of raw write 20 | Read float from PCM_32 : 28.76% of raw read 21 | Write float to FLOAT : 47.21% of raw write 22 | Read float from FLOAT : 60.85% of raw read 23 | 24 | Endian swapped I/O : 25 | Write short to PCM_16 : 54.94% of raw write 26 | Read short from PCM_16 : 59.03% of raw read 27 | Write int to PCM_24 : 33.40% of raw write 28 | Read int from PCM_24 : 31.98% of raw read 29 | Write int to PCM_32 : 30.89% of raw write 30 | Read int from PCM_32 : 33.68% of raw read 31 | Write float to PCM_16 : 41.61% of raw write 32 | Read float from PCM_16 : 26.76% of raw read 33 | Write float to PCM_24 : 25.75% of raw write 34 | Read float from PCM_24 : 19.84% of raw read 35 | Write float to PCM_32 : 21.29% of raw write 36 | Read float from PCM_32 : 21.78% of raw read 37 | Write float to FLOAT : 30.82% of raw write 38 | Read float from FLOAT : 35.04% of raw read 39 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/benchmark-1.0.18pre16-hendrix: -------------------------------------------------------------------------------- 1 | Benchmarking libsndfile-1.0.18pre15 2 | ----------------------------------- 3 | Each test takes a little over 5 seconds. 4 | 5 | Raw write PCM_16 : 103189885 samples per sec 6 | Raw read PCM_16 : 660854036 samples per sec 7 | 8 | Native endian I/O : 9 | Write short to PCM_16 : 95.08% of raw write 10 | Read short from PCM_16 : 96.39% of raw read 11 | Write int to PCM_24 : 54.55% of raw write 12 | Read int from PCM_24 : 28.50% of raw read 13 | Write int to PCM_32 : 46.97% of raw write 14 | Read int from PCM_32 : 39.98% of raw read 15 | Write float to PCM_16 : 60.85% of raw write 16 | Read float from PCM_16 : 27.79% of raw read 17 | Write float to PCM_24 : 46.23% of raw write 18 | Read float from PCM_24 : 22.62% of raw read 19 | Write float to PCM_32 : 35.38% of raw write 20 | Read float from PCM_32 : 24.18% of raw read 21 | Write float to FLOAT : 47.73% of raw write 22 | Read float from FLOAT : 40.62% of raw read 23 | 24 | Endian swapped I/O : 25 | Write short to PCM_16 : 79.98% of raw write 26 | Read short from PCM_16 : 49.27% of raw read 27 | Write int to PCM_24 : 53.80% of raw write 28 | Read int from PCM_24 : 28.50% of raw read 29 | Write int to PCM_32 : 41.68% of raw write 30 | Read int from PCM_32 : 25.89% of raw read 31 | Write float to PCM_16 : 61.03% of raw write 32 | Read float from PCM_16 : 27.74% of raw read 33 | Write float to PCM_24 : 45.10% of raw write 34 | Read float from PCM_24 : 22.43% of raw read 35 | Write float to PCM_32 : 35.24% of raw write 36 | Read float from PCM_32 : 22.37% of raw read 37 | Write float to FLOAT : 42.01% of raw write 38 | Read float from FLOAT : 28.98% of raw read 39 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/benchmark-1.0.6pre10-coltrane: -------------------------------------------------------------------------------- 1 | Benchmarking libsndfile-1.0.6pre10 2 | ---------------------------------- 3 | Each test takes a little over 5 seconds. 4 | 5 | Raw write PCM_16 : 28845961 samples per sec 6 | Raw read PCM_16 : 63471874 samples per sec 7 | 8 | Native endian I/O : 9 | Write short to PCM_16 : 86.21% of raw write 10 | Read short from PCM_16 : 82.60% of raw read 11 | Write int to PCM_24 : 34.89% of raw write 12 | Read int from PCM_24 : 37.26% of raw read 13 | Write int to PCM_32 : 43.36% of raw write 14 | Read int from PCM_32 : 41.30% of raw read 15 | Write float to PCM_16 : 43.02% of raw write 16 | Read float from PCM_16 : 43.99% of raw read 17 | Write float to PCM_24 : 32.72% of raw write 18 | Read float from PCM_24 : 28.21% of raw read 19 | Write float to PCM_32 : 25.92% of raw write 20 | Read float from PCM_32 : 30.98% of raw read 21 | Write float to FLOAT : 46.65% of raw write 22 | Read float from FLOAT : 56.66% of raw read 23 | 24 | Endian swapped I/O : 25 | Write short to PCM_16 : 54.53% of raw write 26 | Read short from PCM_16 : 56.32% of raw read 27 | Write int to PCM_24 : 35.28% of raw write 28 | Read int from PCM_24 : 37.33% of raw read 29 | Write int to PCM_32 : 26.21% of raw write 30 | Read int from PCM_32 : 23.51% of raw read 31 | Write float to PCM_16 : 41.39% of raw write 32 | Read float from PCM_16 : 23.56% of raw read 33 | Write float to PCM_24 : 30.86% of raw write 34 | Read float from PCM_24 : 28.27% of raw read 35 | Write float to PCM_32 : 23.83% of raw write 36 | Read float from PCM_32 : 20.54% of raw read 37 | Write float to FLOAT : 27.26% of raw write 38 | Read float from FLOAT : 29.04% of raw read 39 | 40 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/benchmark-1.0.6pre10-miles: -------------------------------------------------------------------------------- 1 | Benchmarking libsndfile-1.0.6pre10 2 | ---------------------------------- 3 | Each test takes a little over 5 seconds. 4 | 5 | Raw write PCM_16 : 40092612 samples per sec 6 | Raw read PCM_16 : 42382563 samples per sec 7 | 8 | Native endian I/O : 9 | Write short to PCM_16 : 61.90% of raw write 10 | Read short from PCM_16 : 100.20% of raw read 11 | Write int to PCM_24 : 28.69% of raw write 12 | Read int from PCM_24 : 33.62% of raw read 13 | Write int to PCM_32 : 31.14% of raw write 14 | Read int from PCM_32 : 51.04% of raw read 15 | Write float to PCM_16 : 25.57% of raw write 16 | Read float from PCM_16 : 28.17% of raw read 17 | Write float to PCM_24 : 23.59% of raw write 18 | Read float from PCM_24 : 24.14% of raw read 19 | Write float to PCM_32 : 18.00% of raw write 20 | Read float from PCM_32 : 22.59% of raw read 21 | Write float to FLOAT : 31.32% of raw write 22 | Read float from FLOAT : 51.54% of raw read 23 | 24 | Endian swapped I/O : 25 | Write short to PCM_16 : 42.81% of raw write 26 | Read short from PCM_16 : 54.58% of raw read 27 | Write int to PCM_24 : 29.28% of raw write 28 | Read int from PCM_24 : 33.43% of raw read 29 | Write int to PCM_32 : 22.21% of raw write 30 | Read int from PCM_32 : 27.24% of raw read 31 | Write float to PCM_16 : 25.76% of raw write 32 | Read float from PCM_16 : 26.84% of raw read 33 | Write float to PCM_24 : 23.71% of raw write 34 | Read float from PCM_24 : 24.10% of raw read 35 | Write float to PCM_32 : 18.47% of raw write 36 | Read float from PCM_32 : 21.45% of raw read 37 | Write float to FLOAT : 22.46% of raw write 38 | Read float from FLOAT : 29.72% of raw read 39 | 40 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/benchmark-0.0.28: -------------------------------------------------------------------------------- 1 | erikd@coltrane > tests/benchmark 2 | Benchmarking libsndfile-0.0.28 3 | ------------------------------ 4 | Each test takes a little over 5 seconds. 5 | 6 | Raw write PCM_16 : 30660117 samples per sec 7 | Raw read PCM_16 : 62788982 samples per sec 8 | 9 | Native endian I/O : 10 | Write short to PCM_16 : 83.37% of raw write 11 | Read short from PCM_16 : 83.17% of raw read 12 | Write int to PCM_24 : 30.78% of raw write 13 | Read int from PCM_24 : 32.96% of raw read 14 | Write int to PCM_32 : 42.05% of raw write 15 | Read int from PCM_32 : 41.11% of raw read 16 | Write float to PCM_16 : 17.75% of raw write 17 | Read float from PCM_16 : 43.27% of raw read 18 | Write float to PCM_24 : 15.30% of raw write 19 | Read float from PCM_24 : 28.09% of raw read 20 | Write float to PCM_32 : 14.55% of raw write 21 | Read float from PCM_32 : 34.65% of raw read 22 | Write float to FLOAT : 28.98% of raw write 23 | Read float from FLOAT : 56.71% of raw read 24 | 25 | Endian swapped I/O : 26 | Write short to PCM_16 : 43.39% of raw write 27 | Read short from PCM_16 : 49.12% of raw read 28 | Write int to PCM_24 : 29.65% of raw write 29 | Read int from PCM_24 : 33.66% of raw read 30 | Write int to PCM_32 : 19.62% of raw write 31 | Read int from PCM_32 : 21.97% of raw read 32 | Write float to PCM_16 : 17.63% of raw write 33 | Read float from PCM_16 : 31.43% of raw read 34 | Write float to PCM_24 : 14.91% of raw write 35 | Read float from PCM_24 : 27.99% of raw read 36 | Write float to PCM_32 : 13.69% of raw write 37 | Read float from PCM_32 : 22.23% of raw read 38 | Write float to FLOAT : 19.25% of raw write 39 | Read float from FLOAT : 25.66% of raw read 40 | 41 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/ALAC/dplib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_APACHE_LICENSE_HEADER_START@ 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License") ; 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * @APPLE_APACHE_LICENSE_HEADER_END@ 19 | */ 20 | 21 | /* 22 | File: dplib.h 23 | 24 | Contains: Dynamic Predictor routines 25 | 26 | Copyright: Copyright (C) 2001-2011 Apple, Inc. 27 | */ 28 | 29 | #ifndef __DPLIB_H__ 30 | #define __DPLIB_H__ 31 | 32 | #include 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | // defines 39 | 40 | #define DENSHIFT_MAX 15 41 | #define DENSHIFT_DEFAULT 9 42 | #define AINIT 38 43 | #define BINIT (-29) 44 | #define CINIT (-2) 45 | #define NUMCOEPAIRS 16 46 | 47 | // prototypes 48 | 49 | void init_coefs (int16_t * coefs, uint32_t denshift, int32_t numPairs) ; 50 | void copy_coefs (const int16_t * srcCoefs, int16_t * dstCoefs, int32_t numPairs) ; 51 | 52 | // NOTE: these routines read at least "numactive" samples so the i/o buffers must be at least that big 53 | 54 | void pc_block (int32_t * in, int32_t * pc, int32_t num, int16_t * coefs, int32_t numactive, uint32_t chanbits, uint32_t denshift) ; 55 | void unpc_block (const int32_t * pc, int32_t * out, int32_t num, int16_t * coefs, int32_t numactive, uint32_t chanbits, uint32_t denshift) ; 56 | 57 | #ifdef __cplusplus 58 | } 59 | #endif 60 | 61 | #endif /* __DPLIB_H__ */ 62 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/ALAC/ALACDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_APACHE_LICENSE_HEADER_START@ 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License") ; 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * @APPLE_APACHE_LICENSE_HEADER_END@ 19 | */ 20 | 21 | /* 22 | File: ALACDecoder.h 23 | */ 24 | 25 | #ifndef _ALACDECODER_H 26 | #define _ALACDECODER_H 27 | 28 | #include 29 | 30 | #include "ALACAudioTypes.h" 31 | 32 | struct BitBuffer ; 33 | 34 | class ALACDecoder 35 | { 36 | public: 37 | ALACDecoder () ; 38 | ~ALACDecoder () ; 39 | 40 | int32_t Init (void * inMagicCookie, uint32_t inMagicCookieSize) ; 41 | int32_t Decode (struct BitBuffer * bits, uint8_t * sampleBuffer, uint32_t numSamples, uint32_t numChannels, uint32_t * outNumSamples) ; 42 | 43 | public: 44 | // decoding parameters (public for use in the analyzer) 45 | ALACSpecificConfig mConfig ; 46 | 47 | protected: 48 | int32_t FillElement (struct BitBuffer * bits) ; 49 | int32_t DataStreamElement (struct BitBuffer * bits) ; 50 | 51 | uint16_t mActiveElements ; 52 | 53 | // decoding buffers 54 | int32_t * mMixBufferU ; 55 | int32_t * mMixBufferV ; 56 | int32_t * mPredictor ; 57 | uint16_t * mShiftBuffer ; // note: this points to mPredictor's memory but different 58 | // variable for clarity and type difference 59 | } ; 60 | 61 | #endif /* _ALACDECODER_H */ 62 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/test_strncpy_crlf.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2010-2012 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU Lesser General Public License as published by 6 | ** the Free Software Foundation; either version 2.1 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU Lesser General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU Lesser General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "sfconfig.h" 20 | 21 | #include 22 | #include 23 | 24 | #include "common.h" 25 | 26 | #include "test_main.h" 27 | 28 | void 29 | test_psf_strlcpy_crlf (void) 30 | { const char *src = "a\nb\nc\n" ; 31 | char *dest ; 32 | int dest_len ; 33 | 34 | print_test_name ("Testing psf_strlcpy_crlf") ; 35 | 36 | for (dest_len = 3 ; dest_len < 30 ; dest_len++) 37 | { dest = calloc (1, dest_len + 1) ; 38 | if (dest == NULL) 39 | { printf ("\n\nLine %d: calloc failed!\n\n", __LINE__) ; 40 | exit (1) ; 41 | } ; 42 | 43 | /* This value needs to be a in the [0, 127] range to avoid tripping up 44 | ** compiles like Sun Studio 12.* 45 | */ 46 | dest [dest_len] = '\x5a' ; 47 | 48 | psf_strlcpy_crlf (dest, src, dest_len, sizeof (*src)) ; 49 | 50 | if (dest [dest_len] != '\x5a') 51 | { printf ("\n\nLine %d: buffer overrun for dest_len == %d\n\n", __LINE__, dest_len) ; 52 | exit (1) ; 53 | } ; 54 | 55 | free (dest) ; 56 | } ; 57 | 58 | puts ("ok") ; 59 | } /* test_psf_strlcpy_crlf */ 60 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/ima_oki_adpcm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2007-2011 Erik de Castro Lopo 3 | ** Copyright (c) 2007 4 | ** 5 | ** This library is free software; you can redistribute it and/or modify it 6 | ** under the terms of the GNU Lesser General Public License as published by 7 | ** the Free Software Foundation; either version 2 of the License, or (at 8 | ** your option) any later version. 9 | ** 10 | ** This library is distributed in the hope that it will be useful, but 11 | ** WITHOUT ANY WARRANTY; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser 13 | ** General Public License for more details. 14 | ** 15 | ** You should have received a copy of the GNU Lesser General Public License 16 | ** along with this library. If not, write to the Free Software Foundation, 17 | ** Fifth Floor, 51 Franklin Street, Boston, MA 02111-1301, USA. 18 | */ 19 | 20 | /* ADPCM: IMA, OKI <==> 16-bit PCM. */ 21 | 22 | 23 | #define IMA_OKI_ADPCM_CODE_LEN 256 24 | #define IMA_OKI_ADPCM_PCM_LEN (IMA_OKI_ADPCM_CODE_LEN *2) 25 | 26 | typedef struct 27 | { 28 | /* private: */ 29 | int mask ; 30 | int last_output ; 31 | int step_index ; 32 | int max_step_index ; 33 | int const * steps ; 34 | 35 | /* public: */ 36 | int errors ; 37 | int code_count, pcm_count ; 38 | 39 | unsigned char codes [IMA_OKI_ADPCM_CODE_LEN] ; 40 | short pcm [IMA_OKI_ADPCM_PCM_LEN] ; 41 | } IMA_OKI_ADPCM ; 42 | 43 | typedef enum 44 | { IMA_OKI_ADPCM_TYPE_IMA, 45 | IMA_OKI_ADPCM_TYPE_OKI 46 | } IMA_OKI_ADPCM_TYPE ; 47 | 48 | void ima_oki_adpcm_init (IMA_OKI_ADPCM * state, IMA_OKI_ADPCM_TYPE type) ; 49 | 50 | int adpcm_decode (IMA_OKI_ADPCM * state, int /* 0..15 */ code) ; 51 | int adpcm_encode (IMA_OKI_ADPCM * state, int /* -32768..32767 */ sample) ; 52 | 53 | void ima_oki_adpcm_decode_block (IMA_OKI_ADPCM * state) ; 54 | void ima_oki_adpcm_encode_block (IMA_OKI_ADPCM * state) ; 55 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/sftest.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 1999-2011 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU General Public License as published by 6 | ** the Free Software Foundation; either version 2 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "sfconfig.h" 20 | 21 | #include 22 | 23 | #if HAVE_UNISTD_H 24 | #include 25 | #else 26 | #include "sf_unistd.h" 27 | #endif 28 | 29 | #include 30 | 31 | #define BUFFER_SIZE (1024) 32 | 33 | 34 | static short buffer [BUFFER_SIZE] ; 35 | 36 | int 37 | main (int argc, char *argv []) 38 | { SNDFILE *file ; 39 | SF_INFO sfinfo ; 40 | int k, count, max = 0, total = 0 ; 41 | 42 | if (argc < 2) 43 | { printf ("Expecting input file name.\n") ; 44 | return 0 ; 45 | } ; 46 | 47 | if (! (file = sf_open (argv [1], SFM_READ, &sfinfo))) 48 | { printf ("sf_open_read failed with error : ") ; 49 | puts (sf_strerror (NULL)) ; 50 | exit (1) ; 51 | } ; 52 | 53 | while ((count = sf_read_short (file, buffer, BUFFER_SIZE))) 54 | { for (k = 0 ; k < count ; k++) 55 | if (abs (buffer [k]) > max) 56 | max = abs (buffer [k]) ; 57 | total += count ; 58 | } ; 59 | 60 | printf ("Total : %d\n", total) ; 61 | printf ("Maximun value : %d\n", max) ; 62 | 63 | sf_close (file) ; 64 | 65 | return 0 ; 66 | } /* main */ 67 | 68 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/FindFLAC.cmake: -------------------------------------------------------------------------------- 1 | # - Find FLAC 2 | # Find the native FLAC includes and libraries 3 | # 4 | # FLAC_INCLUDE_DIRS - where to find FLAC headers. 5 | # FLAC_LIBRARIES - List of libraries when using libFLAC. 6 | # FLAC_FOUND - True if libFLAC found. 7 | # FLAC_DEFINITIONS - FLAC compile definitons 8 | 9 | if (FLAC_INCLUDE_DIR) 10 | # Already in cache, be silent 11 | set (FLAC_FIND_QUIETLY TRUE) 12 | endif () 13 | 14 | find_package (Ogg QUIET) 15 | 16 | find_package (PkgConfig QUIET) 17 | pkg_check_modules(PC_FLAC QUIET flac) 18 | 19 | set(FLAC_VERSION ${PC_FLAC_VERSION}) 20 | 21 | find_path (FLAC_INCLUDE_DIR FLAC/stream_decoder.h 22 | HINTS 23 | ${PC_FLAC_INCLUDEDIR} 24 | ${PC_FLAC_INCLUDE_DIRS} 25 | ${FLAC_ROOT} 26 | ) 27 | 28 | # MSVC built libraries can name them *_static, which is good as it 29 | # distinguishes import libraries from static libraries with the same extension. 30 | find_library (FLAC_LIBRARY 31 | NAMES 32 | FLAC 33 | libFLAC 34 | libFLAC_dynamic 35 | libFLAC_static 36 | HINTS 37 | ${PC_FLAC_LIBDIR} 38 | ${PC_FLAC_LIBRARY_DIRS} 39 | ${FLAC_ROOT} 40 | ) 41 | 42 | # Handle the QUIETLY and REQUIRED arguments and set FLAC_FOUND to TRUE if 43 | # all listed variables are TRUE. 44 | include (FindPackageHandleStandardArgs) 45 | find_package_handle_standard_args (FLAC 46 | REQUIRED_VARS 47 | FLAC_LIBRARY 48 | FLAC_INCLUDE_DIR 49 | Ogg_FOUND 50 | VERSION_VAR 51 | FLAC_VERSION 52 | ) 53 | 54 | if (FLAC_FOUND) 55 | set (FLAC_INCLUDE_DIRS ${FLAC_INCLUDE_DIR}) 56 | set (FLAC_LIBRARIES ${FLAC_LIBRARY} ${OGG_LIBRARIES}) 57 | if (NOT TARGET FLAC::FLAC) 58 | add_library(FLAC::FLAC UNKNOWN IMPORTED) 59 | set_target_properties(FLAC::FLAC PROPERTIES 60 | INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}" 61 | IMPORTED_LOCATION "${FLAC_LIBRARY}" 62 | INTERFACE_LINK_LIBRARIES Ogg::ogg 63 | ) 64 | endif () 65 | endif () 66 | 67 | mark_as_advanced(FLAC_INCLUDE_DIR FLAC_LIBRARY) 68 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/ogg_vcomment.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2008-2018 Erik de Castro Lopo 3 | ** Copyright (C) 2018 Arthur Taylor 4 | ** 5 | ** This program is free software ; you can redistribute it and/or modify 6 | ** it under the terms of the GNU Lesser General Public License as published by 7 | ** the Free Software Foundation ; either version 2.1 of the License, or 8 | ** (at your option) any later version. 9 | ** 10 | ** This program is distributed in the hope that it will be useful, 11 | ** but WITHOUT ANY WARRANTY ; without even the implied warranty of 12 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | ** GNU Lesser General Public License for more details. 14 | ** 15 | ** You should have received a copy of the GNU Lesser General Public License 16 | ** along with this program ; if not, write to the Free Software 17 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef SF_SRC_OGG_VCOMMENT_H 21 | #define SF_SRC_OGG_VCOMMENT_H 22 | 23 | /* 24 | ** Voriscomment identifier. Some Ogg stream embedding schemes require it. 25 | */ 26 | typedef struct 27 | { const char *ident ; 28 | int length ; 29 | } vorbiscomment_ident ; 30 | 31 | /* 32 | ** Read all vorbiscomment tags from *packet. Tags which match ones used 33 | ** by libsndfile strings are loaded into *psf. Ogg streams which require an 34 | ** identifier for the tags packet should pass it in *ident. 35 | */ 36 | int vorbiscomment_read_tags (SF_PRIVATE *psf, ogg_packet *packet, vorbiscomment_ident *ident) ; 37 | 38 | /* 39 | ** Write metadata strings stored in *psf to *packet. The packet is optionally 40 | ** prefixed with *ident. The always-present vendor field should be the library 41 | ** used for encoding the audio data. 42 | */ 43 | int vorbiscomment_write_tags (SF_PRIVATE *psf, ogg_packet *packet, vorbiscomment_ident *ident, const char *vendor, int targetsize) ; 44 | 45 | #endif /* SF_SRC_OGG_VCOMMENT_H */ 46 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/ALAC/alac_decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_APACHE_LICENSE_HEADER_START@ 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License") ; 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * @APPLE_APACHE_LICENSE_HEADER_END@ 19 | */ 20 | 21 | /* 22 | File: alac_decoder.h 23 | */ 24 | 25 | #ifndef ALAC_DECODER_H 26 | #define ALAC_DECODER_H 27 | 28 | #include 29 | 30 | #include "ALACAudioTypes.h" 31 | 32 | typedef enum 33 | { 34 | false = 0, 35 | ALAC_TRUE = 1 36 | } bool ; 37 | 38 | struct BitBuffer ; 39 | 40 | typedef struct alac_decoder 41 | { 42 | // decoding parameters (public for use in the analyzer) 43 | ALACSpecificConfig mConfig ; 44 | 45 | uint16_t mActiveElements ; 46 | 47 | // decoding buffers 48 | int32_t * mMixBufferU ; 49 | int32_t * mMixBufferV ; 50 | int32_t * mPredictor ; 51 | uint16_t * mShiftBuffer ; // note: this points to mPredictor's memory but different 52 | // variable for clarity and type difference 53 | } alac_decoder ; 54 | 55 | alac_decoder * alac_decoder_new (void) ; 56 | void alac_decoder_delete (alac_decoder *) ; 57 | 58 | int32_t alac_init (alac_decoder *p, void * inMagicCookie, uint32_t inMagicCookieSize) ; 59 | int32_t alac_decode (alac_decoder *, struct BitBuffer * bits, uint8_t * sampleBuffer, uint32_t numSamples, uint32_t numChannels, uint32_t * outNumSamples) ; 60 | 61 | #endif /* ALAC_DECODER_H */ 62 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/ChangeLog: -------------------------------------------------------------------------------- 1 | 2004-05-12 Erik de Castro Lopo 2 | 3 | * gsm610_priv.h 4 | Replace ugly macros with inline functions. 5 | 6 | * *.c 7 | Remove temporary variables used by macros and other minor fixes required by 8 | above change. 9 | 10 | 2003-06-02 Erik de Castro Lopo 11 | 12 | * rpe.c 13 | Renamed variables "exp" to "expon" to avoid shadowed parameter warnigns. 14 | 15 | 2002-06-08 Erik de Castro Lopo 16 | 17 | * long_term.c 18 | Changes tp removed compiler warnings about shadowed parameters. 19 | 20 | 2002-06-08 Erik de Castro Lopo 21 | 22 | * private.h 23 | Made declarations of gsm_A, gsm_B, gsm_MIC etc extern. This fixed a compile 24 | problem on MacOSX. 25 | 26 | 2002-05-10 Erik de Castro Lopo 27 | 28 | * *.[ch] 29 | Removed all pre-ANSI prototype kludges. Removed proto.h and unproto.h. 30 | Started work on making GSM 6.10 files seekable. Currently they are not. 31 | 32 | * code.c private.h 33 | Function Gsm_Coder () used a statically defined array. This was obviously 34 | not re-entrant so moved it to struct gsm_state. 35 | 36 | 2001-09-16 Erik de Castro Lopo 37 | 38 | * code.c 39 | Added #includes for string.h and stdlib.h. 40 | 41 | 2000-10-27 Erik de Castro Lopo 42 | 43 | * config.h 44 | Removed some commented out #defines (ie //*efine) which were causing problems on 45 | the Sun cc compiler. 46 | 47 | 2000-02-29 Erik de Castro Lopo 48 | 49 | * private.h 50 | Added #defines to emulate normal compile time options. 51 | 52 | 2000-02-28 Erik de Castro Lopo 53 | 54 | * everthing 55 | Created this directory and copied files from libgsm. 56 | http://kbs.cs.tu-berlin.de/~jutta/toast.html 57 | -------------------------------------------------------------------------------- /source/external/libsndfile/man/sndfile-interleave.1: -------------------------------------------------------------------------------- 1 | .Dd November 2, 2014 2 | .Dt SNDFILE-INTERLEAVE 1 3 | .Os 4 | .Sh NAME 5 | .Nm sndfile-interleave , 6 | .Nm sndfile-deinterleave 7 | .Nd convert mono files into a multi-channel file and vice versa 8 | .Sh SYNOPSIS 9 | .Nm sndfile-interleave 10 | .Ar input1 11 | .Ar input2 12 | .Ar ... 13 | .Fl o Ar output 14 | .Nm sndfile-deinterleave 15 | .Ar file 16 | .Sh DESCRIPTION 17 | .Nm sndfile-interleave 18 | creates a multi-channel file taking audio data 19 | from two or more mono files as individual channels. 20 | The format of the output file is determined by its filename suffix. 21 | The audio parameters of the output file will be made so that 22 | the format can accommodate each of the mono inputs; 23 | for example, the samplerate will be the maximal samplerate 24 | occurring in the inputs. 25 | The output file will be overwritten if it already exists. 26 | .Pp 27 | .Nm sndfile-deinterleave 28 | creates two or more mono files from a multi-channel audio file, 29 | containing data from the individual channels. The names of the 30 | resulting mono files are of the form 31 | .Dq name_XY.suf 32 | where 33 | .Em name 34 | and 35 | .Em suf 36 | are the basename and suffix of the original file. 37 | If any file of such name already exists, it will be overwritten. 38 | Apart from the number of channels, 39 | the audio format of the resulting mono files 40 | is the same as that of the original file. 41 | .Sh EXIT STATUS 42 | .Ex -std 43 | .Sh EXAMPLES 44 | Merge a mono OGG file and a mono FLAC file into a stereo WAV file: 45 | .Bd -literal -offset indent 46 | $ sndfile-interleave left.ogg right.flac -o stereo.wav 47 | .Ed 48 | .Pp 49 | Split a multi-channel into individual mono files: 50 | .Bd -literal -offset indent 51 | $ sndfile-deinterleave multi.wav 52 | Input file : multi 53 | Output files : 54 | multi_00.wav 55 | multi_01.wav 56 | multi_02.wav 57 | multi_03.wav 58 | .Ed 59 | .Sh SEE ALSO 60 | .Lk http://libsndfile.github.io/libsndfile/ 61 | .Sh AUTHORS 62 | .An Erik de Castro Lopo Aq Mt erikd@mega-nerd.com 63 | -------------------------------------------------------------------------------- /source/external/libsndfile/Scripts/build-test-tarball.mk.in: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | 3 | # This is probably only going to work with GNU Make. 4 | # This in a separate file instead of in Makefile.am because Automake complains 5 | # about the GNU Make-isms. 6 | 7 | EXEEXT = @EXEEXT@ 8 | 9 | PACKAGE_VERSION = @PACKAGE_VERSION@ 10 | 11 | HOST_TRIPLET = @HOST_TRIPLET@ 12 | 13 | SRC_BINDIR = @SRC_BINDIR@ 14 | TEST_BINDIR = @TEST_BINDIR@ 15 | 16 | LIBRARY := $(SRC_BINDIR)libsndfile.so.$(LIB_VERSION) 17 | 18 | LIB_VERSION := $(shell echo $(PACKAGE_VERSION) | sed -e 's/[a-z].*//') 19 | 20 | TESTNAME = libsndfile-testsuite-$(HOST_TRIPLET)-$(PACKAGE_VERSION) 21 | 22 | TARBALL = $(TESTNAME).tar.gz 23 | 24 | # Find the test programs by grepping the script for the programs it executes. 25 | testprogs := $(shell grep '^\./' tests/test_wrapper.sh | sed -e "s|./||" -e "s/ .*//" | sort | uniq) 26 | # Also add the programs not found by the above. 27 | testprogs += tests/sfversion$(EXEEXT) tests/stdin_test$(EXEEXT) tests/stdout_test$(EXEEXT) \ 28 | tests/cpp_test$(EXEEXT) tests/win32_test$(EXEEXT) 29 | 30 | libfiles := $(shell if test ! -z $(EXEEXT) ; then echo "src/libsndfile-1.def src/.libs/libsndfile-1.dll" ; elif test -f $(LIBRARY) ; then echo $(LIBRARY) ; fi ; fi) 31 | 32 | testbins := $(testprogs) $(libfiles) 33 | 34 | all : $(TARBALL) 35 | 36 | clean : 37 | rm -rf $(TARBALL) $(TESTNAME)/ 38 | 39 | check : $(TESTNAME)/test_wrapper.sh 40 | (cd ./$(TESTNAME)/ && ./test_wrapper.sh) 41 | 42 | $(TARBALL) : $(TESTNAME)/test_wrapper.sh 43 | tar zcf $@ $(TESTNAME) 44 | rm -rf $(TESTNAME) 45 | @echo 46 | @echo "Created : $(TARBALL)" 47 | @echo 48 | 49 | $(TESTNAME)/test_wrapper.sh : tests/test_wrapper.sh tests/pedantic-header-test.sh 50 | rm -rf $(TESTNAME) 51 | mkdir -p $(TESTNAME)/tests/ 52 | echo 53 | echo $(testbins) 54 | echo 55 | cp $(testbins) $(TESTNAME)/tests/ 56 | cp tests/test_wrapper.sh $(TESTNAME)/ 57 | cp tests/pedantic-header-test.sh $(TESTNAME)/tests/ 58 | chmod u+x $@ 59 | 60 | tests/test_wrapper.sh : tests/test_wrapper.sh.in 61 | make $@ 62 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/Findmp3lame.cmake: -------------------------------------------------------------------------------- 1 | # - Find lame 2 | # Find the native lame includes and libraries 3 | # 4 | # MP3LAME_INCLUDE_DIRS - where to find lame.h, etc. 5 | # MP3LAME_LIBRARIES - List of libraries when using lame. 6 | # MP3LAME_FOUND - True if Lame found. 7 | 8 | if (MP3LAME_INCLUDE_DIR) 9 | # Already in cache, be silent 10 | set(MP3LAME_FIND_QUIETLY TRUE) 11 | endif () 12 | 13 | find_path (MP3LAME_INCLUDE_DIR lame/lame.h 14 | HINTS 15 | ${LAME_ROOT} 16 | ) 17 | 18 | # MSVC built lame may be named mp3lame_static. 19 | # The provided project files name the library with the lib prefix. 20 | 21 | find_library (MP3LAME_LIBRARY 22 | NAMES 23 | mp3lame 24 | mp3lame_static 25 | libmp3lame 26 | libmp3lame_static 27 | libmp3lame-static 28 | HINTS 29 | ${MP3LAME_ROOT} 30 | ) 31 | 32 | find_library (MP3LAME_HIP_LIBRARY 33 | NAMES 34 | mpghip-static 35 | libmpghip-static 36 | HINTS 37 | ${MP3LAME_ROOT} 38 | ) 39 | 40 | # Handle the QUIETLY and REQUIRED arguments and set LAME_FOUND 41 | # to TRUE if all listed variables are TRUE. 42 | include(FindPackageHandleStandardArgs) 43 | find_package_handle_standard_args (mp3lame 44 | REQUIRED_VARS 45 | MP3LAME_LIBRARY 46 | MP3LAME_INCLUDE_DIR 47 | ) 48 | 49 | if (MP3LAME_FOUND) 50 | set (MP3LAME_LIBRARIES ${MP3LAME_LIBRARY} ${MP3LAME_HIP_LIBRARY}) 51 | set (MP3LAME_INCLUDE_DIRS ${MP3LAME_INCLUDE_DIR}) 52 | 53 | if (NOT TARGET mp3lame::mp3lame) 54 | add_library (mp3lame::mp3lame UNKNOWN IMPORTED) 55 | set_target_properties (mp3lame::mp3lame PROPERTIES 56 | INTERFACE_INCLUDE_DIRECTORIES "${MP3LAME_INCLUDE_DIRS}" 57 | IMPORTED_LOCATION "${MP3LAME_LIBRARY}" 58 | ) 59 | if (MP3LAME_HIP_LIBRARY AND (NOT TARGET mp3lame::mpghip)) 60 | add_library (mp3lame::mpghip STATIC IMPORTED) 61 | set_property (mp3lame::mpghip PROPERTY IMPORTED_LOCATION "${MP3LAME_HIP_LIBRARY}") 62 | set_property (TARGET mp3lame::mp3lame PROPERTY INTERFACE_LINK_LIBRARIES "mp3lame::mpghip") 63 | endif () 64 | endif () 65 | endif () 66 | 67 | mark_as_advanced(MP3LAME_INCLUDE_DIR MP3LAME_LIBRARY MP3LAME_HIP_LIBRARY) 68 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/test_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2008-2016 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU Lesser General Public License as published by 6 | ** the Free Software Foundation; either version 2.1 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU Lesser General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU Lesser General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "sfconfig.h" 20 | 21 | #include 22 | #include 23 | #if defined (HAVE_SYS_TYPES_H) && (HAVE_SYS_TYPES_H == 1) 24 | #include 25 | #endif 26 | #include 27 | #include 28 | #include 29 | 30 | #include "test_main.h" 31 | 32 | static void 33 | test_file_offsets_are_64_bit (void) 34 | { 35 | print_test_name ("File offsets are 64 bit") ; 36 | 37 | // The Windows specific code path uses the 64 bit file I/O APIs. 38 | if (! USE_WINDOWS_API && sizeof (off_t) != 8) 39 | { printf ("\n\nError : sizeof (off_t) is %zd (should be 8).\n\n", sizeof (off_t)) ; 40 | exit (1) ; 41 | } ; 42 | 43 | puts ("ok") ; 44 | } /* test_file_offsets_are_64_bit */ 45 | 46 | int 47 | main (void) 48 | { 49 | test_file_offsets_are_64_bit () ; 50 | test_conversions () ; 51 | test_endswap () ; 52 | test_float_convert () ; 53 | test_double_convert () ; 54 | 55 | test_log_printf () ; 56 | test_binheader_writef () ; 57 | test_file_io () ; 58 | 59 | test_audio_detect () ; 60 | test_ima_oki_adpcm () ; 61 | 62 | test_psf_strlcpy_crlf () ; 63 | test_broadcast_var () ; 64 | test_cart_var () ; 65 | 66 | test_nms_adpcm () ; 67 | 68 | return 0 ; 69 | } /* main */ 70 | 71 | -------------------------------------------------------------------------------- /source/external/libresample/src/resample_defs.h: -------------------------------------------------------------------------------- 1 | /********************************************************************** 2 | 3 | resample_defs.h 4 | 5 | Real-time library interface by Dominic Mazzoni 6 | 7 | Based on resample-1.7: 8 | http://www-ccrma.stanford.edu/~jos/resample/ 9 | 10 | Dual-licensed as LGPL and BSD; see README.md and LICENSE* files. 11 | 12 | **********************************************************************/ 13 | 14 | #ifndef __RESAMPLE_DEFS__ 15 | #define __RESAMPLE_DEFS__ 16 | 17 | #if !defined(WIN32) && !defined(__CYGWIN__) 18 | #include "config.h" 19 | #endif 20 | 21 | #ifndef TRUE 22 | #define TRUE 1 23 | #endif 24 | 25 | #ifndef FALSE 26 | #define FALSE 0 27 | #endif 28 | 29 | #ifndef PI 30 | #define PI (3.14159265358979232846) 31 | #endif 32 | 33 | #ifndef PI2 34 | #define PI2 (6.28318530717958465692) 35 | #endif 36 | 37 | #define D2R (0.01745329348) /* (2*pi)/360 */ 38 | #define R2D (57.29577951) /* 360/(2*pi) */ 39 | 40 | #ifndef MAX 41 | #define MAX(x,y) ((x)>(y) ?(x):(y)) 42 | #endif 43 | #ifndef MIN 44 | #define MIN(x,y) ((x)<(y) ?(x):(y)) 45 | #endif 46 | 47 | #ifndef ABS 48 | #define ABS(x) ((x)<0 ?(-(x)):(x)) 49 | #endif 50 | 51 | #ifndef SGN 52 | #define SGN(x) ((x)<0 ?(-1):((x)==0?(0):(1))) 53 | #endif 54 | 55 | #if HAVE_INTTYPES_H 56 | #include 57 | typedef char BOOL; 58 | typedef int32_t WORD; 59 | typedef uint32_t UWORD; 60 | #else 61 | typedef char BOOL; 62 | typedef int WORD; 63 | typedef unsigned int UWORD; 64 | #endif 65 | 66 | #ifdef DEBUG 67 | #define INLINE 68 | #else 69 | #define INLINE inline 70 | #endif 71 | 72 | /* Accuracy */ 73 | 74 | #define Npc 4096 75 | 76 | /* Function prototypes */ 77 | 78 | int lrsSrcUp(float X[], float Y[], double factor, double *Time, 79 | UWORD Nx, UWORD Nwing, float LpScl, 80 | float Imp[], float ImpD[], BOOL Interp); 81 | 82 | int lrsSrcUD(float X[], float Y[], double factor, double *Time, 83 | UWORD Nx, UWORD Nwing, float LpScl, 84 | float Imp[], float ImpD[], BOOL Interp); 85 | 86 | #endif 87 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/G72x/ChangeLog: -------------------------------------------------------------------------------- 1 | 2001-06-05 Erik de Castro Lopo 2 | 3 | * g72x.c 4 | Added {} in function update () to prevent 'ambiguous else' warning messages. 5 | 6 | 2000-07-14 Erik de Castro Lopo 7 | 8 | * g72x.c 9 | Modified g72x_init_state () to fit in with the new structure of the code. 10 | Implemented g72x_encode_block () and g72x_decode_block (). 11 | 12 | 2000-07-12 Erik de Castro Lopo 13 | 14 | * g72x.h 15 | Moved nearly all definitions and function prototypes from this file have been 16 | moved to private.h. 17 | Added an enum defining the 4 different G72x ADPCM codecs. 18 | Added new function prototypes to define a cleaner interface to the encoder 19 | and decoder. This new interface also allows samples to be processed in blocks 20 | rather than on a sample by sample basis like the original code. 21 | 22 | * private.h 23 | Added prototypes moved from g72x.h. 24 | Changed struct g72x_state to a typedef struct { .. } G72x_PRIVATE. 25 | Added fields to G72x_PRIVATE required for working on blocks of samples. 26 | 27 | 2000-06-07 Erik de Castro Lopo 28 | 29 | * g72x.c 30 | Fixed all compiler warnings. 31 | Removed functions tandem_adjust() which is not required by libsndfile. 32 | 33 | * g721.c 34 | Fixed all compiler warnings. 35 | Removed functions tandem_adjust_alaw() and tandem_adjust_ulaw () which are not 36 | required by libsndfile. 37 | Removed second parameter to g721_encoder () which is not required. 38 | 39 | * g72x.h 40 | Removed in_coding and out_coding parameters from all functions. These allowed 41 | g72x encoding/decoding to/from A-law or u-law and are not required by libsndfile. 42 | Removed unneeded defines for A-law, u-law and linear encoding. 43 | 44 | * g723_16.c 45 | Removed second parameter (in_coding) for g723_16_encoder(). 46 | Removed second parameter (out_coding) for g723_16_decoder(). 47 | 48 | * private.h 49 | New file containing prototypes and tyepdefs private to G72x code. 50 | 51 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/SetupABIVersions.cmake: -------------------------------------------------------------------------------- 1 | # Inspiration: https://github.com/ros2-dotnet/Fast-RTPS 2 | 3 | macro (SETUP_ABI_VERSIONS) 4 | 5 | file (STRINGS ${PROJECT_SOURCE_DIR}/configure.ac CONFIGURE_AC_CONTENT) 6 | file (STRINGS 7 | configure.ac 8 | SNDFILE_LT_CURRENT_TMP 9 | REGEX "^m4_define\\(\\[?lt_current\\]?, *\\[?[0-9]+\\]?\\)" 10 | ) 11 | string (REGEX REPLACE "m4_define\\(\\[?lt_current\\]?, *\\[?([0-9]+)\\]?\\)" 12 | "\\1" 13 | SNDFILE_LT_CURRENT 14 | ${SNDFILE_LT_CURRENT_TMP} 15 | ) 16 | 17 | file (STRINGS 18 | configure.ac 19 | SNDFILE_LT_REVISION_TMP 20 | REGEX "^m4_define\\(\\[?lt_revision\\]?, *\\[?[0-9]+\\]?\\)" 21 | ) 22 | string (REGEX REPLACE "m4_define\\(\\[?lt_revision\\]?, *\\[?([0-9]+)\\]?\\)" 23 | "\\1" 24 | SNDFILE_LT_REVISION 25 | ${SNDFILE_LT_REVISION_TMP} 26 | ) 27 | 28 | file (STRINGS 29 | configure.ac 30 | SNDFILE_LT_AGE_TMP 31 | REGEX "^m4_define\\(\\[?lt_age\\]?, *\\[?[0-9]+\\]?\\)" 32 | ) 33 | string (REGEX REPLACE "m4_define\\(\\[?lt_age\\]?, *\\[?([0-9]+)\\]?\\)" 34 | "\\1" 35 | SNDFILE_LT_AGE 36 | ${SNDFILE_LT_AGE_TMP} 37 | ) 38 | 39 | # 40 | # Calculate CMake compatible ABI version from libtool version. 41 | # 42 | 43 | math (EXPR SNDFILE_ABI_VERSION_MAJOR "${SNDFILE_LT_CURRENT} - ${SNDFILE_LT_AGE}") 44 | set (SNDFILE_ABI_VERSION_MINOR ${SNDFILE_LT_AGE}) 45 | set (SNDFILE_ABI_VERSION_PATCH ${SNDFILE_LT_REVISION}) 46 | set (SNDFILE_ABI_VERSION "${SNDFILE_ABI_VERSION_MAJOR}.${SNDFILE_ABI_VERSION_MINOR}.${SNDFILE_ABI_VERSION_PATCH}") 47 | 48 | # 49 | # Apple platform current and compatibility versions. 50 | # 51 | 52 | math (EXPR SNDFILE_MACHO_CURRENT_VERSION_MAJOR "${SNDFILE_ABI_VERSION_MAJOR} + ${SNDFILE_ABI_VERSION_MINOR} + 1") 53 | set (SNDFILE_MACHO_CURRENT_VERSION "${SNDFILE_MACHO_CURRENT_VERSION_MAJOR}.${SNDFILE_ABI_VERSION_PATCH}.0") 54 | set (SNDFILE_MACHO_COMPATIBILITY_VERSION "${SNDFILE_MACHO_CURRENT_VERSION_MAJOR}.0.0") 55 | 56 | endmacro (SETUP_ABI_VERSIONS) 57 | -------------------------------------------------------------------------------- /source/external/libsndfile/libsndfile.spec.in: -------------------------------------------------------------------------------- 1 | 2 | %define name @PACKAGE@ 3 | %define version @VERSION@ 4 | %define release 1 5 | 6 | Summary: A library to handle various audio file formats. 7 | Name: %{name} 8 | Version: %{version} 9 | Release: %{release} 10 | Copyright: LGPL 11 | Group: Libraries/Sound 12 | Source: http://www.mega-nerd.com/libsndfile/libsndfile-%{version}.tar.gz 13 | Url: http://www.mega-nerd.com/libsndfile/ 14 | BuildRoot: /var/tmp/%{name}-%{version} 15 | 16 | %description 17 | libsndfile is a C library for reading and writing sound files such as 18 | AIFF, AU and WAV files through one standard interface. It can currently 19 | read/write 8, 16, 24 and 32-bit PCM files as well as 32-bit floating 20 | point WAV files and a number of compressed formats. 21 | 22 | %package devel 23 | Summary: Libraries, includes, etc to develop libsndfile applications 24 | Group: Libraries 25 | 26 | %description devel 27 | Libraries, include files, etc you can use to develop libsndfile applications. 28 | 29 | %prep 30 | %setup 31 | 32 | %build 33 | %configure 34 | make 35 | 36 | %install 37 | if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi 38 | mkdir -p $RPM_BUILD_ROOT 39 | make DESTDIR=$RPM_BUILD_ROOT install 40 | %clean 41 | if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi 42 | 43 | %files 44 | %defattr(-,root,root) 45 | %doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO doc 46 | %{_libdir}/libsndfile.so.* 47 | %{_bindir}/* 48 | %{_mandir}/man1/* 49 | %{_datadir}/octave/site/m/* 50 | %{_defaultdocdir}/libsndfile1-dev/html/* 51 | 52 | %files devel 53 | %defattr(-,root,root) 54 | %{_libdir}/libsndfile.a 55 | %{_libdir}/libsndfile.la 56 | %{_libdir}/libsndfile.so 57 | %{_includedir}/sndfile.h 58 | %{_libdir}/pkgconfig/sndfile.pc 59 | 60 | %changelog 61 | * Sun May 15 2005 Erik de Castro Lopo 62 | - Add html files to the files section. 63 | * Tue Sep 16 2003 Erik de Castro Lopo 64 | - Apply corrections from Andrew Schultz. 65 | * Mon Oct 21 2002 Erik de Castro Lopo 66 | - Force installation of sndfile.pc file. 67 | * Thu Jul 6 2000 Josh Green 68 | - Created libsndfile.spec.in 69 | 70 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/windows.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2009-2017 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU Lesser General Public License as published by 6 | ** the Free Software Foundation; either version 2.1 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU Lesser General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU Lesser General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | /* 20 | ** This needs to be a separate file so that we don't have to include 21 | ** elsewhere (too many symbol clashes). 22 | */ 23 | 24 | 25 | #include "sfconfig.h" 26 | 27 | #if OS_IS_WIN32 28 | #include 29 | 30 | #include "sndfile.h" 31 | #include "common.h" 32 | 33 | extern int sf_errno ; 34 | 35 | SNDFILE* 36 | sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo) 37 | { SF_PRIVATE *psf ; 38 | char utf8name [SF_BUFFER_LEN] ; 39 | DWORD dwError ; 40 | 41 | if ((psf = psf_allocate ()) == NULL) 42 | { sf_errno = SFE_MALLOC_FAILED ; 43 | return NULL ; 44 | } ; 45 | 46 | psf_init_files (psf) ; 47 | 48 | if (WideCharToMultiByte (CP_UTF8, 0, wpath, -1, utf8name, sizeof (utf8name), NULL, NULL) == 0) 49 | { dwError = GetLastError () ; 50 | if (dwError == ERROR_INSUFFICIENT_BUFFER) 51 | sf_errno = SFE_FILENAME_TOO_LONG ; 52 | else 53 | sf_errno = SF_ERR_UNSUPPORTED_ENCODING ; 54 | 55 | sf_close (psf) ; 56 | 57 | return NULL ; 58 | } ; 59 | 60 | psf_log_printf (psf, "File : '%s' (utf-8 converted from ucs-2)\n", utf8name) ; 61 | 62 | psf_copy_filename (psf, utf8name) ; 63 | psf->file.mode = mode ; 64 | 65 | psf->error = psf_fopen (psf) ; 66 | 67 | return psf_open_file (psf, sfinfo) ; 68 | } /* sf_wchar_open */ 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /source/external/libsndfile/Octave/octave_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | # Check where we're being run from. 5 | if test -d Octave ; then 6 | cd Octave 7 | octave_src_dir=$(pwd) 8 | elif test -z "$octave_src_dir" ; then 9 | echo 10 | echo "Error : \$octave_src_dir is undefined." 11 | echo 12 | exit 1 13 | else 14 | octave_src_dir=$(cd $octave_src_dir && pwd) 15 | fi 16 | 17 | # Find libsndfile shared object. 18 | libsndfile_lib_location="" 19 | 20 | if test -f "../src/.libs/libsndfile.so" ; then 21 | libsndfile_lib_location="../src/.libs/" 22 | elif test -f "../src/libsndfile.so" ; then 23 | libsndfile_lib_location="../src/" 24 | elif test -f "../src/.libs/libsndfile.dylib" ; then 25 | libsndfile_lib_location="../src/.libs/" 26 | elif test -f "../src/libsndfile.dylib" ; then 27 | libsndfile_lib_location="../src/" 28 | else 29 | echo 30 | echo "Not able to find the libsndfile shared lib we've just built." 31 | echo "This may cause the following test to fail." 32 | echo 33 | fi 34 | 35 | libsndfile_lib_location=`(cd $libsndfile_lib_location && pwd)` 36 | 37 | 38 | # Find sndfile.oct 39 | sndfile_oct_location="" 40 | 41 | if test -f .libs/sndfile.oct ; then 42 | sndfile_oct_location=".libs" 43 | elif test -f sndfile.oct ; then 44 | sndfile_oct_location="." 45 | else 46 | echo "Not able to find the sndfile.oct binaries we've just built." 47 | exit 1 48 | fi 49 | 50 | case `file -b $sndfile_oct_location/sndfile.oct` in 51 | ELF*) 52 | ;; 53 | Mach*) 54 | echo "Tests don't work on this platform." 55 | exit 0 56 | ;; 57 | *) 58 | echo "Not able to find the sndfile.oct binary we just built." 59 | exit 1 60 | ;; 61 | esac 62 | 63 | 64 | # Make sure the TERM environment variable doesn't contain anything wrong. 65 | unset TERM 66 | # echo "octave_src_dir : $octave_src_dir" 67 | # echo "libsndfile_lib_location : $libsndfile_lib_location" 68 | # echo "sndfile_oct_location : $sndfile_oct_location" 69 | 70 | if test ! -f PKG_ADD ; then 71 | cp $octave_src_dir/PKG_ADD . 72 | fi 73 | 74 | export LD_LIBRARY_PATH="$libsndfile_lib_location:$LD_LIBRARY_PATH" 75 | 76 | octave_script="$octave_src_dir/octave_test.m" 77 | 78 | (cd $sndfile_oct_location && octave -qH $octave_script) 79 | res=$? 80 | echo 81 | exit $res 82 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/table.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | /* Most of these tables are inlined at their point of use. 8 | */ 9 | 10 | /* 4.4 TABLES USED IN THE FIXED POINT IMPLEMENTATION OF THE RPE-LTP 11 | * CODER AND DECODER 12 | * 13 | * (Most of them inlined, so watch out.) 14 | */ 15 | 16 | #define GSM_TABLE_C 17 | #include "gsm610_priv.h" 18 | 19 | /* Table 4.1 Quantization of the Log.-Area Ratios 20 | */ 21 | /* i 1 2 3 4 5 6 7 8 */ 22 | int16_t gsm_A [8] = { 20480, 20480, 20480, 20480, 13964, 15360, 8534, 9036 } ; 23 | int16_t gsm_B [8] = { 0, 0, 2048, -2560, 94, -1792, -341, -1144 } ; 24 | int16_t gsm_MIC [8] = { -32, -32, -16, -16, -8, -8, -4, -4 } ; 25 | int16_t gsm_MAC [8] = { 31, 31, 15, 15, 7, 7, 3, 3 } ; 26 | 27 | 28 | /* Table 4.2 Tabulation of 1/A[1..8] 29 | */ 30 | int16_t gsm_INVA [8] = { 13107, 13107, 13107, 13107, 19223, 17476, 31454, 29708 } ; 31 | 32 | 33 | /* Table 4.3a Decision level of the LTP gain quantizer 34 | */ 35 | /* bc 0 1 2 3 */ 36 | int16_t gsm_DLB [4] = { 6554, 16384, 26214, 32767 } ; 37 | 38 | 39 | /* Table 4.3b Quantization levels of the LTP gain quantizer 40 | */ 41 | /* bc 0 1 2 3 */ 42 | int16_t gsm_QLB [4] = { 3277, 11469, 21299, 32767 } ; 43 | 44 | 45 | /* Table 4.4 Coefficients of the weighting filter 46 | */ 47 | /* i 0 1 2 3 4 5 6 7 8 9 10 */ 48 | int16_t gsm_H [11] = { -134, -374, 0, 2054, 5741, 8192, 5741, 2054, 0, -374, -134 } ; 49 | 50 | 51 | /* Table 4.5 Normalized inverse mantissa used to compute xM/xmax 52 | */ 53 | /* i 0 1 2 3 4 5 6 7 */ 54 | int16_t gsm_NRFAC [8] = { 29128, 26215, 23832, 21846, 20165, 18725, 17476, 16384 } ; 55 | 56 | 57 | /* Table 4.6 Normalized direct mantissa used to compute xM/xmax 58 | */ 59 | /* i 0 1 2 3 4 5 6 7 */ 60 | int16_t gsm_FAC [8] = { 18431, 20479, 22527, 24575, 26623, 28671, 30719, 32767 } ; 61 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/bugs.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 | 5 | # Reporting Bugs in libsndfile 6 | 7 | Before even attempting to report a bug in libsndfile please make sure you have 8 | read the [Frequently Asked Questions](FAQ.md). If you are having a problem 9 | writing code using libsndfile make sure you read the 10 | [Application Programming Interface](api.md) documentation. 11 | 12 | That said, I am interested in finding and fixing all genuine bugs in libsndfile. 13 | Bugs I want to fix include any of the following problems (and probably others): 14 | 15 | - Compilation problems on new platforms. 16 | - Errors being detected during the `make check` process. 17 | - Segmentation faults occuring inside libsndfile. 18 | - libsndfile hanging when opening a file. 19 | - Supported sound file types being incorrectly read or written. 20 | - Omissions, errors or spelling mistakes in the documentation. 21 | 22 | When submitting a bug report you must include: 23 | 24 | - Your system (CPU and memory size should be enough). 25 | - The operating system you are using. 26 | - Whether you are using a package provided by your distribution or you compiled 27 | it youself. 28 | - If you compiled it yourself, the compiler you are using. (Also make sure to 29 | run `make check`.) 30 | - A description of the problem. 31 | - Information generated by the sndfile-info program (see next paragraph). 32 | - If you are having problems with sndfile-play and ALSA on Linux, I will need 33 | information about your kernel, ALSA version, compiler version, whether you 34 | compiled the kernel/ALSA your self or installed from a package etc. 35 | 36 | If libsndfile compiles and installs correctly but has difficulty reading a 37 | particular file or type of file you should run the **sndfile-info** program 38 | (from the examples directory of the libsndfile distribution) on the file. See 39 | [here](sndfile_info.md) for an example of the use of the **sndfile-info** 40 | program. 41 | 42 | Please do not send me a sound file which fails to open under libsndfile unless 43 | I specifically ask you to. The above information should usually suffice for most 44 | problems. 45 | 46 | Once you have the above information you should submit a ticket on the libsndfile 47 | [GitHub issue tracker](https://github.com/libsndfile/libsndfile/issues). 48 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/libsndfile.css: -------------------------------------------------------------------------------- 1 | body { 2 | background : black ; 3 | color : white ; 4 | font-family : arial, helvetica, sans-serif ; 5 | line-height: 1.5 ; 6 | margin-left: 6%; 7 | margin-right: 6%; 8 | } 9 | td { 10 | font-family : arial, helvetica, sans-serif ; 11 | background : black ; 12 | color : white ; 13 | } 14 | center { 15 | font-family : arial, helvetica, sans-serif ; 16 | } 17 | p { 18 | font-family : arial, helvetica, sans-serif ; 19 | text-align : left ; 20 | } 21 | .indent_block { 22 | font-family : arial, helvetica, sans-serif ; 23 | text-align : left ; 24 | } 25 | br { 26 | font-family : arial, helvetica, sans-serif ; 27 | } 28 | form { 29 | font-family : arial, helvetica, sans-serif ; 30 | } 31 | ul { 32 | font-family : arial, helvetica, sans-serif ; 33 | text-align : left ; 34 | } 35 | ol { 36 | font-family : arial, helvetica, sans-serif ; 37 | text-align : left ; 38 | } 39 | dl { 40 | font-family : arial, helvetica, sans-serif ; 41 | text-align : left ; 42 | } 43 | h1 { 44 | font-size : xx-large ; 45 | background : black ; 46 | color : #5050FF ; 47 | text-align : left ; 48 | } 49 | h2 { 50 | font-size : x-large ; 51 | background : black ; 52 | color : #5050FF ; 53 | text-align : left ; 54 | } 55 | h3 { 56 | font-size : large ; 57 | background : black ; 58 | color : #5050FF ; 59 | text-align : left ; 60 | } 61 | h4 { 62 | font-size : medium ; 63 | background : black ; 64 | color : #5050FF ; 65 | text-align : left ; 66 | } 67 | pre { 68 | font-family : courier, monospace ; 69 | font-size : medium ; 70 | } 71 | code, 72 | kbd, 73 | samp, 74 | var { 75 | font-family: "Courier New", monospace, serif; 76 | font-size: 1em; 77 | } 78 | a:link { color : #9090FF ; } 79 | a:visited { color : #5050FF ; } 80 | a:active { color : #FF00FF ; } 81 | a:hover { background-color : #202080 ; } 82 | 83 | table.formats-table { 84 | text-align: center; 85 | font-size: small; 86 | border-collapse: collapse; 87 | } 88 | 89 | table.formats-table, table.formats-table th, table.formats-table td { 90 | border: 1px solid white; 91 | } 92 | 93 | .image-logo { 94 | display: block; 95 | margin-left: auto; 96 | margin-right: auto; 97 | } 98 | 99 | nav { 100 | text-align: center; 101 | } 102 | -------------------------------------------------------------------------------- /source/external/libsndfile/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Submitting Issues 4 | 5 | * If your issue is that libsndfile is not able to or is incorrectly reading one 6 | of your files, please include the output of the `sndfile-info` program run 7 | against the file. 8 | * If you are writing a program that uses libsndfile and you think there is a bug 9 | in libsndfile, reduce your program to the minimal example, make sure you compile 10 | it with warnings on (for GCC I would recommend at least `-Wall -Wextra`) and that 11 | your program is warning free, and that is is error free when run under Valgrind 12 | or compiled with AddressSanitizer. 13 | 14 | ## Submitting Patches 15 | 16 | * Patches should pass all existing tests 17 | * Patches should pass all pre-commit hook tests. 18 | * Patches should always be submitted via a either Github "pull request" or a 19 | via emailed patches created using "git format-patch". 20 | * Patches for new features should include tests and documentation. 21 | * Commit messages should follow the ["How to Write a Git Commit Message"](https://chris.beams.io/posts/git-commit/) guide: 22 | 1. Separate subject from body with a blank line 23 | 2. Limit the subject line to 50 characters 24 | 3. Capitalize the subject line 25 | 4. Do not end the subject line with a period 26 | 5. Use the imperative mood in the subject line 27 | 6. Wrap the body at 72 characters 28 | 7. Use the body to explain what and why vs. how 29 | 30 | Additional rule: the commit message may contain a prefix. The prefix must 31 | contain the name of the feature or source file related to the commit and must 32 | end with a colon followed by the message body. 33 | 34 | Examples of good commit messages: 35 | 1. Fix typo 36 | 2. Update CHANGELOG.md 37 | 3. Add ACT file format support 38 | 4. ogg_vorbis: Fix granule position when seeking Vorbis streams 39 | 40 | Examples of bad commit messages: 41 | 1. Fixed bug (rule 5) 42 | 2. update docs (rule 3) 43 | 3. Add very cool feature. (rule 4) 44 | 45 | * Patches to fix bugs should either pass all tests, or modify the tests in some 46 | sane way. 47 | * When a new feature is added for a particular file format and that feature 48 | makes sense for other formats, then it should also be implemented for one 49 | or two of the other formats. 50 | -------------------------------------------------------------------------------- /source/external/libresample/configure.in: -------------------------------------------------------------------------------- 1 | dnl 2 | dnl libresample configure.in script 3 | dnl 4 | dnl Dominic Mazzoni 5 | dnl 6 | 7 | dnl Require autoconf >= 2.13 8 | AC_PREREQ(2.13) 9 | 10 | dnl Init autoconf and make sure configure is being called 11 | dnl from the right directory 12 | AC_INIT([src/resample.c]) 13 | 14 | dnl Checks for programs. 15 | AC_PROG_CC 16 | AC_PROG_CPP 17 | AC_PROG_RANLIB 18 | 19 | AC_PATH_PROG(AR, ar, no) 20 | if [[ $AR = "no" ]] ; then 21 | AC_MSG_ERROR("Could not find ar - needed to create a library"); 22 | fi 23 | 24 | AC_SUBST(TARGETS) 25 | TARGETS="libresample.a tests/testresample" 26 | 27 | AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test], [enable tests using libsndfile and libsamplerate]), test_arg="yes", test_arg="no") 28 | 29 | if [[ x$test_arg = "xyes" ]] ; then 30 | AC_CHECK_LIB(sndfile, sf_open, have_libsndfile=yes, have_libsndfile=no) 31 | AC_CHECK_HEADER(sndfile.h, , have_libsndfile=no) 32 | 33 | if [[ $have_libsndfile = "yes" ]] ; then 34 | TARGETS="$TARGETS tests/resample-sndfile" 35 | fi 36 | 37 | AC_CHECK_LIB(samplerate, src_simple, have_libsamplerate=yes, have_libsamplerate=no) 38 | AC_CHECK_HEADER(samplerate.h, , have_libsamplerate=no) 39 | 40 | if [[ $have_libsamplerate = "yes" ]] ; then 41 | TARGETS="$TARGETS tests/compareresample" 42 | fi 43 | else 44 | have_libsamplerate="no" 45 | have_libsndfile="no" 46 | fi 47 | 48 | 49 | AC_CHECK_HEADERS(inttypes.h) 50 | 51 | AC_CONFIG_HEADER(src/config.h:src/configtemplate.h) 52 | AC_OUTPUT([Makefile]) 53 | 54 | echo "" 55 | 56 | if [[ $have_libsamplerate = "yes" ]] ; then 57 | echo "Configured to build tests/resample-sndfile using libsndfile" 58 | echo "" 59 | else if [[ x$test_arg = x"yes" ]] ; then 60 | echo "Could not find libsndfile - needed if you want to" 61 | echo "compile tests/resample-sndfile" 62 | echo "" 63 | fi 64 | fi 65 | 66 | if [[ $have_libsamplerate = "yes" ]] ; then 67 | echo "Configured to build tests/compareresample to compare against" 68 | echo "Erik de Castro Lopo's libsamplerate library." 69 | echo "" 70 | else if [[ x$test_arg = x"yes" ]] ; then 71 | echo "Could not find libsamplerate - only needed if you want to" 72 | echo "compile tests/compareresample to compare their performance." 73 | echo "" 74 | fi 75 | fi 76 | 77 | echo "Type 'configure --help' to see options." 78 | echo "" 79 | echo "Type 'make' to build libresample." 80 | -------------------------------------------------------------------------------- /source/external/libsndfile/README: -------------------------------------------------------------------------------- 1 | This is libsndfile, 1.1.0 2 | 3 | libsndfile is a library of C routines for reading and writing 4 | files containing sampled audio data. 5 | 6 | The src/ directory contains the source code for library itself. 7 | 8 | The doc/ directory contains the libsndfile documentation. 9 | 10 | The examples/ directory contains examples of how to write code using 11 | libsndfile. 12 | 13 | The tests/ directory contains programs which link against libsndfile 14 | and test its functionality. 15 | 16 | The src/GSM610 directory contains code written by Jutta Degener and Carsten 17 | Bormann. Their original code can be found at : 18 | http://kbs.cs.tu-berlin.de/~jutta/toast.html 19 | 20 | The src/G72x directory contains code written and released by Sun Microsystems 21 | under a suitably free license. 22 | 23 | The src/ALAC directory contains code written and released by Apple Inc and 24 | released under the Apache license. 25 | 26 | 27 | LINUX 28 | ----- 29 | Whereever possible, you should use the packages supplied by your Linux 30 | distribution. 31 | 32 | If you really do need to compile from source it should be as easy as: 33 | 34 | ./configure 35 | make 36 | make install 37 | 38 | Since libsndfile optionally links against libFLAC, libogg, libvorbis and 39 | libopus, you will need to install appropriate versions of these libraries 40 | before running configure as above. 41 | 42 | You can use CMake now to build under Linux, also under Windows and MacOS, see 43 | README.md for details. CMake toolchain is usable, but still exterimental. 44 | 45 | 46 | UNIX 47 | ---- 48 | Compile as for Linux. 49 | 50 | 51 | Win32/Win64 52 | ----------- 53 | 54 | Official Windows binaries are compiled with Autotools and MinGW, but you can use 55 | CMake to generate solution for Visual Studio. Details are described in 56 | README.md. 57 | 58 | It is still recommended to use the libsndfile binaries available on the 59 | libsndfile web site. 60 | 61 | MacOSX 62 | ------ 63 | Building on MacOSX should be the same as building it on any other Unix. 64 | 65 | 66 | CONTACTS 67 | -------- 68 | 69 | libsndfile was written by Erik de Castro Lopo (erikd AT mega-nerd DOT com). 70 | The libsndfile home page is at : 71 | 72 | http://libsndfile.github.io/libsndfile/ 73 | 74 | Bugs and support questions can be raised at : 75 | 76 | https://github.com/libsndfile/libsndfile/issues 77 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/ALAC/aglib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_APACHE_LICENSE_HEADER_START@ 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License") ; 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * @APPLE_APACHE_LICENSE_HEADER_END@ 19 | */ 20 | 21 | /* 22 | File: aglib.h 23 | 24 | Copyright: (C) 2001-2011 Apple, Inc. 25 | */ 26 | 27 | #ifndef AGLIB_H 28 | #define AGLIB_H 29 | 30 | #include 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | #define QBSHIFT 9 37 | #define QB (1 << QBSHIFT) 38 | #define PB0 40 39 | #define MB0 10 40 | #define KB0 14 41 | #define MAX_RUN_DEFAULT 255 42 | 43 | #define MMULSHIFT 2 44 | #define MDENSHIFT (QBSHIFT - MMULSHIFT - 1) 45 | #define MOFF ((1 << (MDENSHIFT - 2))) 46 | 47 | #define BITOFF 24 48 | 49 | /* Max. prefix of 1's. */ 50 | #define MAX_PREFIX_16 9 51 | #define MAX_PREFIX_TOLONG_16 15 52 | #define MAX_PREFIX_32 9 53 | 54 | /* Max. bits in 16-bit data type */ 55 | #define MAX_DATATYPE_BITS_16 16 56 | 57 | typedef struct AGParamRec 58 | { 59 | uint32_t mb, mb0, pb, kb, wb, qb ; 60 | uint32_t fw, sw ; 61 | 62 | uint32_t maxrun ; 63 | 64 | // fw = 1, sw = 1 ; 65 | 66 | } AGParamRec, *AGParamRecPtr ; 67 | 68 | struct BitBuffer ; 69 | 70 | void set_standard_ag_params (AGParamRecPtr params, uint32_t fullwidth, uint32_t sectorwidth) ; 71 | void set_ag_params (AGParamRecPtr params, uint32_t m, uint32_t p, uint32_t k, uint32_t f, uint32_t s, uint32_t maxrun) ; 72 | 73 | int32_t dyn_comp (AGParamRecPtr params, int32_t * pc, struct BitBuffer * bitstream, int32_t numSamples, int32_t bitSize, uint32_t * outNumBits) ; 74 | int32_t dyn_decomp (AGParamRecPtr params, struct BitBuffer * bitstream, int32_t * pc, int32_t numSamples, int32_t maxSize, uint32_t * outNumBits) ; 75 | 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | 81 | #endif //#ifndef AGLIB_H 82 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/pedantic-header-test.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (C) 2010-2017 Erik de Castro Lopo 4 | # 5 | # All rights reserved. 6 | # 7 | # Redistribution and use in source and binary forms, with or without 8 | # modification, are permitted provided that the following conditions are 9 | # met: 10 | # 11 | # * Redistributions of source code must retain the above copyright 12 | # notice, this list of conditions and the following disclaimer. 13 | # * Redistributions in binary form must reproduce the above copyright 14 | # notice, this list of conditions and the following disclaimer in 15 | # the documentation and/or other materials provided with the 16 | # distribution. 17 | # * Neither the author nor the names of any contributors may be used 18 | # to endorse or promote products derived from this software without 19 | # specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 23 | # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 25 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 28 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 29 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 30 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 31 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | 33 | 34 | if test ! -f @top_srcdir@/tests/sfversion.c ; then 35 | exit 0 36 | fi 37 | 38 | echo -n " Pedantic header test : " 39 | 40 | # Only do this if the compiler is GCC. 41 | if test -n "@GCC_MAJOR_VERSION@" ; then 42 | 43 | CC=`echo "@CC@" | sed "s/.*shave cc //"` 44 | # Compile with -Werror and -pedantic. 45 | $CC -std=c99 -Werror -pedantic -I@top_srcdir@/src -I@abs_top_builddir@/src -I@top_srcdir@/include -c @top_srcdir@/tests/sfversion.c -o /dev/null 46 | 47 | # Check compiler return status. 48 | if test $? -ne 0 ; then 49 | echo 50 | exit 1 51 | fi 52 | 53 | echo "ok" 54 | else 55 | echo "n/a" 56 | fi 57 | 58 | exit 0 59 | -------------------------------------------------------------------------------- /source/external/libsndfile/ossfuzz/standaloneengine.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "testinput.h" 6 | 7 | /** 8 | * Main procedure for standalone fuzzing engine. 9 | * 10 | * Reads filenames from the argument array. For each filename, read the file 11 | * into memory and then call the fuzzing interface with the data. 12 | */ 13 | int main(int argc, char **argv) 14 | { 15 | int ii; 16 | for(ii = 1; ii < argc; ii++) 17 | { 18 | FILE *infile; 19 | printf("[%s] ", argv[ii]); 20 | 21 | /* Try and open the file. */ 22 | infile = fopen(argv[ii], "rb"); 23 | if(infile) 24 | { 25 | uint8_t *buffer = NULL; 26 | size_t buffer_len; 27 | 28 | printf("Opened.. "); 29 | 30 | /* Get the length of the file. */ 31 | fseek(infile, 0L, SEEK_END); 32 | buffer_len = ftell(infile); 33 | 34 | /* Reset the file indicator to the beginning of the file. */ 35 | fseek(infile, 0L, SEEK_SET); 36 | 37 | /* Allocate a buffer for the file contents. */ 38 | buffer = (uint8_t *)calloc(buffer_len, sizeof(uint8_t)); 39 | if(buffer) 40 | { 41 | size_t result; 42 | 43 | /* Read all the text from the file into the buffer. */ 44 | result = fread(buffer, sizeof(uint8_t), buffer_len, infile); 45 | 46 | if (result == buffer_len) 47 | { 48 | printf("Read %zu bytes, fuzzing.. ", buffer_len); 49 | /* Call the fuzzer with the data. */ 50 | LLVMFuzzerTestOneInput(buffer, buffer_len); 51 | 52 | printf("complete !!"); 53 | } 54 | else 55 | { 56 | fprintf(stderr, 57 | "Failed to read %zu bytes (result %zu)\n", 58 | buffer_len, 59 | result); 60 | } 61 | 62 | /* Free the buffer as it's no longer needed. */ 63 | free(buffer); 64 | buffer = NULL; 65 | } 66 | else 67 | { 68 | fprintf(stderr, 69 | "[%s] Failed to allocate %zu bytes \n", 70 | argv[ii], 71 | buffer_len); 72 | } 73 | 74 | /* Close the file as it's no longer needed. */ 75 | fclose(infile); 76 | infile = NULL; 77 | } 78 | else 79 | { 80 | /* Failed to open the file. Maybe wrong name or wrong permissions? */ 81 | fprintf(stderr, "[%s] Open failed. \n", argv[ii]); 82 | } 83 | 84 | printf("\n"); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /source/common/vutuController.h: -------------------------------------------------------------------------------- 1 | // VST3 example code for madronalib 2 | // (c) 2020, Madrona Labs LLC, all rights reserved 3 | // see LICENSE.txt for details 4 | 5 | #pragma once 6 | 7 | #include "MLDSPSample.h" 8 | #include "MLFiles.h" 9 | #include "MLPropertyTree.h" 10 | #include "MLAppController.h" 11 | 12 | #include "vutuParameters.h" 13 | #include "vutuProcessor.h" 14 | #include "vutuView.h" 15 | 16 | #include "vutuPartials.h" 17 | 18 | #include "sndfile.hh" 19 | 20 | #include "loris.h" 21 | 22 | using namespace ml; 23 | 24 | 25 | //----------------------------------------------------------------------------- 26 | class VutuController final: 27 | public AppController 28 | { 29 | public: 30 | 31 | VutuController(TextFragment appName, const ParameterDescriptionList& pdl); 32 | ~VutuController(); 33 | 34 | // Actor interface 35 | void onMessage(Message m) override; 36 | 37 | // update the named collection of files and return a pointer to it. 38 | FileTree* updateCollection(Path which); 39 | 40 | // enable / disable the right buttons on the View 41 | void setButtonEnableStates(); 42 | 43 | private: 44 | 45 | ml::Sample _sourceSample; 46 | ml::Sample _synthesizedSample; 47 | 48 | std::unique_ptr< Loris::PartialList > _lorisPartials; 49 | std::unique_ptr< VutuPartialsData > _vutuPartials; 50 | 51 | int saveSampleToWavFile(const ml::Sample& signal, Path wavPath); 52 | 53 | int loadSampleFromPath(Path samplePath); 54 | int loadPartialsFromPath(Path samplePath); 55 | 56 | void saveTextToPath(const TextFragment& text, Path savePath); 57 | 58 | void showAnalysisInfo(); 59 | void setAnalysisParamsFromPartials(); 60 | 61 | int _loadSampleFromDialog(); 62 | int analyzeSample(); 63 | void broadcastSourceSample(); 64 | 65 | void _clearPartialsData(); 66 | void broadcastPartialsData(); 67 | 68 | void synthesize(); 69 | 70 | void _clearSynthesizedSample(); 71 | void broadcastSynthesizedSample(); 72 | void syncIntervals(); 73 | 74 | // the state to which we can revert, stored as normalized values. 75 | Tree< Value > _revertState; 76 | bool _changedFromRevertValues{true}; 77 | 78 | // file paths 79 | // TODO persist in app prefs 80 | Path recentSamplesInPath; 81 | Path recentSamplesOutPath; 82 | Path recentPartialsInPath; 83 | Path recentPartialsOutPath; 84 | 85 | File sourceFileLoaded; 86 | 87 | Timer _debugTimer; 88 | void _debug(); 89 | void _printToConsole(TextFragment t); 90 | 91 | Symbol playMode{ "off" }; 92 | 93 | }; 94 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/TestInline.cmake: -------------------------------------------------------------------------------- 1 | macro (TEST_INLINE) 2 | if (NOT DEFINED INLINE_CODE) 3 | message (STATUS "Checking for inline...") 4 | set (INLINE_KEYWORD "inline") 5 | configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c) 6 | try_compile (HAVE_INLINE "${CMAKE_CURRENT_BINARY_DIR}" 7 | "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c") 8 | if (HAVE_INLINE) 9 | message (STATUS "Checking for inline... supported") 10 | else () 11 | message (STATUS "Checking for inline... not supported") 12 | 13 | message (STATUS "Checking for __inline...") 14 | set (INLINE_KEYWORD "__inline") 15 | configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c) 16 | try_compile (HAVE___INLINE "${CMAKE_CURRENT_BINARY_DIR}" 17 | "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c") 18 | if (HAVE___INLINE) 19 | message (STATUS "Checking for __inline... supported") 20 | else () 21 | message (STATUS "Checking for __inline... not supported") 22 | 23 | message (STATUS "Checking for __inline__...") 24 | set (INLINE_KEYWORD "__inline__") 25 | configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c) 26 | try_compile (HAVE___INLINE "${CMAKE_CURRENT_BINARY_DIR}" 27 | "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c") 28 | if (HAVE___INLINE) 29 | message (STATUS "Checking for __inline__... supported") 30 | 31 | message (STATUS "Checking for __inline__...") 32 | set (INLINE_KEYWORD "__inline__") 33 | configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/cmake/TestInline.c) 34 | try_compile (HAVE___INLINE__ "${CMAKE_CURRENT_BINARY_DIR}" 35 | "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c") 36 | else () 37 | message (STATUS "Checking for __inline__... not supported") 38 | set (INLINE_KEYWORD "") 39 | endif () 40 | 41 | endif () 42 | endif () 43 | 44 | if (HAVE_INLINE) 45 | set (INLINE_CODE "/* #undef inline */" CACHE INTERNAL "") 46 | elseif (HAVE___INLINE) 47 | set (INLINE_CODE "#define inline __inline" CACHE INTERNAL "") 48 | elseif (HAVE___INLINE__) 49 | set (INLINE_CODE "#define inline __inline__" CACHE INTERNAL "") 50 | else () 51 | set (INLINE_CODE "#define inline " CACHE INTERNAL "") 52 | endif () 53 | endif () 54 | endmacro (TEST_INLINE) 55 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/generate.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2007-2012 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU General Public License as published by 6 | ** the Free Software Foundation; either version 2 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "sfconfig.h" 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | #include 27 | 28 | #include "utils.h" 29 | #include "generate.h" 30 | 31 | #define SF_MAX(x, y) ((x) > (y) ? (x) : (y)) 32 | 33 | static float crappy_snare (float *output, int len, int offset, float gain, float maxabs) ; 34 | 35 | void 36 | generate_file (const char * filename, int format, int len) 37 | { float * output ; 38 | float maxabs = 0.0 ; 39 | 40 | output = calloc (len, sizeof (float)) ; 41 | 42 | maxabs = crappy_snare (output, len, 0, 0.95f, maxabs) ; 43 | maxabs = crappy_snare (output, len, len / 4, 0.85f, maxabs) ; 44 | maxabs = crappy_snare (output, len, 2 * len / 4, 0.85f, maxabs) ; 45 | crappy_snare (output, len, 3 * len / 4, 0.85f, maxabs) ; 46 | 47 | write_mono_file (filename, format, 44100, output, len) ; 48 | 49 | free (output) ; 50 | } /* generate_file */ 51 | 52 | static inline float 53 | rand_float (void) 54 | { return rand () / (0.5f * (float) RAND_MAX) - 1.0f ; 55 | } /* rand_float */ 56 | 57 | static float 58 | crappy_snare (float *output, int len, int offset, float gain, float maxabs) 59 | { int k ; 60 | float env = 0.0f ; 61 | 62 | for (k = offset ; k < len && env < gain ; k++) 63 | { env += 0.03f ; 64 | output [k] += env * rand_float () ; 65 | maxabs = SF_MAX (maxabs, fabsf (output [k])) ; 66 | } ; 67 | 68 | for ( ; k < len && env > 1e-8 ; k++) 69 | { env *= 0.995f ; 70 | output [k] += env * rand_float () ; 71 | maxabs = SF_MAX (maxabs, fabsf (output [k])) ; 72 | } ; 73 | 74 | return maxabs ; 75 | } /* crappy_snare */ 76 | -------------------------------------------------------------------------------- /source/external/libsndfile/tests/largefile_test.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2006-2011 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU General Public License as published by 6 | ** the Free Software Foundation; either version 2 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "sfconfig.h" 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #if HAVE_UNISTD_H 26 | #include 27 | #else 28 | #include "sf_unistd.h" 29 | #endif 30 | 31 | #include 32 | 33 | #include "utils.h" 34 | 35 | #define BUFFER_LEN (1024 * 1024) 36 | #define BUFFER_COUNT (768) 37 | 38 | static void largefile_test (int filetype, const char * filename) ; 39 | 40 | int 41 | main (void) 42 | { 43 | largefile_test (SF_FORMAT_WAV, "largefile.wav") ; 44 | largefile_test (SF_FORMAT_AIFF, "largefile.aiff") ; 45 | 46 | return 0 ; 47 | } /* main */ 48 | 49 | static void 50 | largefile_test (int filetype, const char * filename) 51 | { static float data [BUFFER_LEN] ; 52 | SNDFILE *file ; 53 | SF_INFO sfinfo ; 54 | int k ; 55 | 56 | print_test_name ("largefile_test", filename) ; 57 | 58 | sfinfo.samplerate = 44100 ; 59 | sfinfo.channels = 2 ; 60 | sfinfo.frames = 0 ; 61 | sfinfo.format = (filetype | SF_FORMAT_PCM_32) ; 62 | 63 | file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ; 64 | 65 | for (k = 0 ; k < BUFFER_COUNT ; k++) 66 | test_write_float_or_die (file, k, data, BUFFER_LEN, __LINE__) ; 67 | 68 | sf_close (file) ; 69 | 70 | file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ; 71 | 72 | if ((sfinfo.frames * sfinfo.channels) / BUFFER_LEN != BUFFER_COUNT) 73 | { printf ("\n\nLine %d : bad frame count.\n", __LINE__) ; 74 | exit (1) ; 75 | } ; 76 | 77 | sf_close (file) ; 78 | 79 | unlink (filename) ; 80 | puts ("ok") ; 81 | 82 | 83 | return ; 84 | } /* largefile_test */ 85 | 86 | -------------------------------------------------------------------------------- /source/external/libsndfile/examples/sndfilehandle.cc: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2007-2011 Erik de Castro Lopo 3 | ** 4 | ** This program is free software; you can redistribute it and/or modify 5 | ** it under the terms of the GNU General Public License as published by 6 | ** the Free Software Foundation; either version 2 of the License, or 7 | ** (at your option) any later version. 8 | ** 9 | ** This program is distributed in the hope that it will be useful, 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ** GNU General Public License for more details. 13 | ** 14 | ** You should have received a copy of the GNU General Public License 15 | ** along with this program; if not, write to the Free Software 16 | ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #include 23 | 24 | #define BUFFER_LEN 1024 25 | 26 | static void 27 | create_file (const char * fname, int format) 28 | { static short buffer [BUFFER_LEN] ; 29 | 30 | SndfileHandle file ; 31 | int channels = 2 ; 32 | int srate = 48000 ; 33 | 34 | printf ("Creating file named '%s'\n", fname) ; 35 | 36 | file = SndfileHandle (fname, SFM_WRITE, format, channels, srate) ; 37 | 38 | memset (buffer, 0, sizeof (buffer)) ; 39 | 40 | file.write (buffer, BUFFER_LEN) ; 41 | 42 | puts ("") ; 43 | /* 44 | ** The SndfileHandle object will automatically close the file and 45 | ** release all allocated memory when the object goes out of scope. 46 | ** This is the Resource Acquisition Is Initailization idom. 47 | ** See : http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization 48 | */ 49 | } /* create_file */ 50 | 51 | static void 52 | read_file (const char * fname) 53 | { static short buffer [BUFFER_LEN] ; 54 | 55 | SndfileHandle file ; 56 | 57 | file = SndfileHandle (fname) ; 58 | 59 | printf ("Opened file '%s'\n", fname) ; 60 | printf (" Sample rate : %d\n", file.samplerate ()) ; 61 | printf (" Channels : %d\n", file.channels ()) ; 62 | 63 | file.read (buffer, BUFFER_LEN) ; 64 | 65 | puts ("") ; 66 | 67 | /* RAII takes care of destroying SndfileHandle object. */ 68 | } /* read_file */ 69 | 70 | int 71 | main (void) 72 | { const char * fname = "test.wav" ; 73 | 74 | puts ("\nSimple example showing usage of the C++ SndfileHandle object.\n") ; 75 | 76 | create_file (fname, SF_FORMAT_WAV | SF_FORMAT_PCM_16) ; 77 | 78 | read_file (fname) ; 79 | 80 | puts ("Done.\n") ; 81 | return 0 ; 82 | } /* main */ 83 | 84 | 85 | -------------------------------------------------------------------------------- /source/external/libsndfile/ossfuzz/sndfile_alt_fuzzer.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "sndfile_fuzz_header.h" 8 | 9 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) 10 | { // One byte is needed for deciding which function to target. 11 | if (size == 0) 12 | return 0 ; 13 | 14 | const uint8_t decider = *data ; 15 | data += 1 ; 16 | size -= 1 ; 17 | 18 | SF_INFO sndfile_info ; 19 | VIO_DATA vio_data ; 20 | SF_VIRTUAL_IO vio ; 21 | SNDFILE *sndfile = NULL ; 22 | int err = sf_init_file(data, size, &sndfile, &vio_data, &vio, &sndfile_info) ; 23 | if (err) 24 | goto EXIT_LABEL ; 25 | 26 | // Just the right number of channels. Create some buffer space for reading. 27 | switch (decider % 3) 28 | { case 0 : 29 | { 30 | short* read_buffer = NULL ; 31 | read_buffer = (short*)malloc(sizeof(short) * size); 32 | if (read_buffer == NULL) 33 | abort() ; 34 | 35 | while (sf_read_short(sndfile, read_buffer, size)) 36 | { 37 | // Do nothing with the data. 38 | } 39 | free(read_buffer) ; 40 | } 41 | break ; 42 | case 1 : 43 | { 44 | int* read_buffer = NULL ; 45 | read_buffer = (int*)malloc(sizeof(int) * size) ; 46 | if (read_buffer == NULL) 47 | abort() ; 48 | 49 | while (sf_read_int(sndfile, read_buffer, size)) 50 | { 51 | // Do nothing with the data. 52 | } 53 | free(read_buffer) ; 54 | } 55 | break ; 56 | case 2 : 57 | { 58 | double* read_buffer = NULL ; 59 | read_buffer = (double*)malloc(sizeof(double) * size) ; 60 | if (read_buffer == NULL) 61 | abort() ; 62 | 63 | while (sf_read_double(sndfile, read_buffer, size)) 64 | { 65 | // Do nothing with the data. 66 | } 67 | free(read_buffer) ; 68 | } 69 | break ; 70 | default : 71 | break ; 72 | } ; 73 | 74 | EXIT_LABEL: 75 | if (sndfile != NULL) 76 | sf_close(sndfile); 77 | 78 | return 0 ; 79 | } 80 | -------------------------------------------------------------------------------- /source/external/libsndfile/cmake/ClipMode.cmake: -------------------------------------------------------------------------------- 1 | include (CheckCSourceRuns) 2 | include (CMakePushCheckState) 3 | 4 | macro (CLIP_MODE) 5 | if ((NOT DEFINED CPU_CLIPS_NEGATIVE) AND (NOT DEFINED CPU_CLIPS_POSITIVE)) 6 | set (CLIP_MODE_POSITIVE_MESSAGE "Target processor clips on positive float to int conversion") 7 | set (CLIP_MODE_NEGATIVE_MESSAGE "Target processor clips on negative float to int conversion") 8 | 9 | message (STATUS "Checking processor clipping capabilities...") 10 | 11 | if (CMAKE_CROSSCOMPILING) 12 | 13 | set (CLIP_MSG "disabled") 14 | set (CPU_CLIPS_POSITIVE FALSE CACHE BOOL ${CLIP_MODE_POSITIVE_MESSAGE}) 15 | set (CPU_CLIPS_NEGATIVE FALSE CACHE BOOL ${CLIP_MODE_NEGATIVE_MESSAGE}) 16 | 17 | else (NOT CMAKE_CROSSCOMPILING) 18 | 19 | cmake_push_check_state () 20 | 21 | set (CMAKE_REQUIRED_QUIET TRUE) 22 | if (LIBM_REQUIRED) 23 | set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${M_LIBRARY}) 24 | endif () 25 | 26 | check_c_source_runs ( 27 | " 28 | #define _ISOC9X_SOURCE 1 29 | #define _ISOC99_SOURCE 1 30 | #define __USE_ISOC99 1 31 | #define __USE_ISOC9X 1 32 | #include 33 | int main (void) 34 | { double fval ; 35 | int k, ival ; 36 | 37 | fval = 1.0 * 0x7FFFFFFF ; 38 | for (k = 0 ; k < 100 ; k++) 39 | { ival = (lrint (fval)) >> 24 ; 40 | if (ival != 127) 41 | return 1 ; 42 | 43 | fval *= 1.2499999 ; 44 | } ; 45 | 46 | return 0 ; 47 | } 48 | " 49 | CPU_CLIPS_POSITIVE) 50 | 51 | check_c_source_runs ( 52 | " 53 | #define _ISOC9X_SOURCE 1 54 | #define _ISOC99_SOURCE 1 55 | #define __USE_ISOC99 1 56 | #define __USE_ISOC9X 1 57 | #include 58 | int main (void) 59 | { double fval ; 60 | int k, ival ; 61 | 62 | fval = -8.0 * 0x10000000 ; 63 | for (k = 0 ; k < 100 ; k++) 64 | { ival = (lrint (fval)) >> 24 ; 65 | if (ival != -128) 66 | return 1 ; 67 | 68 | fval *= 1.2499999 ; 69 | } ; 70 | 71 | return 0 ; 72 | } 73 | " 74 | CPU_CLIPS_NEGATIVE) 75 | 76 | cmake_pop_check_state () 77 | 78 | if (CPU_CLIPS_POSITIVE AND (NOT CPU_CLIPS_NEGATIVE)) 79 | set (CLIP_MSG "positive") 80 | elseif (CPU_CLIPS_NEGATIVE AND (NOT CPU_CLIPS_POSITIVE)) 81 | set (CLIP_MSG "negative") 82 | elseif (CPU_CLIPS_POSITIVE AND CPU_CLIPS_NEGATIVE) 83 | set (CLIP_MSG "both") 84 | else () 85 | set (CLIP_MSG "none") 86 | endif () 87 | 88 | endif (CMAKE_CROSSCOMPILING) 89 | 90 | message (STATUS "Checking processor clipping capabilities... ${CLIP_MSG}") 91 | endif () 92 | endmacro (CLIP_MODE) 93 | -------------------------------------------------------------------------------- /source/external/libsndfile/m4/ax_recursive_eval.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # https://www.gnu.org/software/autoconf-archive/ax_recursive_eval.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_RECURSIVE_EVAL(VALUE, RESULT) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Interpolate the VALUE in loop until it doesn't change, and set the 12 | # result to $RESULT. WARNING: It's easy to get an infinite loop with some 13 | # unsane input. 14 | # 15 | # LICENSE 16 | # 17 | # Copyright (c) 2008 Alexandre Duret-Lutz 18 | # 19 | # This program is free software; you can redistribute it and/or modify it 20 | # under the terms of the GNU General Public License as published by the 21 | # Free Software Foundation; either version 2 of the License, or (at your 22 | # option) any later version. 23 | # 24 | # This program is distributed in the hope that it will be useful, but 25 | # WITHOUT ANY WARRANTY; without even the implied warranty of 26 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 27 | # Public License for more details. 28 | # 29 | # You should have received a copy of the GNU General Public License along 30 | # with this program. If not, see . 31 | # 32 | # As a special exception, the respective Autoconf Macro's copyright owner 33 | # gives unlimited permission to copy, distribute and modify the configure 34 | # scripts that are the output of Autoconf when processing the Macro. You 35 | # need not follow the terms of the GNU General Public License when using 36 | # or distributing such scripts, even though portions of the text of the 37 | # Macro appear in them. The GNU General Public License (GPL) does govern 38 | # all other use of the material that constitutes the Autoconf Macro. 39 | # 40 | # This special exception to the GPL applies to versions of the Autoconf 41 | # Macro released by the Autoconf Archive. When you make and distribute a 42 | # modified version of the Autoconf Macro, you may extend this special 43 | # exception to the GPL to apply to your modified version as well. 44 | 45 | #serial 1 46 | 47 | AC_DEFUN([AX_RECURSIVE_EVAL], 48 | [_lcl_receval="$1" 49 | $2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" 50 | test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" 51 | _lcl_receval_old='' 52 | while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do 53 | _lcl_receval_old="[$]_lcl_receval" 54 | eval _lcl_receval="\"[$]_lcl_receval\"" 55 | done 56 | echo "[$]_lcl_receval")`]) 57 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/code.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | 8 | #include 9 | #include 10 | 11 | #include "gsm610_priv.h" 12 | 13 | /* 14 | * 4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER 15 | */ 16 | 17 | void Gsm_Coder ( 18 | 19 | struct gsm_state * State, 20 | 21 | int16_t * s, /* [0..159] samples IN */ 22 | 23 | /* 24 | * The RPE-LTD coder works on a frame by frame basis. The length of 25 | * the frame is equal to 160 samples. Some computations are done 26 | * once per frame to produce at the output of the coder the 27 | * LARc [1..8] parameters which are the coded LAR coefficients and 28 | * also to realize the inverse filtering operation for the entire 29 | * frame (160 samples of signal d [0..159]). These parts produce at 30 | * the output of the coder: 31 | */ 32 | 33 | int16_t * LARc, /* [0..7] LAR coefficients OUT */ 34 | 35 | /* 36 | * Procedure 4.2.11 to 4.2.18 are to be executed four times per 37 | * frame. That means once for each sub-segment RPE-LTP analysis of 38 | * 40 samples. These parts produce at the output of the coder: 39 | */ 40 | 41 | int16_t *Nc, /* [0..3] LTP lag OUT */ 42 | int16_t *bc, /* [0..3] coded LTP gain OUT */ 43 | int16_t *Mc, /* [0..3] RPE grid selection OUT */ 44 | int16_t *xmaxc, /* [0..3] Coded maximum amplitude OUT */ 45 | int16_t *xMc /* [13*4] normalized RPE samples OUT */ 46 | ) 47 | { 48 | int k ; 49 | int16_t *dp = State->dp0 + 120 ; /* [-120...-1] */ 50 | int16_t *dpp = dp ; /* [0...39] */ 51 | 52 | int16_t so [160] ; 53 | 54 | Gsm_Preprocess (State, s, so) ; 55 | Gsm_LPC_Analysis (State, so, LARc) ; 56 | Gsm_Short_Term_Analysis_Filter (State, LARc, so) ; 57 | 58 | for (k = 0 ; k <= 3 ; k++, xMc += 13) 59 | { Gsm_Long_Term_Predictor (State, 60 | so+k*40, /* d [0..39] IN */ 61 | dp, /* dp [-120..-1] IN */ 62 | State->e + 5, /* e [0..39] OUT */ 63 | dpp, /* dpp [0..39] OUT */ 64 | Nc++, 65 | bc++) ; 66 | 67 | Gsm_RPE_Encoding (/*-S,-*/ 68 | State->e + 5, /* e ][0..39][IN/OUT */ 69 | xmaxc++, Mc++, xMc) ; 70 | /* 71 | * Gsm_Update_of_reconstructed_short_time_residual_signal 72 | * (dpp, State->e + 5, dp) ; 73 | */ 74 | 75 | { 76 | register int i ; 77 | for (i = 0 ; i <= 39 ; i++) 78 | dp [i] = GSM_ADD (State->e [5 + i], dpp [i]) ; 79 | } 80 | dp += 40 ; 81 | dpp += 40 ; 82 | 83 | } 84 | memcpy ((char *) State->dp0, (char *) (State->dp0 + 160), 85 | 120 * sizeof (*State->dp0)) ; 86 | } 87 | 88 | -------------------------------------------------------------------------------- /source/external/libsndfile/docs/donate.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: libsndfile : donate. 4 | --- 5 | 6 | {% include logo.html %} 7 | 8 | Dear libsndfile user, 9 | 10 | This library was developed on Linux for Linux. I am not a Windows user and 11 | maintaining this library for Windows costs me significant amounts of time above 12 | and beyond the time taken to make it work on Linux and Unix-like systems. 13 | 14 | I therefore ask Windows users of libsndfile to donate to ensure that 15 | libsndfile's support for Windows continues. As long as donations continue to 16 | flow in at a decentrate, I will continue to release precompiled Windows binaries 17 | in sync with the Linux/Unix version. If donations are poor, support for windows 18 | will fall behind. 19 | 20 | You are free to donate any amount you chose. As a guideline: 21 | 22 | * If you are simply a user of libsndfile that would like to ensure that the 23 | development of libsndfile continues, a donation of $10US would be more than 24 | adequate. 25 | * If you are shareware author that distributes libsndfile with your app and 26 | makes more than $1000 a year from your shareware, a one off donation of $50 27 | would be appropriate. 28 | * If your company is a commercial software house that distributes one or more 29 | products that ship with libsndfile, a donation of $100 every second or third 30 | year would be appropriate. 31 | 32 | Donations can be made in Bitcoin to the Bitcoin address 33 | **15hVWemFiH6DLJ22SBYPk9b4fgWtxBEvfQ** which can be verified by checking the 34 | following GPG signature. 35 | 36 | -----BEGIN PGP SIGNED MESSAGE----- 37 | Hash: SHA256 38 | 39 | libsndfile Bitcoin address : 15hVWemFiH6DLJ22SBYPk9b4fgWtxBEvfQ 40 | -----BEGIN PGP SIGNATURE----- 41 | Version: GnuPG v1.4.12 (GNU/Linux) 42 | 43 | iQIcBAEBCAAGBQJSK7MUAAoJEEXYQ7zIiotIgXEP/R8hy65tlV7TiPw9bY9BklXS 44 | /Vl8FU2RhDkBt61ZmxbfDTybyQ5Vce/3wWph15L4RvpoX1OyeintQFmwwuPjOGiq 45 | eIz0nT9vDorG37Xdo5NZNBu9Tp1Od9MNtxFaAsRWFrDfvKEKljBHrcfM972cYrAp 46 | DaFd0Ik+bHKom9iQXFB7TFd0w2V4uszVMQDUGqb/vRNeRURZS7ypeMNwc8tZyTKR 47 | waEGMTa5sxxRjs7MqGRxSovnFT7JV3TNfdkBInUliIR/XvrudFR9J4Fiv+8Dk9P8 48 | WNjm6uFxvgIqiu1G9bjrwwr+DsBju93ljGNcZoayAKw5vwbX6KTcCbc31k9dP8Hf 49 | p6YdmPlZVKZmva+P3nLSJBTlxNu24Jm+ha+ZM/svDXTaPFWC8l5FP17kK0Bj8wCq 50 | N7pDz6RchEn10u+HdhfT1XiUjxj0zNXrr0GGj9apjl0RlT0O49eBttV0oXIdBRLi 51 | nTEaOWITpCgu7ggw1kWXHIWEncuiaSuJy/iH8PgNepWVj/6PxQRMrTqG4ux2Snk8 52 | Ua4vO8YHLMZX/XvSUS7eMtgfM7AO6YjJ/ac9bQif9bh6LsYEVVklysMUin6ZRS7Z 53 | Cms23FnqeQKtJOzdvqSJiV06lK6fP+tYdM4WSYn+AfL4IfYl2v48xXVU8XOOK9BH 54 | bJPKMDcz1ZvfYtX5mSW1 55 | =WXGB 56 | -----END PGP SIGNATURE----- 57 | 58 | Thanks and regards, 59 | Erik de Castro Lopo 60 | Main libsndfile author and maintainer 61 | -------------------------------------------------------------------------------- /source/external/libsndfile/Scripts/git-pre-commit-hook: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if git rev-parse --verify HEAD >/dev/null 2>&1 ; then 4 | against=HEAD 5 | else 6 | # Initial commit: diff against an empty tree object 7 | against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 8 | fi 9 | 10 | # Redirect output to stderr. 11 | exec 1>&2 12 | 13 | #------------------------------------------------------------------------------- 14 | # Prevent files with non-ascii filenames from being committed. 15 | 16 | if test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 ; then 17 | echo "Error: Attempt to add a non-ascii file name." 18 | echo 19 | echo "This can cause problems if you want to work" 20 | echo "with people on other platforms." 21 | echo 22 | echo "To be portable it is advisable to rename the file ..." 23 | echo 24 | echo "Commit aborted." 25 | exit 1 26 | fi 27 | 28 | #------------------------------------------------------------------------------- 29 | # Check the formatting of all C files. 30 | 31 | # http://man.openbsd.org/sed#r 32 | # http://man.openbsd.org/sed#E 33 | # http://netbsd.gw.com/cgi-bin/man-cgi?sed++NetBSD-current 34 | # https://github.com/freebsd/freebsd/blob/master/usr.bin/sed/main.c 35 | # http://git.savannah.gnu.org/gitweb/?p=sed.git;a=blob;f=sed/sed.c 36 | # GNU has -r and -E (undocumented); MacOS has -E but not -r; Sunos has neither. 37 | files=$(git diff-index --name-status --cached HEAD | grep -v ^D | sed -E "s/^[A-Z]+[A-Z0-9]*[ \t]+/ /") 38 | 39 | cfiles="" 40 | for f in $files ; do 41 | if test `dirname $f` = "src/ALAC" ; then 42 | echo "Skipping cstyle checking on $f" 43 | elif test `echo $f | grep -c "\.[ch]$"` -gt 0 ; then 44 | cfiles="$cfiles $f" 45 | fi 46 | done 47 | 48 | if test -n "$cfiles" ; then 49 | Scripts/cstyle.py $cfiles 50 | if test $? -ne 0 ; then 51 | echo 52 | echo "Commit aborted. Fix the above error before trying again." 53 | exit 1 54 | fi 55 | fi 56 | 57 | #------------------------------------------------------------------------------- 58 | # Check the copyright notice of all files to be commited. 59 | 60 | user=`git config --global user.email` 61 | year=`date +"%Y"` 62 | 63 | missing_copyright_year="" 64 | if test $user = "erikd@mega-nerd.com" ; then 65 | for f in $files ; do 66 | if test `head -5 $f | grep -i copyright | grep -c -i $user` -gt 0 ; then 67 | user_copyright=`grep -i copyright $f | grep $user | grep -c $year` 68 | if test $user_copyright -lt 1 ; then 69 | missing_copyright_year="$missing_copyright_year $f" 70 | fi 71 | fi 72 | done 73 | fi 74 | 75 | if test -n "$missing_copyright_year" ; then 76 | echo "Missing current year in the copyright notice of the following files:" 77 | for f in $missing_copyright_year ; do 78 | echo " $f" 79 | done 80 | echo "Commit aborted." 81 | exit 1 82 | fi 83 | 84 | exit 0 85 | -------------------------------------------------------------------------------- /source/external/libsndfile/src/GSM610/preprocess.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische 3 | * Universitaet Berlin. See the accompanying file "COPYRIGHT" for 4 | * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | #include "gsm610_priv.h" 11 | 12 | /* 4.2.0 .. 4.2.3 PREPROCESSING SECTION 13 | * 14 | * After A-law to linear conversion (or directly from the 15 | * Ato D converter) the following scaling is assumed for 16 | * input to the RPE-LTP algorithm: 17 | * 18 | * in: 0.1.....................12 19 | * S.v.v.v.v.v.v.v.v.v.v.v.v.*.*.* 20 | * 21 | * Where S is the sign bit, v a valid bit, and * a "don't care" bit. 22 | * The original signal is called sop[..] 23 | * 24 | * out: 0.1................... 12 25 | * S.S.v.v.v.v.v.v.v.v.v.v.v.v.0.0 26 | */ 27 | 28 | 29 | void Gsm_Preprocess ( 30 | struct gsm_state * S, 31 | int16_t * s, 32 | int16_t * so) /* [0..159] IN/OUT */ 33 | { 34 | 35 | int16_t z1 = S->z1 ; 36 | int32_t L_z2 = S->L_z2 ; 37 | int16_t mp = S->mp ; 38 | 39 | int16_t s1 ; 40 | int32_t L_s2 ; 41 | 42 | int32_t L_temp ; 43 | 44 | int16_t msp, lsp ; 45 | int16_t SO ; 46 | 47 | register int k = 160 ; 48 | 49 | while (k--) 50 | { 51 | 52 | /* 4.2.1 Downscaling of the input signal */ 53 | SO = arith_shift_left (SASR_W (*s, 3), 2) ; 54 | s++ ; 55 | 56 | assert (SO >= -0x4000) ; /* downscaled by */ 57 | assert (SO <= 0x3FFC) ; /* previous routine. */ 58 | 59 | 60 | /* 4.2.2 Offset compensation 61 | * 62 | * This part implements a high-pass filter and requires extended 63 | * arithmetic precision for the recursive part of this filter. 64 | * The input of this procedure is the array so[0...159] and the 65 | * output the array sof[ 0...159 ]. 66 | */ 67 | 68 | /* Compute the non-recursive part */ 69 | 70 | s1 = SO - z1 ; /* s1 = gsm_sub (*so, z1) ; */ 71 | z1 = SO ; 72 | 73 | assert (s1 != MIN_WORD) ; 74 | 75 | /* Compute the recursive part */ 76 | L_s2 = s1 ; 77 | L_s2 = arith_shift_left (L_s2, 15) ; 78 | 79 | /* Execution of a 31 bv 16 bits multiplication */ 80 | 81 | msp = SASR_L (L_z2, 15) ; 82 | lsp = L_z2 - arith_shift_left ((int32_t) msp, 15) ; /* gsm_L_sub (L_z2,(msp<<15)) ; */ 83 | 84 | L_s2 += GSM_MULT_R (lsp, 32735) ; 85 | L_temp = (int32_t) msp * 32735 ; /* GSM_L_MULT (msp,32735) >> 1 ;*/ 86 | L_z2 = GSM_L_ADD (L_temp, L_s2) ; 87 | 88 | /* Compute sof[k] with rounding */ 89 | L_temp = GSM_L_ADD (L_z2, 16384) ; 90 | 91 | /* 4.2.3 Preemphasis */ 92 | 93 | msp = GSM_MULT_R (mp, -28180) ; 94 | mp = SASR_L (L_temp, 15) ; 95 | *so++ = GSM_ADD (mp, msp) ; 96 | } 97 | 98 | S->z1 = z1 ; 99 | S->L_z2 = L_z2 ; 100 | S->mp = mp ; 101 | } 102 | -------------------------------------------------------------------------------- /source/external/libsndfile/examples/list_formats.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (C) 2001-2014 Erik de Castro Lopo 3 | ** 4 | ** All rights reserved. 5 | ** 6 | ** Redistribution and use in source and binary forms, with or without 7 | ** modification, are permitted provided that the following conditions are 8 | ** met: 9 | ** 10 | ** * Redistributions of source code must retain the above copyright 11 | ** notice, this list of conditions and the following disclaimer. 12 | ** * Redistributions in binary form must reproduce the above copyright 13 | ** notice, this list of conditions and the following disclaimer in 14 | ** the documentation and/or other materials provided with the 15 | ** distribution. 16 | ** * Neither the author nor the names of any contributors may be used 17 | ** to endorse or promote products derived from this software without 18 | ** specific prior written permission. 19 | ** 20 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | ** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 | ** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 24 | ** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | ** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | ** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 27 | ** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | ** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 29 | ** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 30 | ** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include 39 | 40 | int 41 | main (void) 42 | { SF_FORMAT_INFO info ; 43 | SF_INFO sfinfo ; 44 | int format, major_count, subtype_count, m, s ; 45 | 46 | memset (&sfinfo, 0, sizeof (sfinfo)) ; 47 | printf ("Version : %s\n\n", sf_version_string ()) ; 48 | 49 | sf_command (NULL, SFC_GET_FORMAT_MAJOR_COUNT, &major_count, sizeof (int)) ; 50 | sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &subtype_count, sizeof (int)) ; 51 | 52 | sfinfo.channels = 1 ; 53 | for (m = 0 ; m < major_count ; m++) 54 | { info.format = m ; 55 | sf_command (NULL, SFC_GET_FORMAT_MAJOR, &info, sizeof (info)) ; 56 | printf ("%s (extension \"%s\")\n", info.name, info.extension) ; 57 | 58 | format = info.format ; 59 | 60 | for (s = 0 ; s < subtype_count ; s++) 61 | { info.format = s ; 62 | sf_command (NULL, SFC_GET_FORMAT_SUBTYPE, &info, sizeof (info)) ; 63 | 64 | format = (format & SF_FORMAT_TYPEMASK) | info.format ; 65 | 66 | sfinfo.format = format ; 67 | if (sf_format_check (&sfinfo)) 68 | printf (" %s\n", info.name) ; 69 | } ; 70 | puts ("") ; 71 | } ; 72 | puts ("") ; 73 | 74 | return 0 ; 75 | } /* main */ 76 | 77 | --------------------------------------------------------------------------------