This includes the fix to the bug reported by jaybeee in the 1.2.6 thread, but more importantly, contains three new options:
CODE
-w, --write Writes a 'gain' chunk into the Wave Header.
Stores the scalefactor applied to the wave data as a
double floating point number. Only written when gain
is applied. Presence will result in file being skipped
if reprocessed.
(Unless '--force' or '--undo-gain' are specified.)
--force Forces the reprocessing of a file that contains a 'gain'
chunk and will result in the new scalefactor overwriting
the existing value.
--undo-gain Reads the scalefactor in the 'gain' chunk and uses the
value to reverse the previously applied gain. This will NOT
recreate a bit identical version of the original file, but
it will be rescaled to the original level.
Stores the scalefactor applied to the wave data as a
double floating point number. Only written when gain
is applied. Presence will result in file being skipped
if reprocessed.
(Unless '--force' or '--undo-gain' are specified.)
--force Forces the reprocessing of a file that contains a 'gain'
chunk and will result in the new scalefactor overwriting
the existing value.
--undo-gain Reads the scalefactor in the 'gain' chunk and uses the
value to reverse the previously applied gain. This will NOT
recreate a bit identical version of the original file, but
it will be rescaled to the original level.
It is important to note that when 'undoing' the gain, you should NOT expect the resulting file to be bit identical to the original, it will simply exhibit the same level of loudness.
Possibly the major benefit of writing the 'gain' chunk is that it will not be reprocessed without the use of the '--force' option, it will simply be skipped with an appropriate message to the screen.
Just for the record, any correctly written application encountering the 'gain' chunk will ignore it if it doesn't recognise it, it will not result in any error. This is certainly true of foobar and Adobe Audition to name but two of the applications I have tested this against.
Please report any bugs here.
TIA.
