aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-01-03 22:54:25 +0100
committerMax Kellermann <max@duempel.org>2010-01-04 20:42:49 +0100
commite58b4f773f28ad7b8e26c14c9c853fc2798408a1 (patch)
tree41f60b492b4c20c174f944cf01b8d3c4332a933a
parent604ca50b6545550a25b1b9765ff3016885671be9 (diff)
downloadmpd-e58b4f773f28ad7b8e26c14c9c853fc2798408a1.tar.gz
mpd-e58b4f773f28ad7b8e26c14c9c853fc2798408a1.tar.xz
mpd-e58b4f773f28ad7b8e26c14c9c853fc2798408a1.zip
replay_gain: added function replay_gain_info_dup()
-rw-r--r--src/replay_gain.c6
-rw-r--r--src/replay_gain.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/replay_gain.c b/src/replay_gain.c
index 6c976c892..482cd4bd3 100644
--- a/src/replay_gain.c
+++ b/src/replay_gain.c
@@ -162,6 +162,12 @@ struct replay_gain_info *replay_gain_info_new(void)
return ret;
}
+struct replay_gain_info *
+replay_gain_info_dup(const struct replay_gain_info *src)
+{
+ return g_memdup(src, sizeof(*src));
+}
+
void replay_gain_info_free(struct replay_gain_info *info)
{
g_free(info);
diff --git a/src/replay_gain.h b/src/replay_gain.h
index e0f7d0309..b26512975 100644
--- a/src/replay_gain.h
+++ b/src/replay_gain.h
@@ -50,6 +50,12 @@ struct replay_gain_info {
struct replay_gain_info *
replay_gain_info_new(void);
+/**
+ * Duplicate a #replay_gain_info object.
+ */
+struct replay_gain_info *
+replay_gain_info_dup(const struct replay_gain_info *src);
+
void replay_gain_info_free(struct replay_gain_info *info);
void replay_gain_global_init(void);