Re: [flac-dev] Seek failure with very short files

2016-12-07 Thread Robert Kausch
Hi Luke, You need to set *bytes to the number of bytes actually read in read_callback. After that, you can drop your special handling of uBytesRemaining == 0 in tell_callback. It's not necessary. Also, on Windows at least, you need to pass O_BINARY when opening the file and open the FILE poi

Re: [flac-dev] Seek failure with very short files

2016-12-07 Thread Luke Bradford
Hi all, Thanks in advance for your help, and sorry for the slow reply. I've created a small OS X example project that reproduces the issue. (I've run into the size limit for emails on this list so I've put it on Google

Re: [flac-dev] Seek failure with very short files

2016-11-21 Thread Luke Bradford
Hi, Thank you both for your replies. I will try to put together a repro case when I get a chance. In our case, we are recording audio directly into FLAC files, so they can end up with very short durations. Since I sent my first email, I have also seen this reproduce with longer files. Thanks, L

Re: [flac-dev] Seek failure with very short files

2016-11-21 Thread Federico Miyara
I was wondering when it would be useful to compress very short audio files. The answer may be when there are lots of files, for instance in the case of sound fonts, or a large collection of transients. Probably it would be better to compress the whole collection as a single large file obtaine

Re: [flac-dev] Seek failure with very short files

2016-11-21 Thread Erik de Castro Lopo
Luke Bradford wrote: > I am not set up to easily put together a minimal repro, but I can work on > that if this is difficult for others to reproduce. I was hoping to tackle this last weekend but I didn't manage to find time. A small test case would be very useful indeed. Erik -- ---

[flac-dev] Seek failure with very short files

2016-11-15 Thread Luke Bradford
Hi! We are using libFLAC++ in our project for both encoding and decoding. I've found an issue where ::FLAC::Decoder::Stream::seek_absolute() fails with very short files (less than 2500 frames or so.) I've attached an example of such a file. The failure case is in stream_decoder.c, line 3071. The