projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Session: Allow using sample rate from meta packet
[pulseview.git]
/
pv
/
session.cpp
diff --git
a/pv/session.cpp
b/pv/session.cpp
index 2a794f0fb0c4af8a79b662e12b810ffdb28b510d..ef1159ee599f8abfbf0a7e6b90d6c100eeef3f44 100644
(file)
--- a/
pv/session.cpp
+++ b/
pv/session.cpp
@@
-486,6
+486,11
@@
void Session::feed_in_meta(shared_ptr<Meta> meta)
for (auto entry : meta->config()) {
switch (entry.first->id()) {
case SR_CONF_SAMPLERATE:
for (auto entry : meta->config()) {
switch (entry.first->id()) {
case SR_CONF_SAMPLERATE:
+ // We can't rely on the header to always contain the sample rate,
+ // so in case it's supplied via a meta packet, we use it.
+ if (!cur_samplerate_)
+ cur_samplerate_ = g_variant_get_uint64(entry.second.gobj());
+
/// @todo handle samplerate changes
break;
default:
/// @todo handle samplerate changes
break;
default: