Merge pull request #681 from jpcima/vst-fixes

Ensure to initialize the PlayState structure
This commit is contained in:
JP Cimalando 2021-03-08 16:50:29 +01:00 committed by GitHub
commit 605ad43306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -281,7 +281,7 @@ tresult PLUGIN_API SfizzVstProcessor::process(Vst::ProcessData& data)
_playStateChangeCounter += numFrames;
if (_playStateChangeCounter > _playStateChangePeriod) {
_playStateChangeCounter %= _playStateChangePeriod;
SfizzPlayState playState;
SfizzPlayState playState {};
playState.curves = synth.getNumCurves();
playState.masters = synth.getNumMasters();
playState.groups = synth.getNumGroups();

View file

@ -158,6 +158,6 @@ public:
OBJ_METHODS(PlayStateUpdate, FObject)
private:
SfizzPlayState state_;
SfizzPlayState state_ {};
mutable std::mutex mutex_;
};