]> sigrok.org Git - pulseview.git/blobdiff - pv/sigsession.cpp
Sampling bar now commits the sample rate into the device instance
[pulseview.git] / pv / sigsession.cpp
index afe6f955a1e1e51c6aed5990e5d4dc5009220146..fc26a23d784b0f5b2c11fecf993e01358f582428 100644 (file)
@@ -72,13 +72,13 @@ SigSession::capture_state SigSession::get_capture_state() const
 }
 
 void SigSession::start_capture(struct sr_dev_inst *sdi,
-       uint64_t record_length, uint64_t sample_rate)
+       uint64_t record_length)
 {
        stop_capture();
 
        _sampling_thread.reset(new boost::thread(
                &SigSession::sample_thread_proc, this, sdi,
-               record_length, sample_rate));
+               record_length));
 }
 
 void SigSession::stop_capture()
@@ -135,7 +135,7 @@ void SigSession::load_thread_proc(const string name)
 }
 
 void SigSession::sample_thread_proc(struct sr_dev_inst *sdi,
-       uint64_t record_length, uint64_t sample_rate)
+       uint64_t record_length)
 {
        assert(sdi);
 
@@ -156,14 +156,6 @@ void SigSession::sample_thread_proc(struct sr_dev_inst *sdi,
                return;
        }
 
-       // Set the samplerate
-       if (sr_config_set(sdi, SR_CONF_SAMPLERATE,
-               &sample_rate) != SR_OK) {
-               qDebug() << "Failed to configure samplerate.";
-               sr_session_destroy();
-               return;
-       }
-
        if (sr_session_start() != SR_OK) {
                qDebug() << "Failed to start session.";
                return;
@@ -259,6 +251,8 @@ void SigSession::feed_in_header(const sr_dev_inst *sdi)
 void SigSession::feed_in_meta(const sr_dev_inst *sdi,
        const sr_datafeed_meta &meta)
 {
+       (void)sdi;
+
        for (const GSList *l = meta.config; l; l = l->next) {
                const sr_config *const src = (const sr_config*)l->data;
                switch (src->key) {