Session: Allow using sample rate from meta packet
authorSoeren Apel <soeren@apelpie.net>
Sat, 12 Dec 2015 14:01:03 +0000 (15:01 +0100)
committerSoeren Apel <soeren@apelpie.net>
Sat, 12 Dec 2015 14:01:03 +0000 (15:01 +0100)
commit8a7b603b295dacee7160eba8e577d6666472be9f
tree3f1c3288d24ddc7cb9b88cf201a47e660d607446
parent67ef1e478845fc44a8fccba025103c7a4314e369
Session: Allow using sample rate from meta packet

Currently, PV only looks at the device config to determine the
sample rate. This breaks as input filters submit meta packets
containing the sample rate and provide no device config.

Example: load any file in PV using the raw binary input filter
and set the sample rate to anything but 0. PV will still show
'sa' as the time unit, indicating that it dismisses the sample
rate information sent in the meta packet.

This patch makes this work by using the sample rate if it
wasn't already set from the device config.
pv/session.cpp