mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
File source thread: changed chunk size and buffer size calculation so it is set in only one place
This commit is contained in:
parent
23ec969a4d
commit
afdcf138d2
@ -86,7 +86,8 @@ void FileSourceThread::setSamplerate(int samplerate)
|
||||
}
|
||||
|
||||
m_samplerate = samplerate;
|
||||
m_bufsize = (m_samplerate / m_rateDivider)*4;
|
||||
m_chunksize = (m_samplerate / m_rateDivider)*4; // TODO: implement FF and slow motion here. 4 corresponds to live. 2 is half speed, 8 is doulbe speed
|
||||
m_bufsize = m_chunksize;
|
||||
|
||||
if (m_buf == 0) {
|
||||
std::cerr << " Allocate buffer";
|
||||
@ -104,8 +105,7 @@ void FileSourceThread::setSamplerate(int samplerate)
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
m_samplerate = samplerate;
|
||||
m_chunksize = (m_samplerate / m_rateDivider)*4;
|
||||
//m_samplerate = samplerate;
|
||||
}
|
||||
|
||||
void FileSourceThread::run()
|
||||
|
Loading…
Reference in New Issue
Block a user