Hello,
I was still using Juce 5 and now tried to upgrade to Juce 6. There’s one error that appears now:
auto* memoryInputStream = new MemoryInputStream(sound.getWav(), sound.getWavSize(), false);
auto* reader = audioFormatManager.createReaderFor(memoryInputStream); // this line breaks (line 144)
if (reader != nullptr)
{ ... }
The compiler says:
Error C2664 ‘juce::AudioFormatReader *juce::AudioFormatManager::createReaderFor(std::unique_ptr<ObjectType,std::default_delete>)’: cannot convert argument 1 from ‘juce::MemoryInputStream *’ to ‘const juce::File &’ line 144
What is your suggestion to fix this? It worked very well but seems to be deprecated now.
I use the reader to create SamplerSound instances. I’d prefer a solution that does not require a refactor of everything.
Have a nice weekend,
Cheers