|
List Info
Thread: Re: libFLAC++ Seeking
|
|
| Re: libFLAC++ Seeking |
  Hungary |
2007-09-27 13:11:58 |
|
írta:
írta:
Hello,
I've a problem with seeking using libFLAC++ API. The call to seek_absolute always returns with false, whatever I do.
I tried many different ways, finally I tried to reduce my added code to near zero, so I used the cpp decode example in ...flac-1.2.1examplescppdecodefile.main.cpp and added only one line:
bool b=decoder.seek_absolute(1000);
right before
ok = decoder.process_until_end_of_stream();
seek_absolute always returns false. I'm pretty sure I missed something and otherwise this works fine. One more thing. I complied the 1.2.1 sources with msvc6 sp6 and this works with debug libs...
Any hints?
Thanks, Istvan
Sorry, I forgot to mention, I tried with original flac-1.2.1-devel-win precompiled binaries, as well as with my builds. I created a build with some debug info added to release version, it seems that
file_length_callback_ in stream_decoder.c returns FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR, fstat returns !=0, but that sounds very strange, as the file is already opened and playable otherwise...
Istvan
I still couldn't figure out why's that, but finally I changed file_length_callback_ in stream_decoder.c; replaced fno/fstat with fseek(f,0,SEEK_END)/fgetpos pair and now it works perfectly.
___________________________ A L E G J O B B A U T Ó K, T E S Z T E K, H Í R E K az automenedzser.hu-n.
|
| Re: libFLAC++ Seeking |
  Hungary |
2007-09-28 10:10:16 |
|
írta:
írta:
írta:
Hello,
I've a problem with seeking using libFLAC++ API. The call to seek_absolute always returns with false, whatever I do.
I tried many different ways, finally I tried to reduce my added code to near zero, so I used the cpp decode example in ...flac-1.2.1examplescppdecodefile.main.cpp and added only one line:
bool b=decoder.seek_absolute(1000);
right before
ok = decoder.process_until_end_of_stream();
seek_absolute always returns false. I'm pretty sure I missed something and otherwise this works fine. One more thing. I complied the 1.2.1 sources with msvc6 sp6 and this works with debug libs...
Any hints?
Thanks, Istvan
Sorry, I forgot to mention, I tried with original flac-1.2.1-devel-win precompiled binaries, as well as with my builds. I created a build with some debug info added to release version, it seems that
file_length_callback_ in stream_decoder.c returns FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR, fstat returns !=0, but that sounds very strange, as the file is already opened and playable otherwise...
Istvan
I still couldn't figure out why's that, but finally I changed file_length_callback_ in stream_decoder.c; replaced fno/fstat with fseek(f,0,SEEK_END)/fgetpos pair and now it works perfectly.
I'm again. Finally, I figured out that file_length_callback in stream_decoder.c should use _fstat rather than fstat. Now it works with release version, too. For handling 64bit filesizes in msvc6 probably the _filelengthi64 call is the best (_fstati64 does not supported by vc6). Istvan
___________________________ ÉRTÉKESÍTÉS, INFORMATIKA, PÉNZÜGY. 2800 ÁLLÁS az új jobline-on. Keress jobban!
|
[1-2]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|