Renamed get_samplerate to samplerate
[pulseview.git] / pv / data / signaldata.cpp
index 2c6e3c66c38fb55cb5c65f40cb6a71d8cac02ea7..04f1d3f53dec8a7fb65b9aa3fb0b3786d4630c47 100644 (file)
 namespace pv {
 namespace data {
 
-SignalData::SignalData(double samplerate) :
-       _samplerate(samplerate),
-       _start_time(0)
+SignalData::SignalData() :
+       _start_time(0),
+       _samplerate(0)
 {
 }
 
-double SignalData::get_samplerate() const
+double SignalData::samplerate() const
 {
        return _samplerate;
 }
 
+void SignalData::set_samplerate(double samplerate)
+{
+       _samplerate = samplerate;
+       clear();
+}
+
 double SignalData::get_start_time() const
 {
        return _start_time;