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
1ab46472
Commit
1ab46472
authored
Nov 18, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder_thread: load APE replay gain from music files
parent
f6bbe133
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
decoder_thread.c
src/decoder_thread.c
+15
-0
No files found.
src/decoder_thread.c
View file @
1ab46472
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "decoder_list.h"
#include "decoder_list.h"
#include "decoder_plugin.h"
#include "decoder_plugin.h"
#include "decoder_api.h"
#include "decoder_api.h"
#include "replay_gain_ape.h"
#include "input_stream.h"
#include "input_stream.h"
#include "player_control.h"
#include "player_control.h"
#include "pipe.h"
#include "pipe.h"
...
@@ -298,6 +299,18 @@ decoder_run_stream(struct decoder *decoder, const char *uri)
...
@@ -298,6 +299,18 @@ decoder_run_stream(struct decoder *decoder, const char *uri)
}
}
/**
/**
* Attempt to load replay gain data, and pass it to
* decoder_replay_gain().
*/
static
void
decoder_load_replay_gain
(
struct
decoder
*
decoder
,
const
char
*
path_fs
)
{
struct
replay_gain_info
info
;
if
(
replay_gain_ape_read
(
path_fs
,
&
info
))
decoder_replay_gain
(
decoder
,
&
info
);
}
/**
* Try decoding a file.
* Try decoding a file.
*/
*/
static
bool
static
bool
...
@@ -312,6 +325,8 @@ decoder_run_file(struct decoder *decoder, const char *path_fs)
...
@@ -312,6 +325,8 @@ decoder_run_file(struct decoder *decoder, const char *path_fs)
decoder_unlock
(
dc
);
decoder_unlock
(
dc
);
decoder_load_replay_gain
(
decoder
,
path_fs
);
while
((
plugin
=
decoder_plugin_from_suffix
(
suffix
,
plugin
))
!=
NULL
)
{
while
((
plugin
=
decoder_plugin_from_suffix
(
suffix
,
plugin
))
!=
NULL
)
{
if
(
plugin
->
file_decode
!=
NULL
)
{
if
(
plugin
->
file_decode
!=
NULL
)
{
decoder_lock
(
dc
);
decoder_lock
(
dc
);
...
...
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