@@ -208,13 +208,7 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id) | |||
{ | |||
m_wavecomponent.setAudioFile(processor.getAudioFile()); | |||
} | |||
if (processor.getAudioFile()==File() && processor.isRecordingEnabled()==false && m_wavecomponent.isUsingAudioBuffer()==false) | |||
{ | |||
auto bufptr = processor.getStretchSource()->getSourceAudioBuffer(); | |||
if (bufptr!=nullptr) | |||
m_wavecomponent.setAudioBuffer(bufptr, | |||
processor.getSampleRateChecked(), bufptr->getNumSamples()); | |||
} | |||
m_wavecomponent.setTimeSelection(processor.getTimeSelection()); | |||
if (processor.m_state_dirty) | |||
{ | |||
@@ -234,24 +228,6 @@ void PaulstretchpluginAudioProcessorEditor::setAudioFile(File f) | |||
m_wavecomponent.setAudioFile(f); | |||
} | |||
void PaulstretchpluginAudioProcessorEditor::setAudioBuffer(AudioBuffer<float>* buf, int samplerate, int len) | |||
{ | |||
MessageManager::callAsync([this,buf, samplerate, len]() | |||
{ | |||
m_wavecomponent.setAudioBuffer(buf, samplerate, len); | |||
}); | |||
} | |||
void PaulstretchpluginAudioProcessorEditor::beginAddingAudioBlocks(int channels, int samplerate, int totalllen) | |||
{ | |||
m_wavecomponent.beginAddingAudioBlocks(channels, samplerate, totalllen); | |||
} | |||
void PaulstretchpluginAudioProcessorEditor::addAudioBlock(AudioBuffer<float>& buf, int samplerate, int pos) | |||
{ | |||
m_wavecomponent.addAudioBlock(buf, samplerate, pos); | |||
} | |||
bool PaulstretchpluginAudioProcessorEditor::isInterestedInFileDrag(const StringArray & files) | |||
{ | |||
if (files.size() == 0) | |||
@@ -520,34 +496,6 @@ void WaveformComponent::setAudioFile(File f) | |||
*/ | |||
} | |||
void WaveformComponent::setAudioBuffer(AudioBuffer<float>* buf, int samplerate, int len) | |||
{ | |||
/* | |||
jassert(buf!=nullptr); | |||
m_using_audio_buffer = true; | |||
m_waveimage = Image(); | |||
m_curfile = File(); | |||
m_thumb->reset(buf->getNumChannels(), samplerate, len); | |||
m_thumb->addBlock(0, *buf, 0, len); | |||
*/ | |||
} | |||
void WaveformComponent::beginAddingAudioBlocks(int channels, int samplerate, int totalllen) | |||
{ | |||
/* | |||
m_waveimage = Image(); | |||
m_curfile = File(); | |||
m_thumb->reset(channels, samplerate, totalllen); | |||
*/ | |||
} | |||
void WaveformComponent::addAudioBlock(AudioBuffer<float>& buf, int samplerate, int pos) | |||
{ | |||
/* | |||
m_thumb->addBlock(pos, buf, 0, buf.getNumSamples()); | |||
*/ | |||
} | |||
void WaveformComponent::timerCallback() | |||
{ | |||
repaint(); | |||
@@ -89,10 +89,7 @@ public: | |||
void setAudioFile(File f); | |||
const File& getAudioFile() const { return m_curfile; } | |||
bool isUsingAudioBuffer() const { return m_using_audio_buffer; } | |||
void setAudioBuffer(AudioBuffer<float>* buf, int samplerate, int len); | |||
void beginAddingAudioBlocks(int channels, int samplerate, int totalllen); | |||
void addAudioBlock(AudioBuffer<float>& buf, int samplerate, int pos); | |||
void timerCallback() override; | |||
void timerCallback() override; | |||
std::function<double()> CursorPosCallback; | |||
std::function<void(double)> SeekCallback; | |||
std::function<void(Range<double>, int)> TimeSelectionChangedCallback; | |||
@@ -187,9 +184,7 @@ public: | |||
void resized() override; | |||
void timerCallback(int id) override; | |||
void setAudioFile(File f); | |||
void setAudioBuffer(AudioBuffer<float>* buf, int samplerate, int len); | |||
void beginAddingAudioBlocks(int channels, int samplerate, int totalllen); | |||
void addAudioBlock(AudioBuffer<float>& buf, int samplerate, int pos); | |||
bool isInterestedInFileDrag(const StringArray &files) override; | |||
void filesDropped(const StringArray &files, int x, int y) override; | |||
@@ -442,7 +442,6 @@ void PaulstretchpluginAudioProcessor::prepareToPlay(double sampleRate, int sampl | |||
getSampleRateChecked(), | |||
len); | |||
m_thumb->reset(m_recbuffer.getNumChannels(), sampleRate, len); | |||
//callGUI(this,[this,len](auto ed) { ed->setAudioBuffer(&m_recbuffer, getSampleRateChecked(), len); },false); | |||
} | |||
if (m_prebuffering_inited == false) | |||
{ | |||
@@ -537,12 +536,6 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M | |||
int recbuflenframes = m_max_reclen * getSampleRate(); | |||
copyAudioBufferWrappingPosition(buffer, m_recbuffer, m_rec_pos, recbuflenframes); | |||
m_thumb->addBlock(m_rec_pos, buffer, 0, buffer.getNumSamples()); | |||
/* | |||
callGUI(this,[this, &buffer](PaulstretchpluginAudioProcessorEditor*ed) | |||
{ | |||
ed->addAudioBlock(buffer, getSampleRate(), m_rec_pos); | |||
}, false); | |||
*/ | |||
m_rec_pos = (m_rec_pos + buffer.getNumSamples()) % recbuflenframes; | |||
return; | |||
} | |||
@@ -661,12 +654,6 @@ void PaulstretchpluginAudioProcessor::setRecordingEnabled(bool b) | |||
m_recbuffer.setSize(2, m_max_reclen*getSampleRateChecked()+4096,false,false,true); | |||
m_recbuffer.clear(); | |||
m_rec_pos = 0; | |||
/* | |||
callGUI(this,[this,lenbufframes](PaulstretchpluginAudioProcessorEditor* ed) | |||
{ | |||
ed->beginAddingAudioBlocks(2, getSampleRateChecked(), lenbufframes); | |||
},false); | |||
*/ | |||
m_thumb->reset(m_recbuffer.getNumChannels(), getSampleRateChecked(), lenbufframes); | |||
m_is_recording = true; | |||
} | |||
@@ -76,7 +76,7 @@ | |||
</MODULEPATHS> | |||
</XCODE_MAC> | |||
<VS2017 targetFolder="Builds/VisualStudio2017" externalLibraries="C:\ProgrammingProjects\gitrepos\fftw-3.3.6\fftw-3.3-libs\x64\Static-Release\libfftwf-3.3.lib" | |||
extraDefs=""> | |||
extraDefs="" vst3Folder=""> | |||
<CONFIGURATIONS> | |||
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="x64" | |||
debugInformationFormat="ProgramDatabase" enablePluginBinaryCopyStep="1" | |||