Change types in DSPLoadCalculator to signed integer after change in utils::get_micros...
authorTim Mayberry <mojofunk@gmail.com>
Fri, 11 Sep 2015 12:13:50 +0000 (22:13 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Wed, 16 Sep 2015 01:22:16 +0000 (11:22 +1000)
libs/ardour/ardour/dsp_load_calculator.h
libs/ardour/dsp_load_calculator.cc
libs/backends/portaudio/portaudio_backend.cc

index b1944cc27e8fb1490114437c7fb206e48e8e9479..6e1ac25cb0bcb45a7df4182901f63941d89d12c2 100644 (file)
@@ -56,16 +56,16 @@ public:
        }
 
 
-       uint64_t get_max_time_us() const { return m_max_time_us; }
+       int64_t get_max_time_us() const { return m_max_time_us; }
 
-       void set_start_timestamp_us(uint64_t start_timestamp_us)
+       void set_start_timestamp_us(int64_t start_timestamp_us)
        {
                m_start_timestamp_us = start_timestamp_us;
        }
 
-       void set_stop_timestamp_us(uint64_t stop_timestamp_us);
+       void set_stop_timestamp_us(int64_t stop_timestamp_us);
 
-       uint64_t elapsed_time_us()
+       int64_t elapsed_time_us()
        {
                return m_stop_timestamp_us - m_start_timestamp_us;
        }
@@ -89,9 +89,9 @@ private: // methods
        static uint32_t max_value_history () { return 16; }
 
 private: // data
-       uint64_t m_max_time_us;
-       uint64_t m_start_timestamp_us;
-       uint64_t m_stop_timestamp_us;
+       int64_t m_max_time_us;
+       int64_t m_start_timestamp_us;
+       int64_t m_stop_timestamp_us;
        float m_dsp_load;
        RingBuffer<float> m_value_history;
        uint32_t m_num_values;
index d30b417ad5406299fc371631ba81dabf42b9fe9b..99147c6a14809704ea751c01f1ac03f6462e9f57 100644 (file)
@@ -21,7 +21,7 @@
 namespace ARDOUR {
 
 void
-DSPLoadCalculator::set_stop_timestamp_us(uint64_t stop_timestamp_us)
+DSPLoadCalculator::set_stop_timestamp_us(int64_t stop_timestamp_us)
 {
        // We could only bother with calculations if a certain amount of time
        // has passed, or the Raw DSP value is > X% different than last calc
index 60cd94c6940a4e3f2af1bc4fc3f618f2a6740396..dcdb0d168d4a2cd49d923f7e9b901c9a42aaf6f3 100644 (file)
@@ -1522,8 +1522,8 @@ PortAudioBackend::blocking_process_main(const float* interleaved_input_data,
                                         float* interleaved_output_data)
 {
        uint32_t i = 0;
-       uint64_t min_elapsed_us = 1000000;
-       uint64_t max_elapsed_us = 0;
+       int64_t min_elapsed_us = 1000000;
+       int64_t max_elapsed_us = 0;
 
        m_dsp_calc.set_start_timestamp_us (utils::get_microseconds());