Build fix for updated Juce

This commit is contained in:
xenakios 2020-03-26 01:32:39 +02:00
parent 434b6b5488
commit 8bfd8557b7

View File

@ -522,7 +522,7 @@ void PaulstretchpluginAudioProcessor::saveCaptureBuffer()
{ {
m_capture_save_state = 1; m_capture_save_state = 1;
auto outstream = outfile.createOutputStream(); auto outstream = outfile.createOutputStream();
auto writer = unique_from_raw(wavformat.createWriterFor(outstream, getSampleRateChecked(), auto writer = unique_from_raw(wavformat.createWriterFor(outstream.get(), getSampleRateChecked(),
inchans, 32, {}, 0)); inchans, 32, {}, 0));
if (writer != nullptr) if (writer != nullptr)
{ {
@ -536,7 +536,7 @@ void PaulstretchpluginAudioProcessor::saveCaptureBuffer()
else else
{ {
Logger::writeToLog("Could not create wav writer"); Logger::writeToLog("Could not create wav writer");
delete outstream; //delete outstream;
} }
} }
else else
@ -577,7 +577,7 @@ String PaulstretchpluginAudioProcessor::offlineRender(OfflineRenderParams render
auto rendertask = [sc,processor,outputfiletouse, renderpars,blocksize,numoutchans, outsr,this]() auto rendertask = [sc,processor,outputfiletouse, renderpars,blocksize,numoutchans, outsr,this]()
{ {
WavAudioFormat wavformat; WavAudioFormat wavformat;
FileOutputStream* outstream = outputfiletouse.createOutputStream(); auto outstream = outputfiletouse.createOutputStream();
jassert(outstream != nullptr); jassert(outstream != nullptr);
int oformattouse{ 16 }; int oformattouse{ 16 };
bool clipoutput{ false }; bool clipoutput{ false };
@ -590,11 +590,11 @@ String PaulstretchpluginAudioProcessor::offlineRender(OfflineRenderParams render
oformattouse = 32; oformattouse = 32;
clipoutput = true; clipoutput = true;
} }
auto writer{ unique_from_raw(wavformat.createWriterFor(outstream, outsr, numoutchans, auto writer{ unique_from_raw(wavformat.createWriterFor(outstream.get(), outsr, numoutchans,
oformattouse, StringPairArray(), 0)) }; oformattouse, StringPairArray(), 0)) };
if (writer == nullptr) if (writer == nullptr)
{ {
delete outstream; //delete outstream;
jassert(false); jassert(false);
} }
AudioBuffer<float> renderbuffer{ numoutchans, blocksize }; AudioBuffer<float> renderbuffer{ numoutchans, blocksize };