1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-22 01:20:56 -05:00

Fix modulators when channel sample rate is greater than audio sample rate.

This commit is contained in:
Jon Beniston 2024-12-10 10:45:48 +00:00
parent d696dd66a0
commit 1462890a77
4 changed files with 4 additions and 4 deletions

View File

@ -128,7 +128,7 @@ void AMModSource::pullOne(Sample& sample)
void AMModSource::prefetch(unsigned int nbSamples)
{
auto nbSamplesAudio = (nbSamples * (unsigned int) ((Real) m_audioSampleRate / (Real) m_channelSampleRate));
unsigned int nbSamplesAudio = (unsigned int) (nbSamples * ((Real) m_audioSampleRate / (Real) m_channelSampleRate));
pullAudio(nbSamplesAudio);
}

View File

@ -119,7 +119,7 @@ void NFMModSource::pullOne(Sample& sample)
void NFMModSource::prefetch(unsigned int nbSamples)
{
unsigned int nbSamplesAudio = (nbSamples * (unsigned int) ((Real) m_audioSampleRate / (Real) m_channelSampleRate));
unsigned int nbSamplesAudio = (unsigned int) (nbSamples * ((Real) m_audioSampleRate / (Real) m_channelSampleRate));
pullAudio(nbSamplesAudio);
}

View File

@ -131,7 +131,7 @@ void SSBModSource::pullOne(Sample& sample)
void SSBModSource::prefetch(unsigned int nbSamples)
{
unsigned int nbSamplesAudio = (nbSamples * (unsigned int) ((Real) m_audioSampleRate / (Real) m_channelSampleRate));
unsigned int nbSamplesAudio = (unsigned int) (nbSamples * ((Real) m_audioSampleRate / (Real) m_channelSampleRate));
pullAudio(nbSamplesAudio);
}

View File

@ -191,7 +191,7 @@ void WFMModSource::modulateAudio()
void WFMModSource::prefetch(unsigned int nbSamples)
{
unsigned int nbSamplesAudio = nbSamples * ((Real) m_audioSampleRate / (Real) m_channelSampleRate);
unsigned int nbSamplesAudio = (unsigned int) (nbSamples * ((Real) m_audioSampleRate / (Real) m_channelSampleRate));
pullAudio(nbSamplesAudio);
}