jp9000/obs-studio — pull request #311 by fryshorts (2014-12-14 18:10:05+00:00)
Title: libobs: Move audio level calculations

This patchset moves the calculation of audio levels for sources from obs_source to the volmeter by exposing the raw audio data with a new signal.
The changes currently try to keep the previous behavior of the volume meter though smaller deviations can occur due to the following factors:
* The peakhold delay is set to 1500ms while previously it was set to 3000 samples (regardless of the number channels)
* The decay for vol_max and vol_mag may have changed since the low pass filter is now only applied when a full sample interval was analyzed
* All samples now contribute to the resulting level whereas before samples where skipped

The move of the loop into the volmeter was done to increase flexibility for the way the volmeter or any other code using the audio_data signal can process the audio data. This will on the other hand cause some overhead when multiple volmeters are attached to the same source.
A different option would be to not expose the data itself but the raw sum and max values to trade flexibility for better performance.