Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
d495ec71
Commit
d495ec71
authored
May 04, 2018
by
Michal Koutenský
Committed by
Max Kellermann
May 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/opus: add support for R128_ALBUM_GAIN tag
parent
b763852f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
NEWS
NEWS
+1
-0
OpusTags.cxx
src/decoder/plugins/OpusTags.cxx
+8
-0
No files found.
NEWS
View file @
d495ec71
...
...
@@ -4,6 +4,7 @@ ver 0.20.20 (not yet released)
* decoder
- dsdiff, dsf: support more MIME types
- dsdiff, dsf: allow 4 MB ID3 tags
- opus: support R128_ALBUM_GAIN tag
ver 0.20.19 (2018/04/26)
* protocol
...
...
src/decoder/plugins/OpusTags.cxx
View file @
d495ec71
...
...
@@ -53,6 +53,14 @@ ScanOneOpusTag(const char *name, const char *value,
long
l
=
strtol
(
value
,
&
endptr
,
10
);
if
(
endptr
>
value
&&
*
endptr
==
0
)
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment