mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-02 21:27:48 -04:00
Removed useless method in filesource plugin
This commit is contained in:
parent
31ef841a99
commit
4dfc4701e5
@ -239,52 +239,3 @@ bool FileSourceInput::handleMessage(const Message& message)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FileSourceInput::applySettings(const Settings& settings, bool force)
|
|
||||||
{
|
|
||||||
QMutexLocker mutexLocker(&m_mutex);
|
|
||||||
bool wasRunning = false;
|
|
||||||
|
|
||||||
if((m_settings.m_fileName != settings.m_fileName) || force)
|
|
||||||
{
|
|
||||||
m_settings.m_fileName = settings.m_fileName;
|
|
||||||
|
|
||||||
if (m_fileSourceThread != 0)
|
|
||||||
{
|
|
||||||
wasRunning = m_fileSourceThread->isRunning();
|
|
||||||
|
|
||||||
if (wasRunning)
|
|
||||||
{
|
|
||||||
m_fileSourceThread->stopWork();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_ifstream.is_open())
|
|
||||||
{
|
|
||||||
m_ifstream.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
openFileStream();
|
|
||||||
|
|
||||||
if (m_fileSourceThread != 0)
|
|
||||||
{
|
|
||||||
m_fileSourceThread->setSamplerate(m_sampleRate);
|
|
||||||
|
|
||||||
if (wasRunning)
|
|
||||||
{
|
|
||||||
m_fileSourceThread->startWork();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DSPSignalNotification *notif = new DSPSignalNotification(m_sampleRate, m_centerFrequency);
|
|
||||||
DSPEngine::instance()->getInputMessageQueue()->push(notif);
|
|
||||||
|
|
||||||
qDebug() << "FileSourceInput::applySettings:"
|
|
||||||
<< " file name: " << settings.m_fileName.toStdString().c_str()
|
|
||||||
<< " center freq: " << m_centerFrequency << " Hz"
|
|
||||||
<< " sample rate: " << m_sampleRate
|
|
||||||
<< " Unix timestamp: " << m_startingTimeStamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
@ -206,7 +206,6 @@ private:
|
|||||||
std::time_t m_startingTimeStamp;
|
std::time_t m_startingTimeStamp;
|
||||||
const QTimer& m_masterTimer;
|
const QTimer& m_masterTimer;
|
||||||
|
|
||||||
bool applySettings(const Settings& settings, bool force);
|
|
||||||
void openFileStream();
|
void openFileStream();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user