[Flac-dev] [st.n@gmx.net: Bug#200435: xmms-flac: doesn't properly support long files]

Steven Richman junk+flac at shift9.com
Tue Jul 8 14:19:01 PDT 2003


> > -		file_info->length_in_msec = file_info->total_samples * 10 / (file_info->sample_rate / 100);
> > +		file_info->length_in_msec = (FLAC__uint64)file_info->total_samples * 10 / (file_info->sample_rate / 100);
...
> It seems like would be simpler to do something like:
> 
> (file_info->total_samples / file_info->sample_rate) * 1000;

Without a float cast, this truncates the length so it's always a multiple
of 1000ms. That's cool now, but it wouldn't be if the xmms gui changed to
display track lengths with, say, tenth-of-a-second precision.

,steven.





More information about the Flac-dev mailing list