sdroege / ebur128

Implementation of the EBU R128 loudness standard
MIT License
99 stars 16 forks source link

Add support for ReplayGain 2.0 album gain calculation #59

Closed Holzhaus closed 1 month ago

Holzhaus commented 1 month ago

This adds an example to calculate the ReplayGain 2.0 album gain calculation for a directory containing WAV files. To make this possible, the Ebur128 struct now has a method to get the number of gating blocks and energy.

To test this, run the replaygain example and pass the path to a directory containing WAV files, then compare the calculated values with the output of rsgain.

Please double-check the math and the naming of new the new functions. I'm really not an expert on EBU R128, just want to do album gain calculation in my application. :smile:

Resolved #58.

Holzhaus commented 1 month ago

Review comments addressed.