Skip to content

Commit 3dba2cd

Browse files
authored
[ENHANCEMENT] Report latency when resampling (#457)
* Plugin reoprts its latency. Not quite right yet maybe * Latency is successfully reported
1 parent 40dcabd commit 3dba2cd

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NeuralAmpModeler/NeuralAmpModeler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ void NeuralAmpModeler::_ApplyDSPStaging()
528528
mNAMPath.Set("");
529529
mShouldRemoveModel = false;
530530
mCheckSampleRateWarning = true;
531+
SetLatency(0);
531532
}
532533
if (mShouldRemoveIR)
533534
{
@@ -543,6 +544,7 @@ void NeuralAmpModeler::_ApplyDSPStaging()
543544
mStagedModel = nullptr;
544545
mNewModelLoadedInDSP = true;
545546
mCheckSampleRateWarning = true;
547+
SetLatency(mModel->GetLatency());
546548
}
547549
if (mStagedIR != nullptr)
548550
{

NeuralAmpModeler/NeuralAmpModeler.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ class ResamplingNAM : public nam::DSP
157157
mFinalized = true;
158158
};
159159

160+
int GetLatency() const { return mResampler.GetLatency(); };
161+
160162
void Reset(const double sampleRate, const int maxBlockSize)
161163
{
162164
mExpectedSampleRate = sampleRate;

0 commit comments

Comments
 (0)