mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-10-01 09:16:39 -04:00
FreeDV modulator: fixed record timings (corrected sample size)
This commit is contained in:
parent
e5931ff2dc
commit
6c3536e0a0
@ -481,9 +481,9 @@ bool FreeDVMod::handleMessage(const Message& cmd)
|
|||||||
std::size_t samplesCount;
|
std::size_t samplesCount;
|
||||||
|
|
||||||
if (m_ifstream.eof()) {
|
if (m_ifstream.eof()) {
|
||||||
samplesCount = m_fileSize / sizeof(Real);
|
samplesCount = m_fileSize / sizeof(int16_t);
|
||||||
} else {
|
} else {
|
||||||
samplesCount = m_ifstream.tellg() / sizeof(Real);
|
samplesCount = m_ifstream.tellg() / sizeof(int16_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getMessageQueueToGUI())
|
if (getMessageQueueToGUI())
|
||||||
@ -539,7 +539,7 @@ void FreeDVMod::openFileStream()
|
|||||||
m_fileSize = m_ifstream.tellg();
|
m_fileSize = m_ifstream.tellg();
|
||||||
m_ifstream.seekg(0,std::ios_base::beg);
|
m_ifstream.seekg(0,std::ios_base::beg);
|
||||||
|
|
||||||
m_recordLength = m_fileSize / (sizeof(Real) * m_inputSampleRate);
|
m_recordLength = m_fileSize / (sizeof(int16_t) * m_inputSampleRate);
|
||||||
|
|
||||||
qDebug() << "FreeDVMod::openFileStream: " << m_fileName.toStdString().c_str()
|
qDebug() << "FreeDVMod::openFileStream: " << m_fileName.toStdString().c_str()
|
||||||
<< " fileSize: " << m_fileSize << "bytes"
|
<< " fileSize: " << m_fileSize << "bytes"
|
||||||
|
Loading…
Reference in New Issue
Block a user