Displaying 1 result from an estimated 1 matches for "flac_dec".
2004 Sep 10
1
Can I STOP decoding at an exact sample?
...;d cd. Using the file
decoder, I can seek to the start of the track(index 01 of the cds TOC),
but I then want it to stop playing when it gets to the index 00 of the
next track.
At the moment, I do the following, where length is the length of the
song in samples:
FLAC__file_decoder_seek_absolute(flac_dec, start_sample);
for(int i=0; i<(length/blockSize); i++) {
FLAC__file_decoder_process_one_frame(flac_dec);
}
This is pretty good, with the default block size of 4608 it's accurate
to around a 10th of a second. I am a fussy bastard tho, so I was just
wondering if theres a better way :...