mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-10-01 17:26:40 -04:00
File Source plugin: fixed reading chunk size not always a multiple of 4 (I/Q sample size) and display of decimal values of sample rate in kS/s
This commit is contained in:
parent
f008250ffa
commit
1b086348e6
@ -311,8 +311,7 @@ void FileSourceGui::updateWithAcquisition()
|
|||||||
void FileSourceGui::updateWithStreamData()
|
void FileSourceGui::updateWithStreamData()
|
||||||
{
|
{
|
||||||
ui->centerFrequency->setValue(m_centerFrequency/1000);
|
ui->centerFrequency->setValue(m_centerFrequency/1000);
|
||||||
QString s = QString::number(m_sampleRate/1000.0, 'f', 0);
|
ui->sampleRateText->setText(tr("%1k").arg((float)m_sampleRate / 1000));
|
||||||
ui->sampleRateText->setText(tr("%1k").arg(s));
|
|
||||||
ui->play->setEnabled(m_acquisition);
|
ui->play->setEnabled(m_acquisition);
|
||||||
QTime recordLength(0, 0, 0, 0);
|
QTime recordLength(0, 0, 0, 0);
|
||||||
recordLength = recordLength.addSecs(m_recordLength);
|
recordLength = recordLength.addSecs(m_recordLength);
|
||||||
|
@ -150,7 +150,7 @@ void FileSourceThread::tick()
|
|||||||
if (throttlems != m_throttlems)
|
if (throttlems != m_throttlems)
|
||||||
{
|
{
|
||||||
m_throttlems = throttlems;
|
m_throttlems = throttlems;
|
||||||
m_chunksize = (m_samplerate * 4 * (m_throttlems+(m_throttleToggle ? 1 : 0))) / 1000;
|
m_chunksize = 4 * ((m_samplerate * (m_throttlems+(m_throttleToggle ? 1 : 0))) / 1000);
|
||||||
m_throttleToggle = !m_throttleToggle;
|
m_throttleToggle = !m_throttleToggle;
|
||||||
setBuffer(m_chunksize);
|
setBuffer(m_chunksize);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user