aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);