Merge pull request #104 from sfztools/doxygen-fix
CI stages and updates
This commit is contained in:
commit
64edd8dd2d
34 changed files with 320 additions and 165 deletions
37
.clang-tidy
Normal file
37
.clang-tidy
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
Checks: 'clang-diagnostic-*,clang-analyzer-*,abseil-*,bugprone-*,performance-*,-abseil-no-internal-dependencies'
|
||||||
|
WarningsAsErrors: 'clang-diagnostic-*,clang-analyzer-*,abseil-*,bugprone-*,performance-*'
|
||||||
|
HeaderFilterRegex: ''
|
||||||
|
AnalyzeTemporaryDtors: false
|
||||||
|
FormatStyle: file
|
||||||
|
User: paul
|
||||||
|
CheckOptions:
|
||||||
|
- key: cert-dcl16-c.NewSuffixes
|
||||||
|
value: 'L;LL;LU;LLU'
|
||||||
|
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
|
||||||
|
value: '0'
|
||||||
|
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
|
||||||
|
value: '1'
|
||||||
|
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
||||||
|
value: '1'
|
||||||
|
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||||
|
value: '1'
|
||||||
|
- key: google-readability-function-size.StatementThreshold
|
||||||
|
value: '800'
|
||||||
|
- key: google-readability-namespace-comments.ShortNamespaceLines
|
||||||
|
value: '10'
|
||||||
|
- key: google-readability-namespace-comments.SpacesBeforeComments
|
||||||
|
value: '2'
|
||||||
|
- key: modernize-loop-convert.MaxCopySize
|
||||||
|
value: '16'
|
||||||
|
- key: modernize-loop-convert.MinConfidence
|
||||||
|
value: reasonable
|
||||||
|
- key: modernize-loop-convert.NamingStyle
|
||||||
|
value: CamelCase
|
||||||
|
- key: modernize-pass-by-value.IncludeStyle
|
||||||
|
value: llvm
|
||||||
|
- key: modernize-replace-auto-ptr.IncludeStyle
|
||||||
|
value: llvm
|
||||||
|
- key: modernize-use-nullptr.NullMacros
|
||||||
|
value: 'NULL'
|
||||||
|
...
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -13,7 +13,7 @@ compile_commands.json
|
||||||
*.a
|
*.a
|
||||||
*.txt.user
|
*.txt.user
|
||||||
*.autosave
|
*.autosave
|
||||||
|
/Doxyfile
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
clients/sfizz_jack
|
clients/sfizz_jack
|
||||||
|
|
|
||||||
165
.travis.yml
165
.travis.yml
|
|
@ -1,110 +1,161 @@
|
||||||
language: cpp
|
language: cpp
|
||||||
|
os: linux
|
||||||
|
dist: bionic
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- name: "clang-tidy checks"
|
||||||
|
stage: "Tests"
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- clang-tidy
|
||||||
|
- libsndfile-dev
|
||||||
|
install: skip
|
||||||
|
script: scripts/run_clang_tidy.sh
|
||||||
|
|
||||||
|
- name: "Linux amd64 tests"
|
||||||
|
arch: amd64
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libasound2-dev
|
||||||
|
- libjack-jackd2-dev
|
||||||
|
- libsndfile1-dev
|
||||||
|
install: .travis/download_cmake.sh
|
||||||
|
script: .travis/script_test.sh
|
||||||
|
|
||||||
|
- name: "Linux arm64 tests"
|
||||||
|
arch: amd64
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libasound2-dev
|
||||||
|
- libjack-jackd2-dev
|
||||||
|
- libsndfile1-dev
|
||||||
|
install: .travis/download_cmake.sh
|
||||||
|
script: .travis/script_test.sh
|
||||||
|
|
||||||
|
- name: "Windows mingw32"
|
||||||
|
stage: "Build"
|
||||||
env:
|
env:
|
||||||
- CROSS_COMPILE=mingw32
|
- CROSS_COMPILE=mingw32
|
||||||
- CONTAINER=cross
|
- CONTAINER=cross
|
||||||
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-mingw32"
|
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-mingw32"
|
||||||
|
before_install: .travis/before_install_mingw.sh
|
||||||
|
install: .travis/install_mingw.sh
|
||||||
|
script: .travis/script_mingw.sh
|
||||||
|
after_success: .travis/prepare_tarball.sh
|
||||||
|
|
||||||
- os: linux
|
- name: "Windows mingw64"
|
||||||
env:
|
env:
|
||||||
- CROSS_COMPILE=mingw64
|
- CROSS_COMPILE=mingw64
|
||||||
- CONTAINER=cross
|
- CONTAINER=cross
|
||||||
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-mingw64"
|
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-mingw64"
|
||||||
|
before_install: .travis/before_install_mingw.sh
|
||||||
|
install: .travis/install_mingw.sh
|
||||||
|
script: .travis/script_mingw.sh
|
||||||
|
after_success: .travis/prepare_tarball.sh
|
||||||
|
|
||||||
- os: linux
|
- name: "Linux amd64 library"
|
||||||
arch: amd64
|
arch: amd64
|
||||||
dist: bionic
|
|
||||||
env:
|
env:
|
||||||
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
|
||||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
- doxygen
|
- libasound2-dev
|
||||||
|
- libjack-jackd2-dev
|
||||||
|
- libsndfile1-dev
|
||||||
|
install: .travis/download_cmake.sh
|
||||||
|
script: .travis/script_library.sh
|
||||||
|
after_success: .travis/prepare_tarball.sh
|
||||||
|
|
||||||
- os: linux
|
- name: "Linux arm64 library"
|
||||||
arch: arm64
|
arch: arm64
|
||||||
dist: bionic
|
|
||||||
env:
|
env:
|
||||||
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
packages:
|
||||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
- libasound2-dev
|
||||||
|
- libjack-jackd2-dev
|
||||||
|
- libsndfile1-dev
|
||||||
|
install: .travis/download_cmake.sh
|
||||||
|
script: .travis/script_library.sh
|
||||||
|
after_success: .travis/prepare_tarball.sh
|
||||||
|
|
||||||
- os: linux
|
- name: "Linux arm64 static LV2"
|
||||||
arch: arm64
|
arch: arm64
|
||||||
dist: bionic
|
|
||||||
env:
|
env:
|
||||||
- BUILD_TYPE=lv2
|
- INSTALL_DIR="sfizz-lv2-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
||||||
- INSTALL_DIR="sfizz-lv2-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
packages:
|
||||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
- libasound2-dev
|
||||||
|
- libjack-jackd2-dev
|
||||||
|
- libsndfile1-dev
|
||||||
|
install:
|
||||||
|
- .travis/download_cmake.sh
|
||||||
|
- .travis/download_static_libs.sh
|
||||||
|
script: .travis/script_lv2.sh
|
||||||
|
after_success: .travis/prepare_tarball.sh
|
||||||
|
|
||||||
- os: linux
|
- name: "Linux amd64 static LV2"
|
||||||
arch: amd64
|
|
||||||
dist: bionic
|
|
||||||
env:
|
env:
|
||||||
- BUILD_TYPE=lv2
|
- INSTALL_DIR="sfizz-lv2-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
||||||
- INSTALL_DIR="sfizz-lv2-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
packages:
|
||||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
- libasound2-dev
|
||||||
|
- libjack-jackd2-dev
|
||||||
|
- libsndfile1-dev
|
||||||
|
install:
|
||||||
|
- .travis/download_cmake.sh
|
||||||
|
- .travis/download_static_libs.sh
|
||||||
|
script: .travis/script_lv2.sh
|
||||||
|
after_success: .travis/prepare_tarball.sh
|
||||||
|
|
||||||
- os: osx
|
- name: "macOS"
|
||||||
|
os: osx
|
||||||
osx_image: xcode10.1
|
osx_image: xcode10.1
|
||||||
env:
|
env:
|
||||||
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
||||||
|
install: .travis/install_osx.sh
|
||||||
|
script: .travis/script_osx.sh
|
||||||
|
after_success: .travis/prepare_tarball.sh
|
||||||
|
|
||||||
- os: linux
|
- stage: "Deploy"
|
||||||
|
name: "Source packaging"
|
||||||
|
if: (tag IS present) AND (branch = master)
|
||||||
env:
|
env:
|
||||||
- BUILD_TYPE=source
|
|
||||||
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-src"
|
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-src"
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- python-pip
|
- python-pip
|
||||||
|
install: sudo pip install git-archive-all
|
||||||
|
script: git-archive-all --prefix="sfizz-${TRAVIS_BRANCH}/" -9 "${INSTALL_DIR}.tar.gz"
|
||||||
|
|
||||||
before_install:
|
- name: "Generate documentation"
|
||||||
- true
|
if: (tag IS present) AND (branch = master)
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- doxygen
|
||||||
|
- cmake
|
||||||
|
- libsndfile-dev
|
||||||
|
install: skip
|
||||||
|
script: .travis/update_dox.sh
|
||||||
|
|
||||||
install:
|
- name: "Discord Webhook"
|
||||||
- sudo pip install git-archive-all
|
install: skip
|
||||||
|
script: bash ${TRAVIS_BUILD_DIR}/.travis/discord_webhook.sh success
|
||||||
script:
|
|
||||||
- git-archive-all --prefix="sfizz-${TRAVIS_BRANCH}/" -9 "${INSTALL_DIR}.tar.gz"
|
|
||||||
|
|
||||||
after_failure:
|
|
||||||
- true
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- true
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- bash ${TRAVIS_BUILD_DIR}/.travis/before_install.sh
|
|
||||||
|
|
||||||
install:
|
|
||||||
- bash ${TRAVIS_BUILD_DIR}/.travis/install.sh
|
|
||||||
|
|
||||||
script:
|
|
||||||
- bash ${TRAVIS_BUILD_DIR}/.travis/script.sh
|
|
||||||
|
|
||||||
|
# Signal discord on failure
|
||||||
after_failure:
|
after_failure:
|
||||||
- bash ${TRAVIS_BUILD_DIR}/.travis/discord_webhook.sh failure
|
- bash ${TRAVIS_BUILD_DIR}/.travis/discord_webhook.sh failure
|
||||||
|
|
||||||
after_success:
|
|
||||||
- bash ${TRAVIS_BUILD_DIR}/.travis/discord_webhook.sh success
|
|
||||||
- bash ${TRAVIS_BUILD_DIR}/.travis/update_dox.sh
|
|
||||||
- bash ${TRAVIS_BUILD_DIR}/.travis/after_success.sh
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
|
|
|
||||||
17
.travis/before_install_mingw.sh
Executable file
17
.travis/before_install_mingw.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
. .travis/mingw_container.sh
|
||||||
|
|
||||||
|
buildenv bash -c "echo Hello from container" # ensure to start the container
|
||||||
|
docker cp "$container":/etc/pacman.conf pacman.conf
|
||||||
|
cat >>pacman.conf <<EOF
|
||||||
|
[multilib]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[mingw-w64]
|
||||||
|
SigLevel = Optional TrustAll
|
||||||
|
Server = https://github.com/jpcima/arch-mingw-w64/releases/download/repo.\$arch/
|
||||||
|
EOF
|
||||||
|
docker cp pacman.conf "$container":/etc/pacman.conf
|
||||||
|
rm -f pacman.conf
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
. .travis/environment.sh
|
|
||||||
|
|
||||||
# Travis Webhook
|
# Travis Webhook
|
||||||
wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
|
wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
|
||||||
|
|
|
||||||
13
.travis/download_cmake.sh
Executable file
13
.travis/download_cmake.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
cmake_dir="cmake-3.13.0-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
|
||||||
|
cmake_arc="${cmake_dir}.tar.gz"
|
||||||
|
cmake_url="https://github.com/sfztools/cmake/releases/download/${TRAVIS_OS_NAME}/${cmake_arc}"
|
||||||
|
|
||||||
|
wget -q ${cmake_url}
|
||||||
|
tar xzf ${cmake_arc}
|
||||||
|
cd ${TRAVIS_BUILD_DIR}/${cmake_dir}
|
||||||
|
sudo cp bin/* /usr/local/bin/
|
||||||
|
sudo cp -r share/* /usr/local/share/
|
||||||
6
.travis/download_static_libs.sh
Executable file
6
.travis/download_static_libs.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
wget -q https://github.com/sfztools/sndfile-libraries/releases/download/${TRAVIS_OS_NAME}/sndfile-libraries-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}.tar.gz
|
||||||
|
tar xf sndfile-libraries-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}.tar.gz
|
||||||
|
sudo cp -R sndfile-libraries-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}/usr /
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
# ---------------------------------------------------------------------------- #
|
|
||||||
# Global environment included from all scripts #
|
|
||||||
# ---------------------------------------------------------------------------- #
|
|
||||||
|
|
||||||
# add /usr/local/bin to path, for custom cmake installs
|
|
||||||
if [[ ${TRAVIS_OS_NAME} == "linux" || ${TRAVIS_OS_NAME} == "osx" ]]; then
|
|
||||||
export PATH="/usr/local/bin:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# buildenv runs a command in host machine or container, depending on build
|
|
||||||
if [[ ${CROSS_COMPILE} == "mingw32" || ${CROSS_COMPILE} == "mingw64" ]]; then
|
|
||||||
buildenv() {
|
|
||||||
setup_container archlinux
|
|
||||||
docker exec -w "$(pwd)" -i -t "$container" "$@"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
buildenv() {
|
|
||||||
"$@"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# create a container based on given image if not existing
|
|
||||||
# the container id is persisted in a file across different scripts
|
|
||||||
setup_container() {
|
|
||||||
if [ -f ${TRAVIS_BUILD_DIR}/docker-container-id ]; then
|
|
||||||
container=$(cat ${TRAVIS_BUILD_DIR}/docker-container-id)
|
|
||||||
else
|
|
||||||
container=$(docker run -d -i -t -v /home:/home "$1" /bin/bash)
|
|
||||||
echo "$container" > ${TRAVIS_BUILD_DIR}/docker-container-id
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
. .travis/environment.sh
|
|
||||||
|
|
||||||
if [[ ${CROSS_COMPILE} == "mingw32" || ${CROSS_COMPILE} == "mingw64" ]]; then
|
|
||||||
buildenv pacman -Sqy --noconfirm
|
|
||||||
buildenv pacman -Sq --noconfirm base-devel wget mingw-w64-cmake mingw-w64-gcc mingw-w64-pkg-config mingw-w64-libsndfile
|
|
||||||
buildenv i686-w64-mingw32-gcc -v && buildenv i686-w64-mingw32-g++ -v && buildenv i686-w64-mingw32-cmake --version
|
|
||||||
elif [[ ${BUILD_TYPE} == "lv2" ]]; then
|
|
||||||
wget -q https://github.com/sfztools/sndfile-libraries/releases/download/${TRAVIS_OS_NAME}/sndfile-libraries-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}.tar.gz
|
|
||||||
tar xf sndfile-libraries-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}.tar.gz
|
|
||||||
sudo cp -R sndfile-libraries-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}/usr /
|
|
||||||
elif [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
|
||||||
sudo apt-get install libasound2-dev libjack-jackd2-dev libsndfile1-dev
|
|
||||||
gcc -v && g++ -v && cmake --version && /usr/local/bin/cmake --version && $SHELL --version
|
|
||||||
fi
|
|
||||||
8
.travis/install_mingw.sh
Executable file
8
.travis/install_mingw.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
. .travis/mingw_container.sh
|
||||||
|
|
||||||
|
buildenv pacman -Sqy --noconfirm
|
||||||
|
buildenv pacman -Sq --noconfirm base-devel wget mingw-w64-cmake mingw-w64-gcc mingw-w64-pkg-config mingw-w64-libsndfile
|
||||||
|
buildenv i686-w64-mingw32-gcc -v && buildenv i686-w64-mingw32-g++ -v && buildenv i686-w64-mingw32-cmake --version
|
||||||
8
.travis/install_osx.sh
Executable file
8
.travis/install_osx.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
sudo ln -s /usr/local /opt/local
|
||||||
|
brew update
|
||||||
|
brew upgrade cmake
|
||||||
|
brew install jack
|
||||||
15
.travis/mingw_container.sh
Executable file
15
.travis/mingw_container.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
buildenv() {
|
||||||
|
setup_container archlinux
|
||||||
|
docker exec -w "$(pwd)" -i -t "$container" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_container() {
|
||||||
|
if [ -f ${TRAVIS_BUILD_DIR}/docker-container-id ]; then
|
||||||
|
container=$(cat ${TRAVIS_BUILD_DIR}/docker-container-id)
|
||||||
|
else
|
||||||
|
container=$(docker run -d -i -t -v /home:/home "$1" /bin/bash)
|
||||||
|
echo "$container" > ${TRAVIS_BUILD_DIR}/docker-container-id
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
. .travis/environment.sh
|
. .travis/mingw_container.sh
|
||||||
|
|
||||||
|
# Do not prepare a tarball without a tag
|
||||||
|
if [[ ${TRAVIS_TAG} == "" ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
buildenv make DESTDIR=${PWD}/${INSTALL_DIR} install
|
buildenv make DESTDIR=${PWD}/${INSTALL_DIR} install
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
. .travis/environment.sh
|
|
||||||
|
|
||||||
mkdir -p build/${INSTALL_DIR} && cd build
|
|
||||||
|
|
||||||
if [[ ${CROSS_COMPILE} == "mingw32" ]]; then
|
|
||||||
|
|
||||||
buildenv i686-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_STATIC_LIBSNDFILE=ON ..
|
|
||||||
buildenv make -j
|
|
||||||
elif [[ ${CROSS_COMPILE} == "mingw64" ]]; then
|
|
||||||
|
|
||||||
buildenv x86_64-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_STATIC_LIBSNDFILE=ON ..
|
|
||||||
buildenv make -j
|
|
||||||
elif [[ ${BUILD_TYPE} == "lv2" ]]; then
|
|
||||||
|
|
||||||
buildenv cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_TESTS=OFF -DSFIZZ_SHARED=OFF -DSFIZZ_STATIC_LIBSNDFILE=ON ..
|
|
||||||
buildenv make -j
|
|
||||||
elif [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
|
||||||
|
|
||||||
buildenv cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_LV2=OFF -DSFIZZ_TESTS=OFF ..
|
|
||||||
buildenv make -j$(nproc)
|
|
||||||
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
|
|
||||||
|
|
||||||
buildenv cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_TESTS=OFF ..
|
|
||||||
buildenv make -j$(sysctl -n hw.ncpu)
|
|
||||||
|
|
||||||
# Xcode not currently supported, see https://gitlab.kitware.com/cmake/cmake/issues/18088
|
|
||||||
# xcodebuild -project sfizz.xcodeproj -alltargets -configuration Debug build
|
|
||||||
fi
|
|
||||||
6
.travis/script_library.sh
Executable file
6
.travis/script_library.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
mkdir -p build/${INSTALL_DIR} && cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release -DSFIZZ_LV2=OFF -DSFIZZ_TESTS=OFF ..
|
||||||
|
make -j$(nproc)
|
||||||
6
.travis/script_lv2.sh
Executable file
6
.travis/script_lv2.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
mkdir -p build/${INSTALL_DIR} && cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_TESTS=OFF -DSFIZZ_SHARED=OFF -DSFIZZ_STATIC_LIBSNDFILE=ON ..
|
||||||
|
make -j$(nproc)
|
||||||
13
.travis/script_mingw.sh
Executable file
13
.travis/script_mingw.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
. .travis/mingw_container.sh
|
||||||
|
|
||||||
|
mkdir -p build/${INSTALL_DIR} && cd build
|
||||||
|
if [[ ${CROSS_COMPILE} == "mingw32" ]]; then
|
||||||
|
buildenv i686-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_STATIC_LIBSNDFILE=ON ..
|
||||||
|
buildenv make -j
|
||||||
|
elif [[ ${CROSS_COMPILE} == "mingw64" ]]; then
|
||||||
|
buildenv x86_64-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_STATIC_LIBSNDFILE=ON ..
|
||||||
|
buildenv make -j
|
||||||
|
fi
|
||||||
8
.travis/script_osx.sh
Executable file
8
.travis/script_osx.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
mkdir -p build/${INSTALL_DIR} && cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_TESTS=OFF ..
|
||||||
|
make -j$(sysctl -n hw.ncpu)
|
||||||
|
# Xcode not currently supported, see https://gitlab.kitware.com/cmake/cmake/issues/18088
|
||||||
|
# xcodebuild -project sfizz.xcodeproj -alltargets -configuration Debug build
|
||||||
7
.travis/script_test.sh
Executable file
7
.travis/script_test.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release -DSFIZZ_JACK=OFF -DSFIZZ_TESTS=ON -DSFIZZ_SHARED=OFF -DSFIZZ_STATIC_LIBSNDFILE=OFF -DSFIZZ_LV2=OFF ..
|
||||||
|
make -j$(nproc) sfizz_tests
|
||||||
|
tests/sfizz_tests
|
||||||
|
|
@ -3,11 +3,7 @@
|
||||||
set -x # No fail, we need to go back to the original branch at the end
|
set -x # No fail, we need to go back to the original branch at the end
|
||||||
. .travis/environment.sh
|
. .travis/environment.sh
|
||||||
|
|
||||||
# Build documentation only from Linux x86_64 builds
|
mkdir build && cd build && cmake -DSFIZZ_JACK=OFF -DSFIZZ_SHARED=OFF -DSFIZZ_LV2=OFF .. && cd ..
|
||||||
if [[ ${TRAVIS_CPU_ARCH} != "amd64" || ${TRAVIS_OS_NAME} != "linux" || "${CROSS_COMPILE}" != "" || ${TRAVIS_TAG} == "" ]]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
doxygen Doxyfile
|
doxygen Doxyfile
|
||||||
git fetch --depth=1 https://github.com/${TRAVIS_REPO_SLUG}.git refs/heads/gh-pages:refs/remotes/origin/gh-pages
|
git fetch --depth=1 https://github.com/${TRAVIS_REPO_SLUG}.git refs/heads/gh-pages:refs/remotes/origin/gh-pages
|
||||||
git checkout origin/gh-pages
|
git checkout origin/gh-pages
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ PROJECT_NAME = sfizz
|
||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 0.1.0
|
PROJECT_NUMBER = @PROJECT_VERSION@
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
12
doxygen/scripts/generate_api_index.sh
Executable file
12
doxygen/scripts/generate_api_index.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Must be called from the root directory
|
||||||
|
cat >>index.md <<EOF
|
||||||
|
---
|
||||||
|
title: "API"
|
||||||
|
---
|
||||||
|
EOF
|
||||||
|
for tag in $(git tag --list); do
|
||||||
|
if [[ ${tag} != "list" && ${tag} != *"test"* ]]; then
|
||||||
|
echo "- [${tag}](${tag})" >> index.md
|
||||||
|
fi
|
||||||
|
done
|
||||||
24
scripts/run_clang_tidy.sh
Executable file
24
scripts/run_clang_tidy.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
clang-tidy \
|
||||||
|
src/sfizz/ADSREnvelope.cpp \
|
||||||
|
src/sfizz/Effects.cpp \
|
||||||
|
src/sfizz/EQPool.cpp \
|
||||||
|
src/sfizz/EventEnvelopes.cpp \
|
||||||
|
src/sfizz/FilePool.cpp \
|
||||||
|
src/sfizz/FilterPool.cpp \
|
||||||
|
src/sfizz/FloatEnvelopes.cpp \
|
||||||
|
src/sfizz/Logger.cpp \
|
||||||
|
src/sfizz/MidiState.cpp \
|
||||||
|
src/sfizz/Opcode.cpp \
|
||||||
|
src/sfizz/Oversampler.cpp \
|
||||||
|
src/sfizz/Parser.cpp \
|
||||||
|
src/sfizz/sfizz.cpp \
|
||||||
|
src/sfizz/Region.cpp \
|
||||||
|
src/sfizz/SfzHelpers.cpp \
|
||||||
|
src/sfizz/SIMDSSE.cpp \
|
||||||
|
src/sfizz/Synth.cpp \
|
||||||
|
src/sfizz/Voice.cpp \
|
||||||
|
src/sfizz/effects/Lofi.cpp \
|
||||||
|
src/sfizz/effects/Nothing.cpp \
|
||||||
|
-- -Iexternal/abseil-cpp -Isrc/external -Isrc/external/pugixml/src -Isrc/sfizz -Isrc
|
||||||
|
|
@ -52,6 +52,8 @@ if(WIN32)
|
||||||
configure_file (${PROJECT_SOURCE_DIR}/scripts/innosetup.iss.in ${PROJECT_BINARY_DIR}/innosetup.iss @ONLY)
|
configure_file (${PROJECT_SOURCE_DIR}/scripts/innosetup.iss.in ${PROJECT_BINARY_DIR}/innosetup.iss @ONLY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
configure_file (${PROJECT_SOURCE_DIR}/doxygen/scripts/Doxyfile.in ${PROJECT_SOURCE_DIR}/Doxyfile @ONLY)
|
||||||
|
|
||||||
add_library (sfizz::parser ALIAS sfizz_parser)
|
add_library (sfizz::parser ALIAS sfizz_parser)
|
||||||
add_library (sfizz::sfizz ALIAS sfizz_static)
|
add_library (sfizz::sfizz ALIAS sfizz_static)
|
||||||
if (LIBATOMIC_FOUND)
|
if (LIBATOMIC_FOUND)
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,8 @@ void ADSREnvelope<Type>::getBlock(absl::Span<Type> output) noexcept
|
||||||
|
|
||||||
if (shouldRelease) {
|
if (shouldRelease) {
|
||||||
remainingSamples = static_cast<int>(originalSpan.size());
|
remainingSamples = static_cast<int>(originalSpan.size());
|
||||||
if (releaseDelay > remainingSamples) {
|
if (releaseDelay > remainingSamples)
|
||||||
|
{
|
||||||
releaseDelay -= remainingSamples;
|
releaseDelay -= remainingSamples;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ namespace Default
|
||||||
constexpr Range<float> rtDecayRange { 0.0f, 200.0f };
|
constexpr Range<float> rtDecayRange { 0.0f, 200.0f };
|
||||||
|
|
||||||
// Performance parameters: Filters
|
// Performance parameters: Filters
|
||||||
constexpr float numFilters { 2 };
|
constexpr int numFilters { 2 };
|
||||||
constexpr float filterCutoff { 0 };
|
constexpr float filterCutoff { 0 };
|
||||||
constexpr float filterResonance { 0 };
|
constexpr float filterResonance { 0 };
|
||||||
constexpr float filterGain { 0 };
|
constexpr float filterGain { 0 };
|
||||||
|
|
@ -147,7 +147,7 @@ namespace Default
|
||||||
constexpr Range<float> filterResonanceModRange { 0.0f, 96.0f };
|
constexpr Range<float> filterResonanceModRange { 0.0f, 96.0f };
|
||||||
|
|
||||||
// Performance parameters: EQ
|
// Performance parameters: EQ
|
||||||
constexpr float numEQs { 3 };
|
constexpr int numEQs { 3 };
|
||||||
constexpr float eqBandwidth { 1.0f };
|
constexpr float eqBandwidth { 1.0f };
|
||||||
constexpr float eqBandwidthCC { 0.0f };
|
constexpr float eqBandwidthCC { 0.0f };
|
||||||
constexpr float eqFrequencyUnset { 0.0f };
|
constexpr float eqFrequencyUnset { 0.0f };
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ bool sfz::FilePool::preloadFile(const std::string& filename, uint32_t maxOffset)
|
||||||
} else {
|
} else {
|
||||||
preloadedFiles.insert_or_assign(filename, {
|
preloadedFiles.insert_or_assign(filename, {
|
||||||
readFromFile<float>(sndFile, framesToLoad, oversamplingFactor),
|
readFromFile<float>(sndFile, framesToLoad, oversamplingFactor),
|
||||||
static_cast<float>(oversamplingFactor) * sndFile.samplerate()
|
static_cast<float>(oversamplingFactor) * static_cast<float>(sndFile.samplerate())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ void sfz::FilterHolder::setup(const FilterDescription& description, unsigned num
|
||||||
}
|
}
|
||||||
const auto keytrack = description.keytrack * (noteNumber - description.keycenter);
|
const auto keytrack = description.keytrack * (noteNumber - description.keycenter);
|
||||||
baseCutoff *= centsFactor(keytrack);
|
baseCutoff *= centsFactor(keytrack);
|
||||||
const auto veltrack = description.veltrack * normalizeVelocity(velocity);
|
const auto veltrack = static_cast<float>(description.veltrack) * normalizeVelocity(velocity);
|
||||||
baseCutoff *= centsFactor(veltrack);
|
baseCutoff *= centsFactor(veltrack);
|
||||||
baseCutoff = Default::filterCutoffRange.clamp(baseCutoff);
|
baseCutoff = Default::filterCutoffRange.clamp(baseCutoff);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,12 +98,12 @@ sfz::Logger::~Logger()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void sfz::Logger::logCallbackTime(CallbackBreakdown&& breakdown, int numVoices, size_t numSamples)
|
void sfz::Logger::logCallbackTime(const CallbackBreakdown& breakdown, int numVoices, size_t numSamples)
|
||||||
{
|
{
|
||||||
if (!loggingEnabled)
|
if (!loggingEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
callbackTimeQueue.try_push<CallbackTime>({ std::move(breakdown), numVoices, numSamples });
|
callbackTimeQueue.try_push<CallbackTime>({ breakdown, numVoices, numSamples });
|
||||||
}
|
}
|
||||||
|
|
||||||
void sfz::Logger::logFileTime(std::chrono::duration<double> waitDuration, std::chrono::duration<double> loadDuration, uint32_t fileSize, absl::string_view filename)
|
void sfz::Logger::logFileTime(std::chrono::duration<double> waitDuration, std::chrono::duration<double> loadDuration, uint32_t fileSize, absl::string_view filename)
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ public:
|
||||||
* @param numVoices The number of active voices
|
* @param numVoices The number of active voices
|
||||||
* @param numSamples The number of samples in the callback
|
* @param numSamples The number of samples in the callback
|
||||||
*/
|
*/
|
||||||
void logCallbackTime(CallbackBreakdown&& breakdown, int numVoices, size_t numSamples);
|
void logCallbackTime(const CallbackBreakdown& breakdown, int numVoices, size_t numSamples);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Log a file loading and waiting duration
|
* @brief Log a file loading and waiting duration
|
||||||
|
|
|
||||||
|
|
@ -250,7 +250,7 @@ bool sfz::Region::parseOpcode(const Opcode& opcode)
|
||||||
case hash("volume"):
|
case hash("volume"):
|
||||||
setValueFromOpcode(opcode, volume, Default::volumeRange);
|
setValueFromOpcode(opcode, volume, Default::volumeRange);
|
||||||
break;
|
break;
|
||||||
case hash("gain_cc&"): [[fallthrough]];
|
case hash("gain_cc&"):
|
||||||
case hash("gain_oncc&"): [[fallthrough]];
|
case hash("gain_oncc&"): [[fallthrough]];
|
||||||
case hash("volume_oncc&"):
|
case hash("volume_oncc&"):
|
||||||
setCCPairFromOpcode(opcode, volumeCC, Default::volumeCCRange);
|
setCCPairFromOpcode(opcode, volumeCC, Default::volumeCCRange);
|
||||||
|
|
@ -395,8 +395,8 @@ bool sfz::Region::parseOpcode(const Opcode& opcode)
|
||||||
setValueFromOpcode(opcode, filters[filterIndex].resonance, Default::filterResonanceRange);
|
setValueFromOpcode(opcode, filters[filterIndex].resonance, Default::filterResonanceRange);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case hash("cutoff_oncc&"): [[fallthrough]];
|
case hash("cutoff_oncc&"):
|
||||||
case hash("cutoff_cc&"): [[fallthrough]];
|
case hash("cutoff_cc&"):
|
||||||
case hash("cutoff&_oncc&"): [[fallthrough]];
|
case hash("cutoff&_oncc&"): [[fallthrough]];
|
||||||
case hash("cutoff&_cc&"):
|
case hash("cutoff&_cc&"):
|
||||||
{
|
{
|
||||||
|
|
@ -411,8 +411,8 @@ bool sfz::Region::parseOpcode(const Opcode& opcode)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case hash("resonance&_oncc&"): [[fallthrough]];
|
case hash("resonance&_oncc&"):
|
||||||
case hash("resonance&_cc&"): [[fallthrough]];
|
case hash("resonance&_cc&"):
|
||||||
case hash("resonance_oncc&"): [[fallthrough]];
|
case hash("resonance_oncc&"): [[fallthrough]];
|
||||||
case hash("resonance_cc&"):
|
case hash("resonance_cc&"):
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -568,7 +568,7 @@ void sfz::Synth::renderBlock(AudioSpan<float> buffer) noexcept
|
||||||
buffer.applyGain(db2mag(volume));
|
buffer.applyGain(db2mag(volume));
|
||||||
|
|
||||||
callbackBreakdown.dispatch = dispatchDuration;
|
callbackBreakdown.dispatch = dispatchDuration;
|
||||||
resources.logger.logCallbackTime(std::move(callbackBreakdown), numActiveVoices, numFrames);
|
resources.logger.logCallbackTime(callbackBreakdown, numActiveVoices, numFrames);
|
||||||
|
|
||||||
// Reset the dispatch counter
|
// Reset the dispatch counter
|
||||||
dispatchDuration = Duration(0);
|
dispatchDuration = Duration(0);
|
||||||
|
|
@ -939,7 +939,7 @@ void sfz::Synth::resetAllControllers(int delay) noexcept
|
||||||
fs::file_time_type sfz::Synth::checkModificationTime()
|
fs::file_time_type sfz::Synth::checkModificationTime()
|
||||||
{
|
{
|
||||||
auto returnedTime = modificationTime;
|
auto returnedTime = modificationTime;
|
||||||
for (auto file: getIncludedFiles()) {
|
for (const auto& file: getIncludedFiles()) {
|
||||||
const auto fileTime = fs::last_write_time(file);
|
const auto fileTime = fs::last_write_time(file);
|
||||||
if (returnedTime < fileTime)
|
if (returnedTime < fileTime)
|
||||||
returnedTime = fileTime;
|
returnedTime = fileTime;
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ void sfz::Voice::startVoice(Region* region, int delay, int number, uint8_t value
|
||||||
|
|
||||||
pitchBendEnvelope.setFunction([region](float pitchValue){
|
pitchBendEnvelope.setFunction([region](float pitchValue){
|
||||||
const auto normalizedBend = normalizeBend(pitchValue);
|
const auto normalizedBend = normalizeBend(pitchValue);
|
||||||
const auto bendInCents = normalizedBend > 0.0f ? normalizedBend * region->bendUp : -normalizedBend * region->bendDown;
|
const auto bendInCents = normalizedBend > 0.0f ? normalizedBend * static_cast<float>(region->bendUp) : -normalizedBend * static_cast<float>(region->bendDown);
|
||||||
return centsFactor(bendInCents);
|
return centsFactor(bendInCents);
|
||||||
});
|
});
|
||||||
pitchBendEnvelope.reset(static_cast<float>(resources.midiState.getPitchBend()));
|
pitchBendEnvelope.reset(static_cast<float>(resources.midiState.getPitchBend()));
|
||||||
|
|
@ -106,7 +106,7 @@ void sfz::Voice::startVoice(Region* region, int delay, int number, uint8_t value
|
||||||
|
|
||||||
sourcePosition = region->getOffset();
|
sourcePosition = region->getOffset();
|
||||||
triggerDelay = delay;
|
triggerDelay = delay;
|
||||||
initialDelay = delay + static_cast<uint32_t>(region->getDelay() * sampleRate);
|
initialDelay = delay + static_cast<int>(region->getDelay() * sampleRate);
|
||||||
baseFrequency = midiNoteFrequency(number);
|
baseFrequency = midiNoteFrequency(number);
|
||||||
bendStepFactor = centsFactor(region->bendStep);
|
bendStepFactor = centsFactor(region->bendStep);
|
||||||
egEnvelope.reset(*region, resources.midiState, delay, value, sampleRate);
|
egEnvelope.reset(*region, resources.midiState, delay, value, sampleRate);
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ namespace fx {
|
||||||
for (uint32_t i = 0; i < nframes; ++i) {
|
for (uint32_t i = 0; i < nframes; ++i) {
|
||||||
float x = in[i];
|
float x = in[i];
|
||||||
|
|
||||||
float y = std::copysign((int)(0.5f + std::fabs(x * steps)), x) * invSteps;
|
float y = std::copysign((int)(0.5f + std::fabs(x * steps)), x) * invSteps; // NOLINT
|
||||||
|
|
||||||
float y2x[2];
|
float y2x[2];
|
||||||
y2x[0] = (y != lastValue) ? (0.5f * (y + lastValue)) : y;
|
y2x[0] = (y != lastValue) ? (0.5f * (y + lastValue)) : y;
|
||||||
|
|
@ -150,7 +150,7 @@ namespace fx {
|
||||||
///
|
///
|
||||||
void Lofi::Decim::init(double sampleRate)
|
void Lofi::Decim::init(double sampleRate)
|
||||||
{
|
{
|
||||||
fSampleTime = 1.0 / sampleRate;
|
fSampleTime = 1.0f / static_cast<float>(sampleRate);
|
||||||
|
|
||||||
static constexpr double coefs2x[12] = { 0.036681502163648017, 0.13654762463195794, 0.27463175937945444, 0.42313861743656711, 0.56109869787919531, 0.67754004997416184, 0.76974183386322703, 0.83988962484963892, 0.89226081800387902, 0.9315419599631839, 0.96209454837808417, 0.98781637073289585 };
|
static constexpr double coefs2x[12] = { 0.036681502163648017, 0.13654762463195794, 0.27463175937945444, 0.42313861743656711, 0.56109869787919531, 0.67754004997416184, 0.76974183386322703, 0.83988962484963892, 0.89226081800387902, 0.9315419599631839, 0.96209454837808417, 0.98781637073289585 };
|
||||||
fDownsampler2x.set_coefs(coefs2x);
|
fDownsampler2x.set_coefs(coefs2x);
|
||||||
|
|
@ -192,7 +192,7 @@ namespace fx {
|
||||||
|
|
||||||
phase += dt;
|
phase += dt;
|
||||||
float y = (phase > 1.0f) ? x : lastValue;
|
float y = (phase > 1.0f) ? x : lastValue;
|
||||||
phase -= static_cast<int>(phase);
|
phase -= static_cast<float>(static_cast<int>(phase));
|
||||||
|
|
||||||
float y2x[2];
|
float y2x[2];
|
||||||
y2x[0] = (y != lastValue) ? (0.5f * (y + lastValue)) : y;
|
y2x[0] = (y != lastValue) ? (0.5f * (y + lastValue)) : y;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue