nguillaumin / jflac

Forked from SourceForge
http://jflac.sourceforge.net/
Other
25 stars 10 forks source link

Add seek function to FLACDecoder #6

Closed alexhk90 closed 9 years ago

alexhk90 commented 9 years ago

Add seek() function to FLACDecoder, to allow repositioning of the file pointer at a given sample position. The current implementation will seek to the frame containing the requested absolute sample offset from the start of the file, using the SeekTable in the FLAC metadata where available.

After calling seek(), the client calls readFrame() / decodeFrame() as normal to retrieve the decoded audio data for the frame which contains the requested sample position.