írta: <br /><br /><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">írta: <br /><br /><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello, <br /><br />I've a problem with seeking using libFLAC++ API.<br />The call to seek_absolute always returns with false, whatever I do.<br /><br />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.1\examples\cpp\decode\file\.main.cpp and added only one line:<br /><br />bool b=decoder.seek_absolute(1000);<br /><br />right before <br /><br />ok = decoder.process_until_end_of_stream();<br /><br />seek_absolute always returns false.<br />I'm pretty sure I missed something and otherwise this works fine.<br />One more thing. I complied the 1.2.1 sources with msvc6 sp6 and this works with debug libs...<br /><br />Any hints?<br /><br />Thanks,<br />Istvan<br /><br /></blockquote>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 <br /><br />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...<br /><br />Istvan<br /> <br /></blockquote>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. <br /><br /><br /><br /><br />
<br><br>___________________________<br><a href="http://ad.adverticum.net/b/cl,1,6022,207046,257945/click.prm" target=new">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. </a>