Remove useless midistate injection

This commit is contained in:
Paul Fd 2021-06-26 23:03:29 +02:00
parent 8563a1735f
commit cbff8666c1
4 changed files with 4 additions and 7 deletions

View file

@ -5,7 +5,6 @@
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
#pragma once #pragma once
#include "MidiState.h"
#include <absl/types/span.h> #include <absl/types/span.h>
#include <memory> #include <memory>

View file

@ -70,7 +70,7 @@ Synth::Impl::Impl()
MidiState& midiState = resources_.getMidiState(); MidiState& midiState = resources_.getMidiState();
genController_.reset(new ControllerSource(resources_, voiceManager_)); genController_.reset(new ControllerSource(resources_, voiceManager_));
genLFO_.reset(new LFOSource(voiceManager_)); genLFO_.reset(new LFOSource(voiceManager_));
genFlexEnvelope_.reset(new FlexEnvelopeSource(voiceManager_, midiState)); genFlexEnvelope_.reset(new FlexEnvelopeSource(voiceManager_));
genADSREnvelope_.reset(new ADSREnvelopeSource(voiceManager_, midiState)); genADSREnvelope_.reset(new ADSREnvelopeSource(voiceManager_, midiState));
genChannelAftertouch_.reset(new ChannelAftertouchSource(voiceManager_, midiState)); genChannelAftertouch_.reset(new ChannelAftertouchSource(voiceManager_, midiState));
genPolyAftertouch_.reset(new PolyAftertouchSource(voiceManager_, midiState)); genPolyAftertouch_.reset(new PolyAftertouchSource(voiceManager_, midiState));

View file

@ -14,8 +14,8 @@
namespace sfz { namespace sfz {
FlexEnvelopeSource::FlexEnvelopeSource(VoiceManager& manager, MidiState& midiState) FlexEnvelopeSource::FlexEnvelopeSource(VoiceManager& manager)
: voiceManager_(manager), midiState_(midiState) : voiceManager_(manager)
{ {
} }

View file

@ -7,14 +7,13 @@
#pragma once #pragma once
#include "../ModGenerator.h" #include "../ModGenerator.h"
#include "../../VoiceManager.h" #include "../../VoiceManager.h"
#include "../../MidiState.h"
namespace sfz { namespace sfz {
class Synth; class Synth;
class FlexEnvelopeSource : public ModGenerator { class FlexEnvelopeSource : public ModGenerator {
public: public:
explicit FlexEnvelopeSource(VoiceManager& manager, MidiState& midiState); explicit FlexEnvelopeSource(VoiceManager& manager);
void init(const ModKey& sourceKey, NumericId<Voice> voiceId, unsigned delay) override; void init(const ModKey& sourceKey, NumericId<Voice> voiceId, unsigned delay) override;
void release(const ModKey& sourceKey, NumericId<Voice> voiceId, unsigned delay) override; void release(const ModKey& sourceKey, NumericId<Voice> voiceId, unsigned delay) override;
void cancelRelease(const ModKey& sourceKey, NumericId<Voice> voiceId, unsigned delay) override; void cancelRelease(const ModKey& sourceKey, NumericId<Voice> voiceId, unsigned delay) override;
@ -22,7 +21,6 @@ public:
private: private:
VoiceManager& voiceManager_; VoiceManager& voiceManager_;
MidiState& midiState_;
}; };
} // namespace sfz } // namespace sfz