aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-25 19:09:22 +0200
committerMax Kellermann <max@duempel.org>2013-10-25 19:12:38 +0200
commit6d475c40de567d778fa6f96c379687a8bf83f82b (patch)
tree6302688c49ab48a514b593812688610ca9da2b75 /src/tag
parented7891bf014c5085240361d605a0eaf24f74e7df (diff)
downloadmpd-6d475c40de567d778fa6f96c379687a8bf83f82b.tar.gz
mpd-6d475c40de567d778fa6f96c379687a8bf83f82b.tar.xz
mpd-6d475c40de567d778fa6f96c379687a8bf83f82b.zip
ReplayGainInfo: use CamelCase for struct name
Diffstat (limited to 'src/tag')
-rw-r--r--src/tag/ApeReplayGain.cxx14
-rw-r--r--src/tag/ApeReplayGain.hxx4
-rw-r--r--src/tag/TagRva2.cxx14
-rw-r--r--src/tag/TagRva2.hxx4
4 files changed, 18 insertions, 18 deletions
diff --git a/src/tag/ApeReplayGain.cxx b/src/tag/ApeReplayGain.cxx
index 15526d2d9..12919690e 100644
--- a/src/tag/ApeReplayGain.cxx
+++ b/src/tag/ApeReplayGain.cxx
@@ -29,7 +29,7 @@
static bool
replay_gain_ape_callback(unsigned long flags, const char *key,
const char *_value, size_t value_length,
- struct replay_gain_info *info)
+ ReplayGainInfo &info)
{
/* we only care about utf-8 text tags */
if ((flags & (0x3 << 1)) != 0)
@@ -43,27 +43,27 @@ replay_gain_ape_callback(unsigned long flags, const char *key,
value[value_length] = 0;
if (StringEqualsCaseASCII(key, "replaygain_track_gain")) {
- info->tuples[REPLAY_GAIN_TRACK].gain = atof(value);
+ info.tuples[REPLAY_GAIN_TRACK].gain = atof(value);
return true;
} else if (StringEqualsCaseASCII(key, "replaygain_album_gain")) {
- info->tuples[REPLAY_GAIN_ALBUM].gain = atof(value);
+ info.tuples[REPLAY_GAIN_ALBUM].gain = atof(value);
return true;
} else if (StringEqualsCaseASCII(key, "replaygain_track_peak")) {
- info->tuples[REPLAY_GAIN_TRACK].peak = atof(value);
+ info.tuples[REPLAY_GAIN_TRACK].peak = atof(value);
return true;
} else if (StringEqualsCaseASCII(key, "replaygain_album_peak")) {
- info->tuples[REPLAY_GAIN_ALBUM].peak = atof(value);
+ info.tuples[REPLAY_GAIN_ALBUM].peak = atof(value);
return true;
} else
return false;
}
bool
-replay_gain_ape_read(const char *path_fs, struct replay_gain_info *info)
+replay_gain_ape_read(const char *path_fs, ReplayGainInfo &info)
{
bool found = false;
- auto callback = [info, &found]
+ auto callback = [&info, &found]
(unsigned long flags, const char *key,
const char *value,
size_t value_length) {
diff --git a/src/tag/ApeReplayGain.hxx b/src/tag/ApeReplayGain.hxx
index 4bc34a9d2..f40523550 100644
--- a/src/tag/ApeReplayGain.hxx
+++ b/src/tag/ApeReplayGain.hxx
@@ -22,9 +22,9 @@
#include "check.h"
-struct replay_gain_info;
+struct ReplayGainInfo;
bool
-replay_gain_ape_read(const char *path_fs, struct replay_gain_info *info);
+replay_gain_ape_read(const char *path_fs, ReplayGainInfo &info);
#endif
diff --git a/src/tag/TagRva2.cxx b/src/tag/TagRva2.cxx
index 071e3a443..204001aa7 100644
--- a/src/tag/TagRva2.cxx
+++ b/src/tag/TagRva2.cxx
@@ -73,7 +73,7 @@ rva2_float_volume_adjustment(const struct rva2_data *data)
}
static inline bool
-rva2_apply_data(struct replay_gain_info *replay_gain_info,
+rva2_apply_data(ReplayGainInfo &rgi,
const struct rva2_data *data, const id3_latin1_t *id)
{
if (data->type != CHANNEL_MASTER_VOLUME)
@@ -82,19 +82,19 @@ rva2_apply_data(struct replay_gain_info *replay_gain_info,
float volume_adjustment = rva2_float_volume_adjustment(data);
if (strcmp((const char *)id, "album") == 0) {
- replay_gain_info->tuples[REPLAY_GAIN_ALBUM].gain = volume_adjustment;
+ rgi.tuples[REPLAY_GAIN_ALBUM].gain = volume_adjustment;
} else if (strcmp((const char *)id, "track") == 0) {
- replay_gain_info->tuples[REPLAY_GAIN_TRACK].gain = volume_adjustment;
+ rgi.tuples[REPLAY_GAIN_TRACK].gain = volume_adjustment;
} else {
- replay_gain_info->tuples[REPLAY_GAIN_ALBUM].gain = volume_adjustment;
- replay_gain_info->tuples[REPLAY_GAIN_TRACK].gain = volume_adjustment;
+ rgi.tuples[REPLAY_GAIN_ALBUM].gain = volume_adjustment;
+ rgi.tuples[REPLAY_GAIN_TRACK].gain = volume_adjustment;
}
return true;
}
static bool
-rva2_apply_frame(struct replay_gain_info *replay_gain_info,
+rva2_apply_frame(ReplayGainInfo &replay_gain_info,
const struct id3_frame *frame)
{
const id3_latin1_t *id = id3_field_getlatin1(id3_frame_field(frame, 0));
@@ -133,7 +133,7 @@ rva2_apply_frame(struct replay_gain_info *replay_gain_info,
}
bool
-tag_rva2_parse(struct id3_tag *tag, struct replay_gain_info *replay_gain_info)
+tag_rva2_parse(struct id3_tag *tag, ReplayGainInfo &replay_gain_info)
{
bool found = false;
diff --git a/src/tag/TagRva2.hxx b/src/tag/TagRva2.hxx
index 016a3585d..98154041a 100644
--- a/src/tag/TagRva2.hxx
+++ b/src/tag/TagRva2.hxx
@@ -23,7 +23,7 @@
#include "check.h"
struct id3_tag;
-struct replay_gain_info;
+struct ReplayGainInfo;
/**
* Parse the RVA2 tag, and fill the #replay_gain_info struct. This is
@@ -32,6 +32,6 @@ struct replay_gain_info;
* @return true on success
*/
bool
-tag_rva2_parse(struct id3_tag *tag, struct replay_gain_info *replay_gain_info);
+tag_rva2_parse(struct id3_tag *tag, ReplayGainInfo &replay_gain_info);
#endif