Previously we assumed (hardcoded) the default recording speed of 0.02 (mumbles default).
This resulted in crippled recordings for mumbles "audio per packet" values 10, 40 and 60.
Now, the samples are inspected regarding their spacing when they are received from the recorder bot.
Also, the FGCS file header is now written at recording closing time, so we can easily add the calculated value.
The calculation records all sample delays and then takes the average of them, rounded to the nearest tenth,
to smooth out jitter (also the first and last sample seem to be "0" delay most of the time)
Also, a math.average() function has been added to the sharedFunctios lib in case lua doesn't bring its own.
Deployed to the test server for testing.
local tests were fine, except that the playback of the "60 audio per packet" setting was choppy. 10 and 40 worked fine, tough.
Previously we assumed (hardcoded) the default recording speed of 0.02 (mumbles default). This resulted in crippled recordings for mumbles "audio per packet" values 10, 40 and 60. Now, the samples are inspected regarding their spacing when they are received from the recorder bot. Also, the FGCS file header is now written at recording closing time, so we can easily add the calculated value. The calculation records all sample delays and then takes the average of them, rounded to the nearest tenth, to smooth out jitter (also the first and last sample seem to be "0" delay most of the time)
Also, a math.average() function has been added to the sharedFunctios lib in case lua doesn't bring its own.
Fix #152