1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-25 11:34:09 -04:00

Fixed some MSVC compatibility issues

This commit is contained in:
f4exb
2019-11-15 09:37:14 +01:00
parent 147bf5c24e
commit 5649162d9e
4 changed files with 15 additions and 8 deletions
@@ -341,9 +341,14 @@ bool Bladerf1Output::applySettings(const BladeRF1OutputSettings& settings, bool
if ((m_settings.m_devSampleRate != settings.m_devSampleRate) || (m_settings.m_log2Interp != settings.m_log2Interp) || force)
{
#if defined(_MSC_VER)
unsigned int fifoRate = (unsigned int) settings.m_devSampleRate / (1<<settings.m_log2Interp);
fifoRate = fifoRate < 48000U ? 48000U : fifoRate;
#else
unsigned int fifoRate = std::max(
(unsigned int) settings.m_devSampleRate / (1<<settings.m_log2Interp),
DeviceBladeRF1Shared::m_sampleFifoMinRate);
#endif
m_sampleSourceFifo.resize(SampleSourceFifo::getSizePolicy(fifoRate));
}