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.1\examples\cpp\decode\file\.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 ________________________________________________________ A c?gek itt keresnek t?ged – te hol keresed ?ket? [origo] ?ll?s http://cthandler.adverticum.net/?cturl=http%3A%2F%2Fjpt.hu%2Forigo%2Findex.php%3Fpage%3Dselectform%26fm_levelalja -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20070926/0414b207/attachment.htm
?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.1\examples\cpp\decode\file\.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 > > got 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 thatfile_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 ________________________________________________________ A c?gek itt keresnek t?ged – te hol keresed ?ket? [origo] ?ll?s http://cthandler.adverticum.net/?cturl=http%3A%2F%2Fjpt.hu%2Forigo%2Findex.php%3Fpage%3Dselectform%26fm_levelalja -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20070926/7b7a8966/attachment.html
?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.1\examples\cpp\decode\file\.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 > > 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 c?gek itt keresnek t?ged – te hol keresed ?ket? [origo] ?ll?s http://cthandler.adverticum.net/?cturl=http%3A%2F%2Fjpt.hu%2Forigo%2Findex.php%3Fpage%3Dselectform%26fm_levelalja -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20070927/0d25225c/attachment.htm