diff src/psf2/plugin.c @ 2752:cd2d2118fdee

Fix length calculation to include fades.
author William Pitcock <nenolod@atheme.org>
date Mon, 30 Jun 2008 23:52:43 -0500
parents 533d73cfa1ff
children be414d015fec
line wrap: on
line diff
--- a/src/psf2/plugin.c	Mon Jun 30 23:50:51 2008 -0500
+++ b/src/psf2/plugin.c	Mon Jun 30 23:52:43 2008 -0500
@@ -88,7 +88,7 @@
 
 	t = aud_tuple_new_from_filename(filename);
 
-	aud_tuple_associate_int(t, FIELD_LENGTH, NULL, psfTimeToMS(c->inf_length));
+	aud_tuple_associate_int(t, FIELD_LENGTH, NULL, c->inf_length ? psfTimeToMS(c->inf_length) + psfTimeToMS(c->inf_fade) : -1);
 	aud_tuple_associate_string(t, FIELD_ARTIST, NULL, c->inf_artist);
 	aud_tuple_associate_string(t, FIELD_ALBUM, NULL, c->inf_game);
 	aud_tuple_associate_string(t, -1, "game", c->inf_game);