WAV track length
Lukáš Lalinský
lalinsky at gmail.com
Sun Jul 11 11:39:34 CEST 2010
On Sun, Jul 4, 2010 at 2:45 AM, Brett Hoyle <kickbits at gmail.com> wrote:
> Ok the attached works.
>
> Added setlength to wavproperties.cpp/h:
> void RIFF::WAV::Properties::setlength(int length)
> {
> d->length = length;
> }
>
> And this to the bottom of wavfile.cpp:
> else if(chunkName(i) == "data" && readProperties)
> {
> if(d->properties->bitrate() != 0 )
> d->properties->setlength(chunkData(i).size() / (d->properties->bitrate()
> / 8 * 1024));
> }
Thanks, I've committed a similar patch to SVN. The main difference is
that it doesn't actually read the data, but uses the size from the
chunk header.
Lukas
More information about the taglib-devel
mailing list