| 6 | #include "PluginProcessor.h" |
| 7 | |
| 8 | Player::Player(NeuralNoteAudioProcessor* inProcessor) |
| 9 | : mProcessor(inProcessor) |
| 10 | { |
| 11 | mProcessor->addListenerToStateValueTree(this); |
| 12 | |
| 13 | mSynth = std::make_unique<MPESynthesiser>(); |
| 14 | mSynth->setCurrentPlaybackSampleRate(44100); |
| 15 | |
| 16 | for (int i = 0; i < NUM_VOICES_SYNTH; i++) { |
| 17 | mSynth->addVoice(new SynthVoice()); |
| 18 | } |
| 19 | |
| 20 | mSynthController = std::make_unique<SynthController>(inProcessor, mSynth.get()); |
| 21 | |
| 22 | setPlayheadPositionSeconds(mProcessor->getValueTree().getProperty(NnId::PlayheadPositionSecId, 0.0)); |
| 23 | |
| 24 | mShouldOutputMidi = mProcessor->getValueTree().getProperty(NnId::MidiOut, false); |
| 25 | } |
| 26 | |
| 27 | Player::~Player() |
| 28 | { |
nothing calls this directly
no test coverage detected