Sampler not playing when i first open the daw

Hi there,

I’m having that sampler that plays samples on top of the played track.
Everything works fine but when i close the daw and re-open it, i need to re-open the plugin window to make the sampler play at the samples when my track gets played ( other wise closing the plugin window and re-opening it when the track gets played would keep playing the samples wich is fine )

I’m loading my samples like so:
Processor.h

juce::AudioFormatReader* reader {nullptr};
std::unique_ptr<juce::AudioFormatReaderSource> newSource1, newSource2;
juce::AudioBuffer<float> mixBuffer;

Processor.cpp

AudioProcessor()
{
newSource1 = getReader(BinaryData::sample1_wav, BinaryData::sample1_wavSize);
newSource2 = getReader(BinaryData::sample2_wav, BinaryData::sample2_wavSize);
}

~AudioProcessor()
{
newSource1 = getReader(BinaryData::sample1_wav, BinaryData::sample1_wavSize);
newSource2 = getReader(BinaryData::sample2_wav, BinaryData::sample2_wavSize);
reader = nullptr;
}

prepareToPlay(double sampleRate, int samplesPerBlock)
{
mixBuffer.setSize(2, samplesPerBlock);
newSource1->prepareToPlay(samplesPerBlock, sampleRate);
newSource2->prepareToPlay(samplesPerBlock, sampleRate);
}

processBlock()
{
sourceToBuffer(newSource1, info, mixBuffer, buffer);
sourceToBuffer(newSource2, info, mixBuffer, buffer);
}

std::unique_ptr<juce::AudioFormatReaderSource>AudioProcessor::getReader(const char* Test14_wav, int Test14_wavSize)
{
    reader = formatManager.createReaderFor(std::make_unique<juce::MemoryInputStream>(Test14_wav, Test14_wavSize, true));
	std::unique_ptr<juce::AudioFormatReaderSource> source;
	
	if (reader != nullptr)
	
	{
		source = std::unique_ptr<juce::AudioFormatReaderSource>(new juce::AudioFormatReaderSource(reader, true));
		source->setLooping(true);
		
		return source;	
	}
	return nullptr;


}

void AudioProcessor::sourceToBuffer(std::unique_ptr<juce::AudioFormatReaderSource>& source, juce::AudioSourceChannelInfo& info, juce::AudioBuffer<float>& mixBuffer, juce::AudioBuffer<float>& buffer, float calcul)
{
	source->getNextAudioBlock(info);
	int mini = (mixBuffer.getNumChannels() < buffer.getNumChannels()) ? mixBuffer.getNumChannels() : buffer.getNumChannels();
	for (int c = 0; c < mini; ++c)
		buffer.addFrom(c, 0, mixBuffer.getReadPointer(c), buffer.getNumSamples(), calcul);	
}

Would anybody got a clue on what i do wrong?

Thanks a lot.