I found a bug with FLAC v0.6 raw encoding. It appears that the file pointer in the source file is not reset after seeking to the end for checking the size. I've attached a patch. I'm excited about FLAC!! I've been looking for a good GPL lossless RAW audio compressor for use with sound fonts. Sound font files contain 16 bit samples that are word aligned, so just treating it as raw audio does quite well. I've already tested it on one sound font, and it beat sfArk by a few K. It would be neat to add support to my application the Smurf Sound Font Editor (http://smurf.sourceforge.net) for FLAC sound font compression. Lates.. Josh Green -------------- next part -------------- *** encode.c~ Sat Jan 27 22:30:37 2001 --- encode.c Fri Feb 2 07:10:12 2001 *************** *** 394,399 **** --- 394,400 ---- } } } + else fseek (fin, 0, SEEK_SET); if(!init_encoder(lax, do_mid_side, loose_mid_side, do_exhaustive_model_search, do_qlp_coeff_prec_search, rice_optimization_level, max_lpc_order, blocksize, qlp_coeff_precision, channels, bps, sample_rate, &encoder_wrapper)) goto raw_abort_;
On Fri, 2 Feb 2001, Josh Coalson wrote:> sounds great. I've been thinking about adding a > 'what uses FLAC' set of links to the web page... > please keep me posted.The latest version of my cue+wav splitter supports .flac files. Hope to get it released this weekend. Will eventually be at: www.lameb.fsnet.co.uk It also supports .shn and .ape. I've seen shorten compress a whole CD over 100MB larger than flac! That's not useful when you're trying to fit multiple cue+wav onto one data CD. And .ape, well it's written by one fella that won't release his source. I don't want CDs full of .ape files that I can't get at in a future OS :( I already can't under FreeBSD. I just put support in there for Windows weenies :) that don't look that far. Flac rocks. The biggest bugbear for me is the speed, but I know that's a lot of work to sort. Later. Mark Powell - UNIX System Administrator - The University of Salford Academic Information Services, Clifford Whitworth Building, Salford University, Manchester, M5 4WT, UK. Tel: +44 161 295 5936 Fax: +44 161 295 5888 www.pgp.com for PGP key
--- Josh Green <jgreen@users.sourceforge.net> wrote:> I found a bug with FLAC v0.6 raw encoding. It > appears that the file > pointer in the source file is not reset after > seeking to the end for > checking the size. I've attached a patch. >thanks, I patched it into CVS> I'm excited about FLAC!! I've been looking for a > good GPL lossless RAW > audio compressor for use with sound fonts. Sound > font files contain 16 > bit samples that are word aligned, so just treating > it as raw audio does > quite well. I've already tested it on one sound > font, and it beat sfArk > by a few K. It would be neat to add support to my > application the Smurf > Sound Font Editor (http://smurf.sourceforge.net) for > FLAC sound font > compression.sounds great. I've been thinking about adding a 'what uses FLAC' set of links to the web page... please keep me posted. thanks, Josh __________________________________________________ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
On Fri, 2 Feb 2001, Josh Green wrote:> I found a bug with FLAC v0.6 raw encoding. It appears that the file > pointer in the source file is not reset after seeking to the end for > checking the size. I've attached a patch.What's the impact? Do I have bad .flac files?> I'm excited about FLAC!! I've been looking for a good GPL lossless RAW > audio compressor for use with sound fonts. Sound font files contain 16 > bit samples that are word aligned, so just treating it as raw audio does > quite well. I've already tested it on one sound font, and it beat sfArk > by a few K. It would be neat to add support to my application the Smurf > Sound Font Editor (http://smurf.sourceforge.net) for FLAC sound font > compression. Lates..Keep it up, mate. A+ Mark Powell - UNIX System Administrator - The University of Salford Academic Information Services, Clifford Whitworth Building, Salford University, Manchester, M5 4WT, UK. Tel: +44 161 295 5936 Fax: +44 161 295 5888 www.pgp.com for PGP key
Mark Powell wrote:> > On Fri, 2 Feb 2001, Josh Green wrote: > > > I found a bug with FLAC v0.6 raw encoding. It appears that the file > > pointer in the source file is not reset after seeking to the end for > > checking the size. I've attached a patch. > > What's the impact? Do I have bad .flac files? >Well I guess you could say "bad". Since the file pointer is at the end of the file, it doesn't encode any of the audio data, but still writes a .flac file. You would probably notice this :) Only with raw data encoding though. Lates.. Josh Green
> > I found a bug with FLAC v0.6 raw encoding. It > appears that the file > > pointer in the source file is not reset after > seeking to the end for > > checking the size. I've attached a patch. > > What's the impact? Do I have bad .flac files? >If you are piping raw samples in, no. The bug only occurs when you give an input file AND use -fr. In that case the encoder will stop immediately after writing only the header. The output will look something like: 0.00% complete: frame 0, wrote 42 bytes, 0 of 230389 samples, ratio = Inf unfortunately the exit code is still 0 in this case, so if you are running silent from a script you might not notice. this is probably a good point to remind everyone that FLAC is still beta so don't delete your originals! everyone here has been good about it but I'm dreading that message from someone who lost all their stuff. Josh __________________________________________________ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/