#include "storesession.hpp"
-#include <pv/sigsession.hpp>
+#include <pv/session.hpp>
#include <pv/data/logic.hpp>
#include <pv/data/logicsnapshot.hpp>
#include <pv/view/signal.hpp>
const size_t StoreSession::BlockSize = 1024 * 1024;
StoreSession::StoreSession(const std::string &file_name,
- const SigSession &session) :
+ const Session &session) :
file_name_(file_name),
session_(session),
interrupt_(false),
// Get the snapshot
const deque< shared_ptr<data::LogicSnapshot> > &snapshots =
- data->get_snapshots();
+ data->logic_snapshots();
if (snapshots.empty()) {
error_ = tr("No snapshots to save.");
{{"filename",
Glib::Variant<Glib::ustring>::create(file_name_)}});
auto meta = context->create_meta_packet(
- {{ConfigKey::SAMPLERATE,
- Glib::Variant<guint64>::create(data->samplerate())}});
+ {{ConfigKey::SAMPLERATE, Glib::Variant<guint64>::create(
+ snapshot->samplerate())}});
output_->receive(meta);
} catch (Error error) {
error_ = tr("Error while saving.");
units_stored_ = start_sample >> progress_scale;
}
+ // Zeroing the progress variables indicates completion
+ units_stored_ = unit_count_ = 0;
+
progress_updated();
output_.reset();