Hi Everybody,
I’ve been trying for a week now to load binary datas to my plugin and play thoose back.
Doing the “usual” way:
AudioFormatManager formatManager;
formatManager.registerBasicFormats();
MemoryInputStream* input = new MemoryInputStream (BinaryData::guitar_wav, BinaryData::guitar_wavSize, false);
AudioFormatReader* reader = formatManager.createReaderFor (input);
wasn’t working here (“new” kept being highlighted and “createReaderFor” wasn’t couldn’t be recognized )
i found that method wich seems to work for me as virtual studio seems to show no errors:
PluginProcessor.h
private:
juce::AudioFormatManager formatManager;
public:
void HelloSamplerAudioProcessor::loadFile();
PluginProcessor.cpp
#endif
{
formatManager.registerBasicFormats();
}
void HelloSamplerAudioProcessor::loadFile()
{
auto input = std::make_uniquejuce::MemoryInputStream(BinaryData::sec1_wav, BinaryData::sec1_wavSize, false);
auto* reader = formatManager.createReaderFor(std::move(input));
if (reader != nullptr);
}
But still doesn’t play the file… would anybody know what i do wrong??
Thanks!
