[Flac-dev] problem with seek_absolute in libFLAC++

Josh Coalson xflac at yahoo.com
Wed Jun 19 16:54:03 PDT 2002


--- David Collett <jg at webone.com.au> wrote:
> Hello,
> I have been changing my (C++)program over to the new FLAC++ API which
> 
> has gone relatively smoothly.
> 
> However, the function seek_absolute() (from the FLAC::Decoder::File 
> class) does not seem to work. It always returns false and doesnt seek
> at 
> all. Using gdb, I have narrowed down the problem somewhat, but being
> the 
> novice programmer that I am, I still don't know whats wrong.
> 
> When I call the seek_absolute() function eg.
> 
> seek_absolute(3561525);
> 
> and step inside it with gdb, then print the value of "sample" (the 
> arguement), it is NOT 3561525, rather it is some huge number like 
>  4621539102901141517.
> 
> I figure it could be something to do with types or something, 
> seek_absolute expects a FLAC__uint64, I have tried a few things along
> 
> this line without success eg.
> 
> FLAC__uint64 seekpos = 3561525;
> seek_absolute(seekpos);
> 
> doesn't work either.
> 
> Does anyone know what this problem is, or has anyone else had problem
> with seek_absolute of the C++ File decoder class ??

hmm... did the unit tests pass?  they do seek_absolute
calls and fail if they return false.  does the C version
work?  because the C++ method just calls the C function
directly.

anyway, I'll look into it too.

Josh


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com




More information about the Flac-dev mailing list