Lines Matching refs:target_sample

134 static FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample);
136 static FLAC__bool seek_to_absolute_sample_ogg_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample);
203 FLAC__uint64 target_sample;
2923 FLAC__uint64 target_sample = decoder->private_->target_sample;
2931 if(this_frame_sample <= target_sample && target_sample < next_frame_sample) { /* we hit our target frame */
2932 unsigned delta = (unsigned)(target_sample - this_frame_sample);
2935 /* shift out the samples before target_sample */
2980 FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
3028 upper_bound_sample = total_samples > 0 ? total_samples : target_sample /*estimate it*/;
3044 /* find the closest seek point <= target_sample, if it exists */
3050 seek_table->points[i].sample_number <= target_sample
3059 /* find the closest seek point > target_sample, if it exists */
3065 seek_table->points[i].sample_number > target_sample
3085 * 1) total_samples is 0 (unknown) and target_sample is 0
3086 * 2) total_samples is 0 (unknown) and target_sample happens to be
3095 decoder->private_->target_sample = target_sample;
3105 pos = (FLAC__int64)lower_bound + (FLAC__int64)((FLAC__double)(FLAC__int64)(target_sample - lower_bound_sample) / (FLAC__double)(FLAC__int64)(upper_bound_sample - lower_bound_sample) * (FLAC__double)(FLAC__int64)(upper_bound - lower_bound)) - approx_bytes_per_frame;
3107 pos = (FLAC__int64)lower_bound + (FLAC__int64)((FLAC__double)(target_sample - lower_bound_sample) / (FLAC__double)(upper_bound_sample - lower_bound_sample) * (FLAC__double)(upper_bound - lower_bound)) - approx_bytes_per_frame;
3112 pos = (FLAC__int64)lower_bound + (FLAC__int64)(((target_sample - lower_bound_sample) * (upper_bound - lower_bound)) / (upper_bound_sample - lower_bound_sample)) - approx_bytes_per_frame;
3114 pos = (FLAC__int64)lower_bound + (FLAC__int64)((((target_sample - lower_bound_sample)>>8) * ((upper_bound - lower_bound)>>8)) / ((upper_bound_sample - lower_bound_sample)>>16)) - approx_bytes_per_frame;
3172 if(target_sample < this_frame_sample) {
3181 else { /* target_sample >= this_frame_sample + this frame's blocksize */
3195 FLAC__bool seek_to_absolute_sample_ogg_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
3224 decoder->private_->target_sample = target_sample;
3226 if (iteration == 0 || this_frame_sample > target_sample || target_sample - this_frame_sample > LINEAR_SEARCH_WITHIN_SAMPLES) {
3234 pos = (FLAC__uint64)((FLAC__double)(FLAC__int64)(target_sample - left_sample) / (FLAC__double)(FLAC__int64)(right_sample - left_sample) * (FLAC__double)(FLAC__int64)(right_pos - left_pos));
3236 pos = (FLAC__uint64)((FLAC__double)(target_sample - left_sample) / (FLAC__double)(right_sample - left_sample) * (FLAC__double)(right_pos - left_pos));
3240 if ((target_sample-left_sample <= 0xffffffff) && (right_pos-left_pos <= 0xffffffff))
3241 pos = (FLAC__int64)(((target_sample-left_sample) * (right_pos-left_pos)) / (right_sample-left_sample));
3243 pos = (FLAC__int64)((((target_sample-left_sample)>>8) * ((right_pos-left_pos)>>8)) / ((right_sample-left_sample)>>16));
3282 * target_sample is past the end of the stream
3297 if (this_frame_sample <= target_sample) {
3304 FLAC__ASSERT(this_frame_sample != target_sample);
3314 else if(this_frame_sample > target_sample) {