decoder/opus: add support for R128_ALBUM_GAIN tag
This commit is contained in:
parent
b763852f57
commit
d495ec71a8
1
NEWS
1
NEWS
@ -4,6 +4,7 @@ ver 0.20.20 (not yet released)
|
|||||||
* decoder
|
* decoder
|
||||||
- dsdiff, dsf: support more MIME types
|
- dsdiff, dsf: support more MIME types
|
||||||
- dsdiff, dsf: allow 4 MB ID3 tags
|
- dsdiff, dsf: allow 4 MB ID3 tags
|
||||||
|
- opus: support R128_ALBUM_GAIN tag
|
||||||
|
|
||||||
ver 0.20.19 (2018/04/26)
|
ver 0.20.19 (2018/04/26)
|
||||||
* protocol
|
* protocol
|
||||||
|
@ -53,6 +53,14 @@ ScanOneOpusTag(const char *name, const char *value,
|
|||||||
long l = strtol(value, &endptr, 10);
|
long l = strtol(value, &endptr, 10);
|
||||||
if (endptr > value && *endptr == 0)
|
if (endptr > value && *endptr == 0)
|
||||||
rgi->track.gain = double(l) / 256.;
|
rgi->track.gain = double(l) / 256.;
|
||||||
|
} else if (rgi != nullptr && strcmp(name, "R128_ALBUM_GAIN") == 0) {
|
||||||
|
/* R128_ALBUM_GAIN is a Q7.8 fixed point number in
|
||||||
|
dB */
|
||||||
|
|
||||||
|
char *endptr;
|
||||||
|
long l = strtol(value, &endptr, 10);
|
||||||
|
if (endptr > value && *endptr == 0)
|
||||||
|
rgi->album.gain = double(l) / 256.;
|
||||||
}
|
}
|
||||||
|
|
||||||
tag_handler_invoke_pair(handler, ctx, name, value);
|
tag_handler_invoke_pair(handler, ctx, name, value);
|
||||||
|
Loading…
Reference in New Issue
Block a user