comparison 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
comparison
equal deleted inserted replaced
2751:533d73cfa1ff 2752:cd2d2118fdee
86 if (corlett_decode(buf, sz, NULL, NULL, &c) != AO_SUCCESS) 86 if (corlett_decode(buf, sz, NULL, NULL, &c) != AO_SUCCESS)
87 return NULL; 87 return NULL;
88 88
89 t = aud_tuple_new_from_filename(filename); 89 t = aud_tuple_new_from_filename(filename);
90 90
91 aud_tuple_associate_int(t, FIELD_LENGTH, NULL, psfTimeToMS(c->inf_length)); 91 aud_tuple_associate_int(t, FIELD_LENGTH, NULL, c->inf_length ? psfTimeToMS(c->inf_length) + psfTimeToMS(c->inf_fade) : -1);
92 aud_tuple_associate_string(t, FIELD_ARTIST, NULL, c->inf_artist); 92 aud_tuple_associate_string(t, FIELD_ARTIST, NULL, c->inf_artist);
93 aud_tuple_associate_string(t, FIELD_ALBUM, NULL, c->inf_game); 93 aud_tuple_associate_string(t, FIELD_ALBUM, NULL, c->inf_game);
94 aud_tuple_associate_string(t, -1, "game", c->inf_game); 94 aud_tuple_associate_string(t, -1, "game", c->inf_game);
95 aud_tuple_associate_string(t, FIELD_TITLE, NULL, c->inf_title); 95 aud_tuple_associate_string(t, FIELD_TITLE, NULL, c->inf_title);
96 aud_tuple_associate_string(t, FIELD_COPYRIGHT, NULL, c->inf_copy); 96 aud_tuple_associate_string(t, FIELD_COPYRIGHT, NULL, c->inf_copy);