Re: [Flac-dev] FLAC__stream_decoder_process_single and FLAC__STREAM_DECODER_END_OF_STREAM
Josh Coalson wrote: > > I get an infinite loop. Shouldn't FLAC__stream_decoder_process_single > > return false if it gets to FLAC__STREAM_DECODER_END_OF_STREAM? > > it supposed to be like that actually, there's a little explanation > here: > > http://flac.sourceforge.net/api/group__flac__stream__decoder.html#ga45 Ok, I've read that and I agree that the behaviour I'm seeing matches that documentation However, I still don't understand why FLAC__stream_decoder_process_single() returns false when an error has occurred, but true when the read callback returns FLAC__STREAM_DECODER_END_OF_STREAM? Why isn't end of stream treated like any other error? Erik -- - Erik de Castro Lopo - "If you have one apple and I have one apple, if we exchange, each will have one apple. If you have one idea and i have one idea, if we exchange them, each will have two ideas!" -- Attributed the George Bernard Shaw ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [Flac-dev] PATCH : Fix missing protoypes
Erik de Castro Lopo wrote: > I can play with this over the weekend if you like and come up > with a new patch for configure.ac. Here's a much cleaner patch which only adds -Wmissing-prototypes and -Wstrict-prototypes to CFLAGS, not to CXXFLAGS. Cheers, Erik 8<8< diff -u -r1.144 configure.in --- configure.in7 Jul 2007 06:10:35 - 1.144 +++ configure.in25 Jul 2007 09:08:00 - @@ -281,9 +281,10 @@ OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -DNDEBUG" if test "x$GCC" = xyes; then OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -O3 -funroll-loops -finline-functions -Wall -W -Winline -DFLaC__INLINE=__inline__" + OUR_C_ONLY_CFLAGS="-Wmissing-prototypes -Wstrict-prototypes" fi fi -CFLAGS="$OUR_CFLAGS_HEAD $CFLAGS" +CFLAGS="$OUR_CFLAGS_HEAD $OUR_C_ONLY_CFLAGS $CFLAGS" CXXFLAGS="$OUR_CFLAGS_HEAD $CXXFLAGS" #@@@ 8<8< -- - Erik de Castro Lopo - Percussive Maintenance: The fine art of whacking the c**p out of an electronic device to get it to work again. ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [Flac-dev] Is FLAC__stream_decoder_seek_absolute working for OggFlac?
Josh Coalson wrote: > --- Erik de Castro Lopo <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > > Is seeking working for OggFlac files? I keep on getting a > > FLAC__STREAM_DECODER_SEEK_ERROR. > > yes, it should work fine. in flac/src/test_seeking/main.c there > is an example usage of FLAC__stream_decoder_seek_absolute(). you > could try compiling it and running test_seeking on it. if if fails > maybe there is a bug that your stream is triggering. Ok, running the command: src/test_seeking/test_seeking flac_char.ogg resulted in: +++ seek test: FLAC__StreamDecoder (Ogg FLAC, read_mode=0) file's total_samples is 0 Begin seek barrage, count=0 #0:seek(0)... seek failed, assuming it was past EOF... OK #1:seek(1)... seek failed, assuming it was past EOF... OK #2:seek(2)... seek failed, assuming it was past EOF... OK #3:seek(3)... seek failed, assuming it was past EOF... OK #4:seek(4)... seek failed, assuming it was past EOF... OK #5:seek(5)... seek failed, assuming it was past EOF... OK #6:seek(6)... seek failed, assuming it was past EOF... OK #7:seek(7)... seek failed, assuming it was past EOF... OK #8:seek(8)... seek failed, assuming it was past EOF... OK #9:seek(9)... seek failed, assuming it was past EOF... OK #10:seek(2332)... seek failed, assuming it was past EOF... OK #11:seek(2331)... seek failed, assuming it was past EOF... OK #12:seek(2330)... seek failed, assuming it was past EOF... OK #13:seek(2329)... seek failed, assuming it was past EOF... OK and so on. The test file is here: http://www.mega-nerd.com/tmp/flac_char.ogg Erik -- - Erik de Castro Lopo - "C++ is a language strongly optimized for liars and people who go by guesswork and ignorance." -- Erik Naggum ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [Flac-dev] FLAC__stream_decoder_process_single and FLAC__STREAM_DECODER_END_OF_STREAM
I haven't studied this thoroughly, but perhaps the return code is supposed to distinguish bad streams from good streams. Every stream must end eventually, but that does not mean there is an error with the stream. You're wanting a return code that tells you whether to continue processing blocks or stop, regardless of whether or not there was an error ... the API is providing a return code that tells you whether the stream is good or bad, with no indication of whether or not the stream has ended. Brian Willoughby Sound Consulting On Jul 25, 2007, at 01:42, Erik de Castro Lopo wrote: However, I still don't understand why FLAC__stream_decoder_process_single() returns false when an error has occurred, but true when the read callback returns FLAC__STREAM_DECODER_END_OF_STREAM? Why isn't end of stream treated like any other error? Erik ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[Flac-dev] building flac 1.2.0 on OS X
I just tried to build 1.2 on my Macbook i ran configure with the following arguments (like i have in the past) ./configure --enable-static --disable-asm-optimizations --disable-shared then "make: i get the following error: encode.c: In function 'convert_to_seek_table_template': encode.c:2181: error: 'struct ' has no member named 'use_ogg' make[3]: *** [encode.o] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Anyone know what's going on? Thanks, Scott ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [Flac-dev] building flac 1.2.0 on OS X
--- Brian Willoughby wrote: Did you build and install libOgg first? What is the output of ./configure before you run make? --- end of quote --- i've never had to build libOgg before (won't be back to my machine until tomorrow so I can't post the output until then) Thanks, Scott ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [Flac-dev] building flac 1.2.0 on OS X
damn, I see the problem. there needs to be an #if FLAC__HAS_OGG nearby, like so: if(num_requested_seek_points < 0) { #if FLAC__HAS_OGG /*@@ workaround ogg bug: too many seekpoints makes table not fit in one page */ if(e->use_ogg && e->total_samples_to_encode > 0 && e->total_samples_to_encode / e->sample_rate / 10 > 230) requested_seek_points = "230x;"; else #endif requested_seek_points = "10s;"; num_requested_seek_points = 1; } --- "Scott C. Brown 02" <[EMAIL PROTECTED]> wrote: > I just tried to build 1.2 on my Macbook > > > i ran configure with the following arguments (like i have in the > past) > > ./configure --enable-static --disable-asm-optimizations > --disable-shared > > then "make: > > i get the following error: > > encode.c: In function 'convert_to_seek_table_template': > encode.c:2181: error: 'struct ' has no member named > 'use_ogg' > make[3]: *** [encode.o] Error 1 > make[2]: *** [all-recursive] Error 1 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > > > > Anyone know what's going on? > > Thanks, > Scott Get the free Yahoo! toolbar and rest assured with the added security of spyware protection. http://new.toolbar.yahoo.com/toolbar/features/norton/index.php ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [Flac-dev] building flac 1.2.0 on OS X
Did you build and install libOgg first? What is the output of ./configure before you run make? Brian Willoughby Sound Consulting On Jul 25, 2007, at 14:45, Scott C. Brown 02 wrote: I just tried to build 1.2 on my Macbook i ran configure with the following arguments (like i have in the past) ./configure --enable-static --disable-asm-optimizations --disable-shared then "make: i get the following error: encode.c: In function 'convert_to_seek_table_template': encode.c:2181: error: 'struct ' has no member named 'use_ogg' make[3]: *** [encode.o] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Anyone know what's going on? Thanks, Scott ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [Flac-dev] building flac 1.2.0 on OS X
--- Josh Coalson wrote: damn, I see the problem. there needs to be an #if FLAC__HAS_OGG nearby, like so: if(num_requested_seek_points < 0) { #if FLAC__HAS_OGG /*@@ workaround ogg bug: too many seekpoints makes table not fit in one page */ if(e->use_ogg && e->total_samples_to_encode > 0 && e->total_samples_to_encode / e->sample_rate / 10 > 230) requested_seek_points = "230x;"; else #endif requested_seek_points = "10s;"; num_requested_seek_points = 1; } --- end of quote --- that worked. thanks! ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev