[Flac-dev] slow FLAC__file_decoder_seek_absolute()...

Brendan Dowling crypt at phatnoise.com
Fri Jan 25 16:37:02 PST 2002


I have a new idea for speeding up seeking.  Would it help if I were to
decode a few frames (and throw away the decoded data) before doing the 
FLAC__file_decoder_seek_absolute() call?  This would be so that the
decoder object could prime its min_framesize and max_framesize
variables.  



Brendan Dowling
Embedded Systems Engineer
Phatnoise, Inc.




On Thu, Jan 17, 2002 at 05:46:00PM -0800, Brendan Dowling wrote:
> Hi,
> 
> I checked the archives, but I didn't find anything regarding this
> problem.  FLAC__file_decoder_seek_absolute takes an incredibly long time
> to seek.  What can I do about this?  How do I fix it?
> 
> Here's how I'm calling the function:
> 
> 
> if (argc > 2) {
> 	secs = atoi(argv[2]);
> 	seek_point = (FLAC__uint64) secs * sample_rate;
> 	printf("seeking to %d:%02d\n", secs/60, secs%60);
> 
> 	flac_status = FLAC__file_decoder_seek_absolute(decoder, seek_point);
> 
> 	if (flac_status) printf("seek absolute = %d\n", flac_status);
> }
> 	
> FLAC__file_decoder_process_remaining_frames(decoder);
> 
> 
> 
> Thanks,
> 
> Brendan Dowling
> 
> 
> p.s., I am making a simple FLAC file player that runs on the Phatnoise 
> Car Audio System (see http://www.phatnoise.com/ for more info).
> 
> ---
> Brendan Dowling
> crypt at phatnoise.com
> Phatnoise, Inc.
> http://www.phatnoise.com/
> 
> 
> 
> 
> _______________________________________________
> Flac-dev mailing list
> Flac-dev at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flac-dev




More information about the Flac-dev mailing list