Re: C API: How to get a seektable for very long files?
Martijn van Beurden <[email protected]> Wed, 16 Oct 2024 19:46:37 +0200
| Newsgroups | gmane.comp.audio.compression.flac.devel |
|---|---|
| Message-ID | <CADQbU69LKsuX2ay5WCKibnFDWz1KBrfNwAM=T__oaw1B1Q+cxQ@mail.gmail.com> |
Op wo 16 okt 2024 om 16:25 schreef Stefan Oltmanns <[email protected]>: > > 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.