Op wo 16 okt 2024 om 16:25 schreef Stefan Oltmanns <stefan-oltma...@gmx.net>: > > Yes, overwriting the streaminfo total_samples number is a bit of a hack, > but it would only affect those files with more than 2^36 samples that > contains the special seek point, so no difference for the average flac user. > > Not sure how the applications actually read flac files, if they start > using the total_samples number before the seektable is parsed or if > libflac can indicate that the streaminfo is not yet complete. >
libFLAC reads a file from start to back, and returns data to the client as soon as it is done parsing. So, it first encounters a streaminfo metadata block, sends that to the application, then starts on the seektable etc. In fact, for a lot of applications, the seek table is simply ignored because libFLAC uses it internally. I don't know how libFLAC should indicate that streaminfo isn't complete yet, but I'd say getting applications to understand that is more work than them just supporting a new function that returns the total number of samples. > > The main reason is not listening to those files (but that's not only for > debugging, but very helpful just to quick check if there is a signal or > just silence/noise), but that you can use audio tools for inspecting > (waveform or spectrum/fft), cutting, low/high/band pass etc. > Fair enough. _______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev