1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-06 16:05:13 -04:00

Modulator plugins with configurable audio: fixed audio sample rate handling

This commit is contained in:
f4exb
2020-08-02 10:11:41 +02:00
parent 7917d595f5
commit 674a4ccd27
43 changed files with 542 additions and 81 deletions
+16 -4
View File
@@ -510,9 +510,15 @@ void SSBModSource::calculateLevel(Complex& sample)
}
}
void SSBModSource::applyAudioSampleRate(unsigned int sampleRate)
void SSBModSource::applyAudioSampleRate(int sampleRate)
{
qDebug("SSBModSource::applyAudioSampleRate: %u", sampleRate);
if (sampleRate < 0)
{
qWarning("SSBModSource::applyAudioSampleRate: invalid sample rate %d", sampleRate);
return;
}
qDebug("SSBModSource::applyAudioSampleRate: %d", sampleRate);
m_interpolatorDistanceRemain = 0;
m_interpolatorConsumed = false;
@@ -551,9 +557,15 @@ void SSBModSource::applyAudioSampleRate(unsigned int sampleRate)
applyFeedbackAudioSampleRate(m_feedbackAudioSampleRate);
}
void SSBModSource::applyFeedbackAudioSampleRate(unsigned int sampleRate)
void SSBModSource::applyFeedbackAudioSampleRate(int sampleRate)
{
qDebug("SSBModSource::applyFeedbackAudioSampleRate: %u", sampleRate);
if (sampleRate < 0)
{
qWarning("SSBModSource::applyFeedbackAudioSampleRate: invalid sample rate %d", sampleRate);
return;
}
qDebug("SSBModSource::applyFeedbackAudioSampleRate: %d", sampleRate);
m_feedbackInterpolatorDistanceRemain = 0;
m_feedbackInterpolatorConsumed = false;