I am assuming this function is the source of the problem I am having. As you know it is deprecated and I am looking for an alternative. Our C++ prof gave us an assignment with this line of code:
auto* reader = formatManager.createReaderFor(audioURL.createInputStream(false));
reader is a null pointer in all cases. audioURL is a valid JUCE URL object, instantiated with a local audiofile, as determined by typeid(audioURL).name():
audioURL is type N4juce3URL
I cannot get a hold of the prof. He wrote this DJ application over two years ago.
Looking over juce_Filechooser.cpp, I am unsure of what to replace this with. The input to a new function does not have to be a URL object, it could be a File object.
I am using Linux. I looked over juce_linux_FileChooser.cpp but nothing there seemed to fit the bill.
FWIW the function that this line of code is a part of is:
void DJAudioPlayer::loadURL(URL audioURL)
{
auto* reader = formatManager.createReaderFor(audioURL.createInputStream(false));
if (reader != nullptr) // good file!
{
std::unique_ptr newSource (new AudioFormatReaderSource(reader, true));
transportSource.setSource (newSource.get(), 0, nullptr, reader->sampleRate);
readerSource.reset (newSource.release());
}
}