Trying to get the Mac build working, but no luck...
This commit is contained in:
parent
3c79a097c5
commit
3fd0b4ea09
@ -22,7 +22,6 @@
|
||||
|
||||
#include "../JuceLibraryCode/JuceHeader.h"
|
||||
|
||||
//#include <audiofile.h>
|
||||
#include "InputS.h"
|
||||
|
||||
inline double ramp(int64_t pos, int64_t totallen, int64_t rampinlen, int64_t rampoutlen)
|
||||
@ -51,7 +50,8 @@ public:
|
||||
|
||||
void setAudioBuffer(AudioBuffer<float>* buf, int samplerate, int len)
|
||||
{
|
||||
m_afreader = nullptr;
|
||||
std::lock_guard<std::mutex> locker(m_mutex);
|
||||
m_afreader = nullptr;
|
||||
m_using_memory_buffer = true;
|
||||
m_readbuf = *buf;
|
||||
info.nchannels = buf->getNumChannels();
|
||||
@ -70,7 +70,8 @@ public:
|
||||
AudioFormatReader* reader = m_manager->createReaderFor(file);
|
||||
if (reader)
|
||||
{
|
||||
m_using_memory_buffer = false;
|
||||
std::lock_guard<std::mutex> locker(m_mutex);
|
||||
m_using_memory_buffer = false;
|
||||
m_afreader = std::unique_ptr<AudioFormatReader>(reader);
|
||||
m_currentsample = 0;
|
||||
info.samplerate = (int)m_afreader->sampleRate;
|
||||
@ -96,8 +97,12 @@ public:
|
||||
}
|
||||
int readNextBlock(AudioBuffer<float>& abuf, int nsmps, int numchans) override
|
||||
{
|
||||
if (m_afreader == nullptr && m_using_memory_buffer == false)
|
||||
return 0;
|
||||
std::lock_guard<std::mutex> locker(m_mutex);
|
||||
if (m_afreader == nullptr && m_using_memory_buffer == false)
|
||||
{
|
||||
jassert(false);
|
||||
return 0;
|
||||
}
|
||||
int inchans = 0;
|
||||
if (m_afreader)
|
||||
inchans = m_afreader->numChannels;
|
||||
@ -292,4 +297,5 @@ private:
|
||||
int64_t m_loopcount = 0;
|
||||
bool m_using_memory_buffer = false;
|
||||
AudioFormatManager* m_manager = nullptr;
|
||||
std::mutex m_mutex;
|
||||
};
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
int64_t m_currentsample = 0;
|
||||
volatile int64_t m_currentsample = 0;
|
||||
int m_silenceoutputted = 0;
|
||||
bool m_loop_enabled = false;
|
||||
Range<double> m_activerange{ 0.0,1.0 };
|
||||
|
@ -65,7 +65,9 @@ Control::~Control()
|
||||
}
|
||||
void Control::processAudio(AudioBuffer<float>& buf)
|
||||
{
|
||||
if (m_buffering_source != nullptr)
|
||||
jassert(m_buffering_source!=nullptr);
|
||||
jassert(m_bufferingthread.isThreadRunning());
|
||||
if (m_buffering_source != nullptr)
|
||||
{
|
||||
AudioSourceChannelInfo aif(buf);
|
||||
m_buffering_source->getNextAudioBlock(aif);
|
||||
|
@ -134,13 +134,15 @@ void StretchAudioSource::getNextAudioBlock(const AudioSourceChannelInfo & buffer
|
||||
if (m_stretchoutringbuf.available() > 0)
|
||||
m_output_has_begun = true;
|
||||
bool freezing = m_freezing;
|
||||
if (m_stretchers[0]->isFreezing() != freezing)
|
||||
/*
|
||||
if (m_stretchers[0]->isFreezing() != freezing)
|
||||
{
|
||||
if (freezing == true && m_inputfile!=nullptr)
|
||||
m_freeze_pos = 1.0/m_inputfile->info.nsamples*m_inputfile->getCurrentPosition();
|
||||
for (auto& e : m_stretchers)
|
||||
e->set_freezing(m_freezing);
|
||||
}
|
||||
*/
|
||||
double maingain = Decibels::decibelsToGain((double)val_MainVolume.getValue());
|
||||
if (m_vol_smoother.getTargetValue() != maingain)
|
||||
m_vol_smoother.setValue(maingain);
|
||||
|
@ -632,7 +632,7 @@ int WDL_Resampler::ResampleOut(WDL_ResampleSample *out, int nsamples_in, int nsa
|
||||
m_samples_in_rsinbuf -= isrcpos;
|
||||
if (m_samples_in_rsinbuf <= 0) m_samples_in_rsinbuf=0;
|
||||
else
|
||||
memcpy(localin, localin + isrcpos*nch,m_samples_in_rsinbuf*sizeof(WDL_ResampleSample)*nch);
|
||||
memmove(localin, localin + isrcpos*nch,m_samples_in_rsinbuf*sizeof(WDL_ResampleSample)*nch);
|
||||
|
||||
|
||||
return ret;
|
||||
|
@ -5,7 +5,7 @@
|
||||
version="1.0.0" bundleIdentifier="com.yourcompany.paulstretchplugin"
|
||||
includeBinaryInAppConfig="1" cppLanguageStandard="latest" companyCopyright=""
|
||||
buildVST="1" buildVST3="0" buildAU="0" buildAUv3="0" buildRTAS="0"
|
||||
buildAAX="0" buildStandalone="0" enableIAA="0" pluginName="paulstretchplugin"
|
||||
buildAAX="0" buildStandalone="1" enableIAA="0" pluginName="paulstretchplugin"
|
||||
pluginDesc="paulstretchplugin" pluginManufacturer="Xenakios"
|
||||
pluginManufacturerCode="XenS" pluginCode="Fn1r" pluginChannelConfigs="{2,2},{4,4}, {8,8}"
|
||||
pluginIsSynth="0" pluginWantsMidiIn="0" pluginProducesMidiOut="0"
|
||||
|
Loading…
Reference in New Issue
Block a user