Peak values have gaps after repeated GET requests
First, it is potentially useful in how it clears the peaks array buffer every time it is requested. That allows me to just append any new values to the respective peaks array that the rendering function uses in the UI.
Though, after repeatedly hitting the URL, it can start to return non-consecutive peak values.
Example
{
"2018-12-28T23:27:49.162-08:00": 0.534584760665894,
"2018-12-28T23:27:49.325-08:00": 0.557880461215973,
"2018-12-28T23:27:49.398-08:00": 0.603734135627747,
"2018-12-28T23:27:49.473-08:00": 0.589983940124512,
"2018-12-28T23:27:49.559-08:00": 0.554769814014435,
"2018-12-28T23:27:49.709-08:00": 0.547259330749512,
"2018-12-28T23:27:58.606-08:00": 0.513848304748535,
"2018-12-28T23:27:58.690-08:00": 0.53766930103302,
"2018-12-28T23:27:58.765-08:00": 0.546736061573029,
"2018-12-28T23:27:58.925-08:00": 0.523837864398956,
"2018-12-28T23:27:58.999-08:00": 0.478593826293945,
"2018-12-28T23:27:59.072-08:00": 0.53459507226944,
"2018-12-28T23:28:02.113-08:00": 0.119344487786293,
"2018-12-28T23:28:02.187-08:00": 0.0922566503286362,
"2018-12-28T23:28:02.275-08:00": 0.677223384380341
}
Edited by Travis