Some initial work on using AudioPlayHead
This commit is contained in:
parent
77f514701c
commit
bcd03d923e
@ -136,6 +136,9 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id)
|
|||||||
infotext += " " + String(processor.m_abnormal_output_samples) + " invalid sample values";
|
infotext += " " + String(processor.m_abnormal_output_samples) + " invalid sample values";
|
||||||
if (processor.isNonRealtime())
|
if (processor.isNonRealtime())
|
||||||
infotext += " (offline rendering)";
|
infotext += " (offline rendering)";
|
||||||
|
if (processor.m_playposinfo.isPlaying)
|
||||||
|
infotext += " "+String(processor.m_playposinfo.timeInSeconds,1);
|
||||||
|
|
||||||
m_info_label.setText(infotext, dontSendNotification);
|
m_info_label.setText(infotext, dontSendNotification);
|
||||||
}
|
}
|
||||||
if (id == 2)
|
if (id == 2)
|
||||||
|
@ -351,6 +351,11 @@ void copyAudioBufferWrappingPosition(const AudioBuffer<float>& src, AudioBuffer<
|
|||||||
void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
|
void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
|
||||||
{
|
{
|
||||||
ScopedLock locker(m_cs);
|
ScopedLock locker(m_cs);
|
||||||
|
AudioPlayHead* phead = getPlayHead();
|
||||||
|
if (phead != nullptr)
|
||||||
|
{
|
||||||
|
phead->getCurrentPosition(m_playposinfo);
|
||||||
|
}
|
||||||
ScopedNoDenormals noDenormals;
|
ScopedNoDenormals noDenormals;
|
||||||
double srtemp = getSampleRate();
|
double srtemp = getSampleRate();
|
||||||
if (srtemp != m_cur_sr)
|
if (srtemp != m_cur_sr)
|
||||||
|
@ -135,7 +135,7 @@ public:
|
|||||||
void timerCallback(int id) override;
|
void timerCallback(int id) override;
|
||||||
double getSampleRateChecked();
|
double getSampleRateChecked();
|
||||||
int m_abnormal_output_samples = 0;
|
int m_abnormal_output_samples = 0;
|
||||||
|
AudioPlayHead::CurrentPositionInfo m_playposinfo;
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
headerPath="Source/PS_Source Source/WDL " vstBinaryLocation="C:\VSTPlugins_64bit"/>
|
headerPath="Source/PS_Source Source/WDL " vstBinaryLocation="C:\VSTPlugins_64bit"/>
|
||||||
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
|
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
|
||||||
debugInformationFormat="ProgramDatabase" enablePluginBinaryCopyStep="1"
|
debugInformationFormat="ProgramDatabase" enablePluginBinaryCopyStep="1"
|
||||||
linkTimeOptimisation="1" isDebug="0" optimisation="3" targetName="PaulXStretch"
|
linkTimeOptimisation="0" isDebug="0" optimisation="3" targetName="PaulXStretch"
|
||||||
headerPath="Source/PS_Source Source/WDL " vstBinaryLocation="C:\VSTPlugins_64bit"
|
headerPath="Source/PS_Source Source/WDL " vstBinaryLocation="C:\VSTPlugins_64bit"
|
||||||
useRuntimeLibDLL="0"/>
|
useRuntimeLibDLL="0"/>
|
||||||
</CONFIGURATIONS>
|
</CONFIGURATIONS>
|
||||||
|
Loading…
Reference in New Issue
Block a user