From acb5ff8d0441f809713b70422868105301a9e9db Mon Sep 17 00:00:00 2001 From: Hannu Haahti Date: Fri, 18 Mar 2016 10:11:56 +0200 Subject: [PATCH] Clear buffer of dummy instruments. Should fix #2682 --- include/DummyInstrument.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/DummyInstrument.h b/include/DummyInstrument.h index c3ba12f83..c369924b7 100644 --- a/include/DummyInstrument.h +++ b/include/DummyInstrument.h @@ -28,6 +28,9 @@ #include "Instrument.h" #include "InstrumentView.h" +#include "Engine.h" + +#include class DummyInstrument : public Instrument @@ -42,8 +45,10 @@ public: { } - virtual void playNote( NotePlayHandle *, sampleFrame * ) + virtual void playNote( NotePlayHandle *, sampleFrame * buffer ) { + memset( buffer, 0, sizeof( sampleFrame ) * + Engine::mixer()->framesPerPeriod() ); } virtual void saveSettings( QDomDocument &, QDomElement & )