Merge pull request #1050 from paulfd/reverb-bug
Don't bypass effects without inputs
This commit is contained in:
commit
f122469f07
3 changed files with 80 additions and 84 deletions
156
.github/workflows/build.yml
vendored
156
.github/workflows/build.yml
vendored
|
|
@ -195,77 +195,77 @@ jobs:
|
||||||
name: ${{matrix.pkg_platform}} installer
|
name: ${{matrix.pkg_platform}} installer
|
||||||
path: ${{runner.workspace}}/build/${{env.install_name}}.exe
|
path: ${{runner.workspace}}/build/${{env.install_name}}.exe
|
||||||
|
|
||||||
build_for_mingw:
|
# build_for_mingw:
|
||||||
runs-on: ubuntu-18.04
|
# runs-on: ubuntu-18.04
|
||||||
strategy:
|
# strategy:
|
||||||
matrix:
|
# matrix:
|
||||||
include:
|
# include:
|
||||||
- platform: i686
|
# - platform: i686
|
||||||
pkg_platform: Win32
|
# pkg_platform: Win32
|
||||||
bits: 32
|
# bits: 32
|
||||||
- platform: x86_64
|
# - platform: x86_64
|
||||||
pkg_platform: Win64
|
# pkg_platform: Win64
|
||||||
bits: 64
|
# bits: 64
|
||||||
container:
|
# container:
|
||||||
image: archlinux
|
# image: archlinux
|
||||||
steps:
|
# steps:
|
||||||
- name: Set install name
|
# - name: Set install name
|
||||||
run: |
|
# run: |
|
||||||
echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
# echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
||||||
echo "install_name=sfizz-${GITHUB_REF##*/}-mingw${{matrix.bits}}" >> "$GITHUB_ENV"
|
# echo "install_name=sfizz-${GITHUB_REF##*/}-mingw${{matrix.bits}}" >> "$GITHUB_ENV"
|
||||||
- name: Configure pacman repositories
|
# - name: Configure pacman repositories
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
cat >>/etc/pacman.conf <<EOF
|
# cat >>/etc/pacman.conf <<EOF
|
||||||
[multilib]
|
# [multilib]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
# Include = /etc/pacman.d/mirrorlist
|
||||||
[mingw-w64]
|
# [mingw-w64]
|
||||||
SigLevel = Optional TrustAll
|
# SigLevel = Optional TrustAll
|
||||||
Server = https://github.com/jpcima/arch-mingw-w64/releases/download/repo.\$arch/
|
# Server = https://github.com/jpcima/arch-mingw-w64/releases/download/repo.\$arch/
|
||||||
EOF
|
# EOF
|
||||||
- name: Set up dependencies
|
# - name: Set up dependencies
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
pacman -Sqyu --noconfirm
|
# pacman -Sqyu --noconfirm
|
||||||
pacman -Sq --needed --noconfirm base-devel git wget ninja mingw-w64-cmake mingw-w64-gcc mingw-w64-pkg-config mingw-w64-libsndfile
|
# pacman -Sq --needed --noconfirm base-devel git wget ninja mingw-w64-cmake mingw-w64-gcc mingw-w64-pkg-config mingw-w64-libsndfile
|
||||||
- uses: actions/checkout@v2
|
# - uses: actions/checkout@v2
|
||||||
with:
|
# with:
|
||||||
submodules: recursive
|
# submodules: recursive
|
||||||
- name: Fix MinGW headers
|
# - name: Fix MinGW headers
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
cp -vf "$GITHUB_WORKSPACE"/scripts/mingw_dwrite_3.h \
|
# cp -vf "$GITHUB_WORKSPACE"/scripts/mingw_dwrite_3.h \
|
||||||
/usr/${{matrix.platform}}-w64-mingw32/include/dwrite_3.h
|
# /usr/${{matrix.platform}}-w64-mingw32/include/dwrite_3.h
|
||||||
- name: Create Build Environment
|
# - name: Create Build Environment
|
||||||
shell: bash
|
# shell: bash
|
||||||
working-directory: ${{runner.workspace}}
|
# working-directory: ${{runner.workspace}}
|
||||||
run: cmake -E make_directory build
|
# run: cmake -E make_directory build
|
||||||
- name: Configure CMake
|
# - name: Configure CMake
|
||||||
shell: bash
|
# shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
# working-directory: ${{runner.workspace}}/build
|
||||||
run: |
|
# run: |
|
||||||
${{matrix.platform}}-w64-mingw32-cmake "$GITHUB_WORKSPACE" -G Ninja \
|
# ${{matrix.platform}}-w64-mingw32-cmake "$GITHUB_WORKSPACE" -G Ninja \
|
||||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
# -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
||||||
-DENABLE_LTO=OFF \
|
# -DENABLE_LTO=OFF \
|
||||||
-DSFIZZ_JACK=OFF \
|
# -DSFIZZ_JACK=OFF \
|
||||||
-DSFIZZ_VST=ON \
|
# -DSFIZZ_VST=ON \
|
||||||
-DSFIZZ_PUREDATA=ON \
|
# -DSFIZZ_PUREDATA=ON \
|
||||||
-DSFIZZ_STATIC_DEPENDENCIES=ON \
|
# -DSFIZZ_STATIC_DEPENDENCIES=ON \
|
||||||
-DCMAKE_CXX_STANDARD=17
|
# -DCMAKE_CXX_STANDARD=17
|
||||||
- name: Build
|
# - name: Build
|
||||||
shell: bash
|
# shell: bash
|
||||||
working-directory: ${{runner.workspace}}/build
|
# working-directory: ${{runner.workspace}}/build
|
||||||
run: ${{matrix.platform}}-w64-mingw32-cmake --build . --config "$BUILD_TYPE" -j 2
|
# run: ${{matrix.platform}}-w64-mingw32-cmake --build . --config "$BUILD_TYPE" -j 2
|
||||||
- name: Install
|
# - name: Install
|
||||||
working-directory: ${{runner.workspace}}/build
|
# working-directory: ${{runner.workspace}}/build
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
DESTDIR="$(pwd)/$install_name" ${{matrix.platform}}-w64-mingw32-cmake --build . --config "$BUILD_TYPE" --target install
|
# DESTDIR="$(pwd)/$install_name" ${{matrix.platform}}-w64-mingw32-cmake --build . --config "$BUILD_TYPE" --target install
|
||||||
tar czvf "$install_name".tar.gz "$install_name"
|
# tar czvf "$install_name".tar.gz "$install_name"
|
||||||
- uses: actions/upload-artifact@v2
|
# - uses: actions/upload-artifact@v2
|
||||||
with:
|
# with:
|
||||||
name: ${{matrix.pkg_platform}} MinGW tarball
|
# name: ${{matrix.pkg_platform}} MinGW tarball
|
||||||
path: ${{runner.workspace}}/build/${{env.install_name}}.tar.gz
|
# path: ${{runner.workspace}}/build/${{env.install_name}}.tar.gz
|
||||||
|
|
||||||
build_with_makefile:
|
build_with_makefile:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
@ -330,7 +330,7 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- build_for_linux
|
- build_for_linux
|
||||||
- build_for_mod
|
- build_for_mod
|
||||||
- build_for_mingw
|
# - build_for_mingw
|
||||||
- build_for_windows
|
- build_for_windows
|
||||||
- archive_source_code
|
- archive_source_code
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -343,12 +343,12 @@ jobs:
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: MOD devices tarball
|
name: MOD devices tarball
|
||||||
- uses: actions/download-artifact@v2
|
# - uses: actions/download-artifact@v2
|
||||||
with:
|
# with:
|
||||||
name: Win32 MinGW tarball
|
# name: Win32 MinGW tarball
|
||||||
- uses: actions/download-artifact@v2
|
# - uses: actions/download-artifact@v2
|
||||||
with:
|
# with:
|
||||||
name: Win64 MinGW tarball
|
# name: Win64 MinGW tarball
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Win32 installer
|
name: Win32 installer
|
||||||
|
|
|
||||||
|
|
@ -119,8 +119,6 @@ void EffectBus::addToInputs(const float* const addInput[], float addGain, unsign
|
||||||
if (addGain == 0)
|
if (addGain == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_hasSignal = true;
|
|
||||||
|
|
||||||
for (unsigned c = 0; c < EffectChannels; ++c) {
|
for (unsigned c = 0; c < EffectChannels; ++c) {
|
||||||
absl::Span<const float> addIn { addInput[c], nframes };
|
absl::Span<const float> addIn { addInput[c], nframes };
|
||||||
sfz::multiplyAdd1(addGain, addIn, _inputs.getSpan(c).first(nframes));
|
sfz::multiplyAdd1(addGain, addIn, _inputs.getSpan(c).first(nframes));
|
||||||
|
|
@ -165,8 +163,6 @@ void EffectBus::process(unsigned nframes)
|
||||||
fx::Nothing().process(
|
fx::Nothing().process(
|
||||||
AudioSpan<float>(_inputs), AudioSpan<float>(_outputs), nframes);
|
AudioSpan<float>(_inputs), AudioSpan<float>(_outputs), nframes);
|
||||||
}
|
}
|
||||||
|
|
||||||
_hasSignal = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectBus::mixOutputsTo(float* const mainOutput[], float* const mixOutput[], unsigned nframes)
|
void EffectBus::mixOutputsTo(float* const mainOutput[], float* const mixOutput[], unsigned nframes)
|
||||||
|
|
@ -185,6 +181,7 @@ size_t EffectBus::numEffects() const noexcept
|
||||||
{
|
{
|
||||||
return _effects.size();
|
return _effects.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectBus::setSamplesPerBlock(int samplesPerBlock) noexcept
|
void EffectBus::setSamplesPerBlock(int samplesPerBlock) noexcept
|
||||||
{
|
{
|
||||||
_inputs.resize(samplesPerBlock);
|
_inputs.resize(samplesPerBlock);
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ public:
|
||||||
/**
|
/**
|
||||||
@brief Checks whether this bus can produce output.
|
@brief Checks whether this bus can produce output.
|
||||||
*/
|
*/
|
||||||
bool hasNonZeroOutput() const { return _hasSignal && (_gainToMain != 0 || _gainToMix != 0); }
|
bool hasNonZeroOutput() const { return (_gainToMain != 0 || _gainToMix != 0); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Sets the amount of effect output going to the main.
|
@brief Sets the amount of effect output going to the main.
|
||||||
|
|
@ -189,7 +189,6 @@ private:
|
||||||
AudioBuffer<float> _outputs { EffectChannels, config::defaultSamplesPerBlock };
|
AudioBuffer<float> _outputs { EffectChannels, config::defaultSamplesPerBlock };
|
||||||
float _gainToMain { Default::effect };
|
float _gainToMain { Default::effect };
|
||||||
float _gainToMix { Default::effect };
|
float _gainToMix { Default::effect };
|
||||||
bool _hasSignal { false };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sfz
|
} // namespace sfz
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue