diff --git a/plugins/samplesource/filesource/filesourceinput.cpp b/plugins/samplesource/filesource/filesourceinput.cpp index d0e03b90c..46d1788a2 100644 --- a/plugins/samplesource/filesource/filesourceinput.cpp +++ b/plugins/samplesource/filesource/filesourceinput.cpp @@ -239,52 +239,3 @@ bool FileSourceInput::handleMessage(const Message& message) 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; -} diff --git a/plugins/samplesource/filesource/filesourceinput.h b/plugins/samplesource/filesource/filesourceinput.h index 936035192..fe16d3576 100644 --- a/plugins/samplesource/filesource/filesourceinput.h +++ b/plugins/samplesource/filesource/filesourceinput.h @@ -206,7 +206,6 @@ private: std::time_t m_startingTimeStamp; const QTimer& m_masterTimer; - bool applySettings(const Settings& settings, bool force); void openFileStream(); };