Displaying 1 result from an estimated 1 matches for "flac__stream_decoder_seek_prepar".
Did you mean:
  flac__stream_decoder_seek_prepare
  
2015 Jun 16
0
Low-level seek routines in libFLAC
...unction seek_to_absolute_sample_() into 2 public functions (they are shown below).  seek_to_absolute_sample_() can be easily modified to use those functions, and we won't change its behaviour.
The user code that uses those functions might look like this:
void foo()
{
  FLAC__uint64 offset;
  FLAC__stream_decoder_seek_prepare(decoder, target_sample, stream_length);
  for (;;) {
  
    FLAC__stream_decoder_seek(decoder, &offset);
    my_seek(file, offset);
    FLAC__stream_decoder_process_single(decoder);
	 if /* write() callback was called - seek has been completed */ {
  	   puts("seek OK");
  	   bre...