From 9d4947ccc83b5a3efaf5307991b6f8a08a53f02c Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Thu, 24 Sep 2009 20:39:54 +0200 Subject: vorbis replay gain support --- plugins/vorbis/vorbis.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'plugins/vorbis/vorbis.c') diff --git a/plugins/vorbis/vorbis.c b/plugins/vorbis/vorbis.c index bb778304..b854356a 100644 --- a/plugins/vorbis/vorbis.c +++ b/plugins/vorbis/vorbis.c @@ -202,6 +202,18 @@ cvorbis_insert (DB_playItem_t *after, const char *fname) { else if (!strncasecmp (vc->user_comments[i], "date=", 5)) { deadbeef->pl_add_meta (it, "date", vc->user_comments[i] + 5); } + else if (!strncasecmp (vc->user_comments[i], "replaygain_album_gain=", 22)) { + it->replaygain_album_gain = atof (vc->user_comments[i] + 22); + } + else if (!strncasecmp (vc->user_comments[i], "replaygain_album_peak=", 22)) { + it->replaygain_album_peak = atof (vc->user_comments[i] + 22); + } + else if (!strncasecmp (vc->user_comments[i], "replaygain_track_gain=", 22)) { + it->replaygain_track_gain = atof (vc->user_comments[i] + 22); + } + else if (!strncasecmp (vc->user_comments[i], "replaygain_track_peak=", 22)) { + it->replaygain_track_peak = atof (vc->user_comments[i] + 22); + } } } if (!title_added) { -- cgit v1.2.3