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

Matt Zimmerman mdz at debian.org
Tue Jul 8 14:23:13 PDT 2003


On Tue, Jul 08, 2003 at 05:17:50PM -0400, Steven Richman wrote:

> > > -		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.

This seems no worse than the fact that the sampling rate ends up being
rounded to the nearest multiple of 100, but I see your point.

-- 
 - mdz




More information about the Flac-dev mailing list