aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-25 19:05:49 +0200
committerMax Kellermann <max@duempel.org>2013-10-25 19:12:46 +0200
commitd6e28c42e5c2bdab73d3553b21a09fa28dabd037 (patch)
tree6b7e43d0b777b3be149c86e853debef3cbd49826 /test
parent6d475c40de567d778fa6f96c379687a8bf83f82b (diff)
downloadmpd-d6e28c42e5c2bdab73d3553b21a09fa28dabd037.tar.gz
mpd-d6e28c42e5c2bdab73d3553b21a09fa28dabd037.tar.xz
mpd-d6e28c42e5c2bdab73d3553b21a09fa28dabd037.zip
ReplayGainInfo: refactor to a class
Diffstat (limited to 'test')
-rw-r--r--test/dump_playlist.cxx4
-rw-r--r--test/dump_rva2.cxx6
-rw-r--r--test/run_decoder.cxx4
3 files changed, 7 insertions, 7 deletions
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx
index 6517473d2..d8a8084b0 100644
--- a/test/dump_playlist.cxx
+++ b/test/dump_playlist.cxx
@@ -120,12 +120,12 @@ decoder_replay_gain(gcc_unused Decoder &decoder,
const ReplayGainInfo *rgi)
{
const ReplayGainTuple *tuple = &rgi->tuples[REPLAY_GAIN_ALBUM];
- if (replay_gain_tuple_defined(tuple))
+ if (tuple->IsDefined())
g_printerr("replay_gain[album]: gain=%f peak=%f\n",
tuple->gain, tuple->peak);
tuple = &rgi->tuples[REPLAY_GAIN_TRACK];
- if (replay_gain_tuple_defined(tuple))
+ if (tuple->IsDefined())
g_printerr("replay_gain[track]: gain=%f peak=%f\n",
tuple->gain, tuple->peak);
}
diff --git a/test/dump_rva2.cxx b/test/dump_rva2.cxx
index a77568c99..3d47431ec 100644
--- a/test/dump_rva2.cxx
+++ b/test/dump_rva2.cxx
@@ -67,7 +67,7 @@ int main(int argc, char **argv)
}
ReplayGainInfo replay_gain;
- replay_gain_info_init(&replay_gain);
+ replay_gain.Clear();
bool success = tag_rva2_parse(tag, replay_gain);
id3_tag_delete(tag);
@@ -78,12 +78,12 @@ int main(int argc, char **argv)
}
const ReplayGainTuple *tuple = &replay_gain.tuples[REPLAY_GAIN_ALBUM];
- if (replay_gain_tuple_defined(tuple))
+ if (tuple->IsDefined())
g_printerr("replay_gain[album]: gain=%f peak=%f\n",
tuple->gain, tuple->peak);
tuple = &replay_gain.tuples[REPLAY_GAIN_TRACK];
- if (replay_gain_tuple_defined(tuple))
+ if (tuple->IsDefined())
g_printerr("replay_gain[track]: gain=%f peak=%f\n",
tuple->gain, tuple->peak);
diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx
index 53e6ede2a..f4662e8af 100644
--- a/test/run_decoder.cxx
+++ b/test/run_decoder.cxx
@@ -130,12 +130,12 @@ decoder_replay_gain(gcc_unused Decoder &decoder,
const ReplayGainInfo *rgi)
{
const ReplayGainTuple *tuple = &rgi->tuples[REPLAY_GAIN_ALBUM];
- if (replay_gain_tuple_defined(tuple))
+ if (tuple->IsDefined())
g_printerr("replay_gain[album]: gain=%f peak=%f\n",
tuple->gain, tuple->peak);
tuple = &rgi->tuples[REPLAY_GAIN_TRACK];
- if (replay_gain_tuple_defined(tuple))
+ if (tuple->IsDefined())
g_printerr("replay_gain[track]: gain=%f peak=%f\n",
tuple->gain, tuple->peak);
}