Skip to content

Commit

Permalink
Merge pull request #3922 from anatoly-os/popping_noise_30_fix
Browse files Browse the repository at this point in the history
 fix #275544: popping noise
  • Loading branch information
anatoly-os committed Sep 5, 2018
2 parents 116c82f + ab9bf85 commit 0e6e208
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 484 deletions.
3 changes: 2 additions & 1 deletion fluid/CMakeLists.txt
Expand Up @@ -44,7 +44,8 @@ add_library (fluid STATIC
${fluidUi}
fluidgui.cpp
dsp.cpp fluid.cpp voice.cpp chan.cpp sfont.cpp
conv.cpp gen.cpp mod.cpp tuning.cpp
conv.cpp gen.cpp mod.cpp
conv.h fluid.h fluidgui.h gen.h sfont.h voice.h
${SF3_SRC}
${INCS}
)
Expand Down
4 changes: 3 additions & 1 deletion fluid/fluid.cpp
Expand Up @@ -401,7 +401,9 @@ void Fluid::update_presets()
void Fluid::process(unsigned len, float* out, float* effect1, float* effect2)
{
if (mutex.tryLock()) {
for (Voice* v : activeVoices)
//we have to copy voices array for proper output sound processing in for loop
auto tempVoices = activeVoices;
for (Voice* v : tempVoices)
v->write(len, out, effect1, effect2);
mutex.unlock();
}
Expand Down

0 comments on commit 0e6e208

Please sign in to comment.