1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-17 05:41:56 -05:00

Fixed file source. Basically working

This commit is contained in:
f4exb 2015-08-04 23:45:32 +02:00
parent 75f10a3b63
commit 5dc5485b86
3 changed files with 12 additions and 6 deletions

View File

@ -47,6 +47,7 @@ public:
~SampleFifo();
bool setSize(int size);
inline uint size() const { return m_size; }
inline uint fill() const { return m_fill; }
uint write(const quint8* data, uint count);

View File

@ -205,14 +205,14 @@
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/pause.png</normaloff>
<normalon>:/play.png</normalon>
<normaloff>:/play.png</normaloff>
<normalon>:/pause.png</normalon>
<disabledoff>:/stop.png</disabledoff>
<disabledon>:/stop.png</disabledon>
<activeoff>:/pause.png</activeoff>
<activeon>:/play.png</activeon>
<selectedoff>:/pause.png</selectedoff>
<selectedon>:/play.png</selectedon>:/pause.png</iconset>
<activeoff>:/play.png</activeoff>
<activeon>:/pause.png</activeon>
<selectedoff>:/play.png</selectedoff>
<selectedon>:/pause.png</selectedon>:/pause.png</iconset>
</property>
<property name="iconSize">
<size>

View File

@ -102,6 +102,11 @@ bool FileSourceInput::startInput(int device)
std::cerr << "FileSourceInput::startInput" << std::endl;
QMutexLocker mutexLocker(&m_mutex);
if(!m_sampleFifo.setSize(96000 * 4)) {
qCritical("Could not allocate SampleFifo");
return false;
}
openFileStream();
if((m_fileSourceThread = new FileSourceThread(&m_ifstream, &m_sampleFifo)) == NULL) {