aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-05 02:05:50 +0100
committerMax Kellermann <max@duempel.org>2013-01-05 02:40:29 +0100
commit46ed91b53d4ee6df3f9b98bcfb4e36a97420b885 (patch)
tree2b1bfed19c42545822dcc524edaaadf11c1fc94f /test
parent73f6fc428a2d9b58564f0dabdbc59080a731ed5c (diff)
downloadmpd-46ed91b53d4ee6df3f9b98bcfb4e36a97420b885.tar.gz
mpd-46ed91b53d4ee6df3f9b98bcfb4e36a97420b885.tar.xz
mpd-46ed91b53d4ee6df3f9b98bcfb4e36a97420b885.zip
DecoderAPI: _replay_gain() returns void
Let the function decoder_replay_gain() update decoder_control::replay_gain_db instead of letting each decoder plugin take care for that.
Diffstat (limited to 'test')
-rw-r--r--test/dump_playlist.cxx5
-rw-r--r--test/read_tags.c4
-rw-r--r--test/run_decoder.c5
3 files changed, 3 insertions, 11 deletions
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx
index 427052b6c..7d4aa96e6 100644
--- a/test/dump_playlist.cxx
+++ b/test/dump_playlist.cxx
@@ -113,7 +113,7 @@ decoder_tag(G_GNUC_UNUSED struct decoder *decoder,
return DECODE_COMMAND_NONE;
}
-float
+void
decoder_replay_gain(G_GNUC_UNUSED struct decoder *decoder,
const struct replay_gain_info *replay_gain_info)
{
@@ -127,13 +127,10 @@ decoder_replay_gain(G_GNUC_UNUSED struct decoder *decoder,
if (replay_gain_tuple_defined(tuple))
g_printerr("replay_gain[track]: gain=%f peak=%f\n",
tuple->gain, tuple->peak);
-
- return 0.0;
}
void
decoder_mixramp(G_GNUC_UNUSED struct decoder *decoder,
- G_GNUC_UNUSED float replay_gain_db,
char *mixramp_start, char *mixramp_end)
{
g_free(mixramp_start);
diff --git a/test/read_tags.c b/test/read_tags.c
index 09032efc7..2471610e6 100644
--- a/test/read_tags.c
+++ b/test/read_tags.c
@@ -118,16 +118,14 @@ decoder_tag(G_GNUC_UNUSED struct decoder *decoder,
return DECODE_COMMAND_NONE;
}
-float
+void
decoder_replay_gain(G_GNUC_UNUSED struct decoder *decoder,
G_GNUC_UNUSED const struct replay_gain_info *replay_gain_info)
{
- return 0.0;
}
void
decoder_mixramp(G_GNUC_UNUSED struct decoder *decoder,
- G_GNUC_UNUSED float replay_gain_db,
char *mixramp_start, char *mixramp_end)
{
g_free(mixramp_start);
diff --git a/test/run_decoder.c b/test/run_decoder.c
index c25e727ba..3da5216d5 100644
--- a/test/run_decoder.c
+++ b/test/run_decoder.c
@@ -139,7 +139,7 @@ decoder_tag(G_GNUC_UNUSED struct decoder *decoder,
return DECODE_COMMAND_NONE;
}
-float
+void
decoder_replay_gain(G_GNUC_UNUSED struct decoder *decoder,
const struct replay_gain_info *replay_gain_info)
{
@@ -153,13 +153,10 @@ decoder_replay_gain(G_GNUC_UNUSED struct decoder *decoder,
if (replay_gain_tuple_defined(tuple))
g_printerr("replay_gain[track]: gain=%f peak=%f\n",
tuple->gain, tuple->peak);
-
- return 0.0;
}
void
decoder_mixramp(G_GNUC_UNUSED struct decoder *decoder,
- G_GNUC_UNUSED float replay_gain_db,
char *mixramp_start, char *mixramp_end)
{
g_free(mixramp_start);