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
|
||||
path: ${{runner.workspace}}/build/${{env.install_name}}.exe
|
||||
|
||||
build_for_mingw:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- platform: i686
|
||||
pkg_platform: Win32
|
||||
bits: 32
|
||||
- platform: x86_64
|
||||
pkg_platform: Win64
|
||||
bits: 64
|
||||
container:
|
||||
image: archlinux
|
||||
steps:
|
||||
- name: Set install name
|
||||
run: |
|
||||
echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
||||
echo "install_name=sfizz-${GITHUB_REF##*/}-mingw${{matrix.bits}}" >> "$GITHUB_ENV"
|
||||
- name: Configure pacman repositories
|
||||
shell: bash
|
||||
run: |
|
||||
cat >>/etc/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
|
||||
- name: Set up dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Fix MinGW headers
|
||||
shell: bash
|
||||
run: |
|
||||
cp -vf "$GITHUB_WORKSPACE"/scripts/mingw_dwrite_3.h \
|
||||
/usr/${{matrix.platform}}-w64-mingw32/include/dwrite_3.h
|
||||
- name: Create Build Environment
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}
|
||||
run: cmake -E make_directory build
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: |
|
||||
${{matrix.platform}}-w64-mingw32-cmake "$GITHUB_WORKSPACE" -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
||||
-DENABLE_LTO=OFF \
|
||||
-DSFIZZ_JACK=OFF \
|
||||
-DSFIZZ_VST=ON \
|
||||
-DSFIZZ_PUREDATA=ON \
|
||||
-DSFIZZ_STATIC_DEPENDENCIES=ON \
|
||||
-DCMAKE_CXX_STANDARD=17
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: ${{matrix.platform}}-w64-mingw32-cmake --build . --config "$BUILD_TYPE" -j 2
|
||||
- name: Install
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
run: |
|
||||
DESTDIR="$(pwd)/$install_name" ${{matrix.platform}}-w64-mingw32-cmake --build . --config "$BUILD_TYPE" --target install
|
||||
tar czvf "$install_name".tar.gz "$install_name"
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{matrix.pkg_platform}} MinGW tarball
|
||||
path: ${{runner.workspace}}/build/${{env.install_name}}.tar.gz
|
||||
# build_for_mingw:
|
||||
# runs-on: ubuntu-18.04
|
||||
# strategy:
|
||||
# matrix:
|
||||
# include:
|
||||
# - platform: i686
|
||||
# pkg_platform: Win32
|
||||
# bits: 32
|
||||
# - platform: x86_64
|
||||
# pkg_platform: Win64
|
||||
# bits: 64
|
||||
# container:
|
||||
# image: archlinux
|
||||
# steps:
|
||||
# - name: Set install name
|
||||
# run: |
|
||||
# echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
||||
# echo "install_name=sfizz-${GITHUB_REF##*/}-mingw${{matrix.bits}}" >> "$GITHUB_ENV"
|
||||
# - name: Configure pacman repositories
|
||||
# shell: bash
|
||||
# run: |
|
||||
# cat >>/etc/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
|
||||
# - name: Set up dependencies
|
||||
# shell: bash
|
||||
# run: |
|
||||
# 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
|
||||
# - uses: actions/checkout@v2
|
||||
# with:
|
||||
# submodules: recursive
|
||||
# - name: Fix MinGW headers
|
||||
# shell: bash
|
||||
# run: |
|
||||
# cp -vf "$GITHUB_WORKSPACE"/scripts/mingw_dwrite_3.h \
|
||||
# /usr/${{matrix.platform}}-w64-mingw32/include/dwrite_3.h
|
||||
# - name: Create Build Environment
|
||||
# shell: bash
|
||||
# working-directory: ${{runner.workspace}}
|
||||
# run: cmake -E make_directory build
|
||||
# - name: Configure CMake
|
||||
# shell: bash
|
||||
# working-directory: ${{runner.workspace}}/build
|
||||
# run: |
|
||||
# ${{matrix.platform}}-w64-mingw32-cmake "$GITHUB_WORKSPACE" -G Ninja \
|
||||
# -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
|
||||
# -DENABLE_LTO=OFF \
|
||||
# -DSFIZZ_JACK=OFF \
|
||||
# -DSFIZZ_VST=ON \
|
||||
# -DSFIZZ_PUREDATA=ON \
|
||||
# -DSFIZZ_STATIC_DEPENDENCIES=ON \
|
||||
# -DCMAKE_CXX_STANDARD=17
|
||||
# - name: Build
|
||||
# shell: bash
|
||||
# working-directory: ${{runner.workspace}}/build
|
||||
# run: ${{matrix.platform}}-w64-mingw32-cmake --build . --config "$BUILD_TYPE" -j 2
|
||||
# - name: Install
|
||||
# working-directory: ${{runner.workspace}}/build
|
||||
# shell: bash
|
||||
# run: |
|
||||
# DESTDIR="$(pwd)/$install_name" ${{matrix.platform}}-w64-mingw32-cmake --build . --config "$BUILD_TYPE" --target install
|
||||
# tar czvf "$install_name".tar.gz "$install_name"
|
||||
# - uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: ${{matrix.pkg_platform}} MinGW tarball
|
||||
# path: ${{runner.workspace}}/build/${{env.install_name}}.tar.gz
|
||||
|
||||
build_with_makefile:
|
||||
runs-on: ubuntu-18.04
|
||||
|
|
@ -330,7 +330,7 @@ jobs:
|
|||
needs:
|
||||
- build_for_linux
|
||||
- build_for_mod
|
||||
- build_for_mingw
|
||||
# - build_for_mingw
|
||||
- build_for_windows
|
||||
- archive_source_code
|
||||
steps:
|
||||
|
|
@ -343,12 +343,12 @@ jobs:
|
|||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: MOD devices tarball
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: Win32 MinGW tarball
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: Win64 MinGW tarball
|
||||
# - uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: Win32 MinGW tarball
|
||||
# - uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: Win64 MinGW tarball
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: Win32 installer
|
||||
|
|
|
|||
|
|
@ -119,8 +119,6 @@ void EffectBus::addToInputs(const float* const addInput[], float addGain, unsign
|
|||
if (addGain == 0)
|
||||
return;
|
||||
|
||||
_hasSignal = true;
|
||||
|
||||
for (unsigned c = 0; c < EffectChannels; ++c) {
|
||||
absl::Span<const float> addIn { addInput[c], nframes };
|
||||
sfz::multiplyAdd1(addGain, addIn, _inputs.getSpan(c).first(nframes));
|
||||
|
|
@ -165,8 +163,6 @@ void EffectBus::process(unsigned nframes)
|
|||
fx::Nothing().process(
|
||||
AudioSpan<float>(_inputs), AudioSpan<float>(_outputs), nframes);
|
||||
}
|
||||
|
||||
_hasSignal = false;
|
||||
}
|
||||
|
||||
void EffectBus::mixOutputsTo(float* const mainOutput[], float* const mixOutput[], unsigned nframes)
|
||||
|
|
@ -185,6 +181,7 @@ size_t EffectBus::numEffects() const noexcept
|
|||
{
|
||||
return _effects.size();
|
||||
}
|
||||
|
||||
void EffectBus::setSamplesPerBlock(int samplesPerBlock) noexcept
|
||||
{
|
||||
_inputs.resize(samplesPerBlock);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public:
|
|||
/**
|
||||
@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.
|
||||
|
|
@ -189,7 +189,6 @@ private:
|
|||
AudioBuffer<float> _outputs { EffectChannels, config::defaultSamplesPerBlock };
|
||||
float _gainToMain { Default::effect };
|
||||
float _gainToMix { Default::effect };
|
||||
bool _hasSignal { false };
|
||||
};
|
||||
|
||||
} // namespace sfz
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue