shithub: libtags

Download patch

ref: 64b6e03c6309d29afd602b3042998fda75ca888e
parent: b9872910ce781e5818322af3e31c655ca8d87821
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Mar 6 14:25:13 EST 2024

add a note about album/track gain

--- a/tags.h
+++ b/tags.h
@@ -15,9 +15,9 @@
 	Ttitle,
 	Tdate, /* "2014", "2015/02/01", but the year goes first */
 	Ttrack, /* "1", "01", "1/4", but the track number goes first */
-	Talbumgain,
+	Talbumgain, /* see GAIN note */
 	Talbumpeak,
-	Ttrackgain,
+	Ttrackgain, /* see GAIN note */
 	Ttrackpeak,
 	Tgenre,
 	Timage,
@@ -24,6 +24,16 @@
 	Tcomposer,
 	Tcomment,
 };
+
+/* GAIN note:
+ *
+ * Even though the gain value may be expected to look as "52 dB", it
+ * very well may be a plain integer (such as "12032") for R128_* tags.
+ * To do things correctly you will have to check 'const char *k' argument
+ * passed into your callback and parse it accordingly.
+ *
+ * FIXME the output gain (opus) is not parsed, btw.
+ */
 
 /* Format of the audio file. */
 enum {