fix float calc:
authorRobin Gareus <robin@gareus.org>
Sat, 3 Oct 2015 15:44:56 +0000 (17:44 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 3 Oct 2015 15:44:56 +0000 (17:44 +0200)
divide large number. not multiply a small.

libs/ardour/ardour/dsp_load_calculator.h

index 09714bab22a2f9c0442497c56512f2666a040544..0fd7106e719fc58480bcee9c2e46f7d32b42e19c 100644 (file)
@@ -37,7 +37,7 @@ public:
        }
 
        void set_max_time(double samplerate, uint32_t period_size) {
-               m_max_time_us = (1e6 / samplerate) * period_size;
+               m_max_time_us = period_size * 1e6 / samplerate;
        }
 
        void set_max_time_us(uint64_t max_time_us) {