desbma / r128gain

Fast audio loudness scanner & tagger (ReplayGain v2 / R128)
GNU Lesser General Public License v2.1
171 stars 9 forks source link

Clarification: order of scanned tracks in album dir non-deterministic? #32

Closed linclelinkpart5 closed 3 years ago

linclelinkpart5 commented 3 years ago

Hello, I was wondering if the scan order of track files made a difference when calculating album gain? I noticed that when I ran r128gain --recursive --album-gain album_dir/ a couple of times, the scanning order of the track files changed between runs in a non-deterministic fashion, but the resulting album gain appeared to remain the same.

desbma commented 3 years ago

Hi, The file order is not supposed to make a difference in the gain calculation (if it does, it is a bug). The file order is indeed non deterministic, because the underlying syscall to the operating system returns files in a non deterministic order.