zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 0ae8ac7a8fca7f3aeaf0111cea7ebbc483ecfd6d
parent dd7e162d7c4a2600c07fa76b10edf3db52d13eac
Author: Johannes Lorenz <j.git@lorenz-ho.me>
Date:   Sun, 28 May 2023 13:45:45 +0200

Fix uninitialized Part::partno

Diffstat:
Msrc/Misc/MiddleWare.cpp | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp @@ -628,6 +628,8 @@ public: config->cfg.Interpolation, &master->microtonal, master->fft, &master->watcher, ("/part"+to_s(npart)+"/").c_str()); + p->partno = npart % NUM_MIDI_CHANNELS; + p->Prcvchn = npart % NUM_MIDI_CHANNELS; if(p->loadXMLinstrument(filename)) fprintf(stderr, "Warning: failed to load part<%s>!\n", filename); @@ -651,6 +653,8 @@ public: config->cfg.GzipCompression, config->cfg.Interpolation, &master->microtonal, master->fft); + p->partno = npart % NUM_MIDI_CHANNELS; + p->Prcvchn = npart % NUM_MIDI_CHANNELS; if(p->loadXMLinstrument(filename)) fprintf(stderr, "Warning: failed to load part<%s>!\n", filename); @@ -682,6 +686,8 @@ public: config->cfg.GzipCompression, config->cfg.Interpolation, &master->microtonal, master->fft); + p->partno = npart % NUM_MIDI_CHANNELS; + p->Prcvchn = npart % NUM_MIDI_CHANNELS; p->applyparameters(); obj_store.extractPart(p, npart); kits.extractPart(p, npart);