1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-17 23:28:50 -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(); ~SampleFifo();
bool setSize(int size); bool setSize(int size);
inline uint size() const { return m_size; }
inline uint fill() const { return m_fill; } inline uint fill() const { return m_fill; }
uint write(const quint8* data, uint count); uint write(const quint8* data, uint count);

View File

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

View File

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