Displaying 7 results from an estimated 7 matches for "needs_seek".
2004 Sep 10
2
better seeking
...frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample;
+ FLAC__int64 pos, last_pos = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint64 last_frame_sample = 0xffffffffffffffff;
+ FLAC__uint64 last_frame_sample = 0xffffffffffffffff, this_frame_sample;
FLAC__bool needs_seek;
const FLAC__uint64 total_samples = decoder->private_->stream_info.total_samples;
const unsigned min_blocksize = decoder->private_->stream_info.min_blocksize;
@@ -862,12 +862,14 @@
* the first and last frames.
*/
lower_bound = first_frame_offset;
+ lower_bound_sample = 0;...
2006 Oct 28
3
better seeking
...AC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff);
+ FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff), this_frame_sample;
FLAC__bool needs_seek;
const FLAC__uint64 total_samples = FLAC__stream_decoder_get_total_samples(decoder);
const unsigned min_blocksize = decoder->private_->stream_info.data.stream_info.min_blocksize;
const unsigned max_blocksize = decoder->private_->stream_info.data.stream_info.max_blocksize;
const...
2005 Jan 25
0
bitbuffer optimizations
...d, upper_bound, lower_bound_sample, upper_bound_sample;
+ FLAC__int64 pos, last_pos = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff);
+ FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff), this_frame_sample;
FLAC__bool needs_seek;
const FLAC__uint64 total_samples = decoder->private_->stream_info.total_samples;
const unsigned min_blocksize = decoder->private_->stream_info.min_blocksize;
@@ -903,12 +903,14 @@
* the first and last frames.
*/
lower_bound = first_frame_offset;
+ lower_bound_sample = 0;...
2006 Nov 03
2
better seeking
...first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample, this_frame_sample;
+ FLAC__int64 pos = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff);
- FLAC__bool needs_seek;
+ FLAC__bool needs_seek = true, first_seek = true;
const FLAC__uint64 total_samples = FLAC__stream_decoder_get_total_samples(decoder);
const unsigned min_blocksize = decoder->private_->stream_info.data.stream_info.min_blocksize;
const unsigned max_blocksize = decoder->private_->s...
2004 Sep 10
4
bitbuffer optimizations
Ok, here is a patch waiting for new CVS :). It works fine for me, but
please check it before commiting...
--
Miroslav Lichvar
-------------- next part --------------
--- src/libFLAC/bitbuffer.c.orig 2003-01-30 17:36:01.000000000 +0100
+++ src/libFLAC/bitbuffer.c 2003-01-30 21:53:18.000000000 +0100
@@ -51,6 +51,25 @@
*/
static const unsigned FLAC__BITBUFFER_DEFAULT_CAPACITY = ((65536 - 64) *
2004 Sep 10
0
better seeking
...AC__MAX_BLOCK_SIZE) / 8 + 128 + 2);
- upper_bound_sample = total_samples;
+ upper_bound_sample = total_samples > 0 ? total_samples : target_sample;
/*
* Now we refine the bounds if we have a seektable with
@@ -900,7 +900,7 @@
decoder->private_->target_sample = target_sample;
- needs_seek = (total_samples > 0) ? true : false;
+ needs_seek = true;
while(1) {
if(needs_seek) {
#if defined _MSC_VER || defined __MINGW32__
2004 Sep 10
1
Unexpected writeCallback() calls
...data should be restricted to the
three functions mentioned above, because it would make libFLAC
easier to use. Currently, it is best that a developer does all
FLAC API calls in one function, because one never knows when
new data arrives. This makes it necessary to use annoying flags
like e.g. 'needs_seek' in the Winamp3 plugin. Wouldn't it be
better and more intuitive to call seek_absolute() directly in
Winamp3's onSeeked() routine?
Besides, the current behaviour can cause buffer overflows
easily if you arn't careful and empty the output reservoir
fast enough (or use overflow/safety...