13
0

Change types in DSPLoadCalculator to signed integer after change in utils::get_microsecond

This commit is contained in:
Tim Mayberry 2015-09-11 22:13:50 +10:00
parent a974659504
commit b2a7393553
3 changed files with 10 additions and 10 deletions

View 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;

View 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

View 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());