-
- if(_analog_data)
- _analog_data->set_samplerate(sample_rate);
- if(_logic_data)
- _logic_data->set_samplerate(sample_rate);
-}
-
-void SigSession::load_session_thread_proc(
- function<void (const QString)> error_handler)
-{
- (void)error_handler;
-
- sr_session_datafeed_callback_add(data_feed_in_proc, NULL);
-
- set_capture_state(Running);
-
- sr_session_run();
-
- sr_session_destroy();
- set_capture_state(Stopped);
-
- // Confirm that SR_DF_END was received
- assert(!_cur_logic_snapshot);
- assert(!_cur_analog_snapshot);
-}
-
-void SigSession::load_input_thread_proc(const string name,
- sr_input *in, function<void (const QString)> error_handler)
-{
- (void)error_handler;
-
- assert(in);
- assert(in->format);
-
- sr_session_datafeed_callback_add(data_feed_in_proc, NULL);
-
- set_capture_state(Running);
-
- in->format->loadfile(in, name.c_str());
-
- sr_session_destroy();
- set_capture_state(Stopped);
-
- // Confirm that SR_DF_END was received
- assert(!_cur_logic_snapshot);
- assert(!_cur_analog_snapshot);
-
- delete in;