Displaying 15 results from an estimated 15 matches for "target_sampl".
Did you mean:
target_sample
2004 Sep 10
2
better seeking
...-- src/libFLAC/seekable_stream_decoder.c.orig 2003-02-26 19:41:51.000000000 +0100
+++ src/libFLAC/seekable_stream_decoder.c 2003-07-09 23:49:35.000000000 +0200
@@ -816,11 +816,11 @@
FLAC__bool seek_to_absolute_sample_(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset, lower_bound, upper_bound;
- FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ FLAC__uint64 first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample;
+ FLAC__int64 pos, last_pos = -1;
+ in...
2006 Oct 28
3
better seeking
....c,v
retrieving revision 1.117
diff -u -r1.117 stream_decoder.c
--- stream_decoder.c 16 Oct 2006 15:49:18 -0000 1.117
+++ stream_decoder.c 28 Oct 2006 17:12:19 -0000
@@ -2923,18 +2923,18 @@
FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound;
+ FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample;
FLAC__int64 pos = -1, last_pos = -1;
-...
2005 Jan 25
0
bitbuffer optimizations
...xt part --------------
--- seekable_stream_decoder.c.orig 2005-01-25 05:18:31.000000000 +0100
+++ seekable_stream_decoder.c 2005-01-25 23:39:03.000000000 +0100
@@ -857,11 +857,11 @@
FLAC__bool seek_to_absolute_sample_(FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset, lower_bound, upper_bound;
- FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ FLAC__uint64 first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample;
+ FLAC__int64 pos, last_pos = -1;
+ in...
2006 Nov 03
2
better seeking
...n 1.117
diff -u -r1.117 stream_decoder.c
--- src/libFLAC/stream_decoder.c 16 Oct 2006 15:49:18 -0000 1.117
+++ src/libFLAC/stream_decoder.c 3 Nov 2006 08:32:35 -0000
@@ -2923,23 +2923,23 @@
FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound;
- FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound,...
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
...eam_length - (max_framesize + 128 + 2); /* 128 for a possible ID3V1 tag, 2 for indexing differences */
else
upper_bound = stream_length - ((channels * bps * FLAC__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
0
getting framesize in client
...cted, it will display nonsense.
Please apply attached patch. Thanks,
--
Miroslav Lichvar
-------------- next part --------------
--- src/plugin_xmms/plugin.c.orig 2002-11-14 08:59:20.000000000 +0100
+++ src/plugin_xmms/plugin.c 2002-11-14 14:33:38.000000000 +0100
@@ -404,7 +404,7 @@
unsigned target_sample = (unsigned)(distance * (double)file_info_.total_samples);
if(FLAC__file_decoder_seek_absolute(decoder_, (FLAC__uint64)target_sample)) {
flac_ip.output->flush(file_info_.seek_to_in_sec * 1000);
- bh_index_last_w = bh_index_last_o = file_info_.seek_to_in_sec * 1000 / BITRATE_HIST_SEG...
2015 Jun 16
0
Low-level seek routines in libFLAC
...ublic 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");
break;
}
}
}
I alwa...
2004 Sep 10
2
getting framesize in client
...p; bh_index_last_w != bh_index_o) {
+ bh_index_last_o = bh_index_o;
+ flac_ip.set_info(file_info_.title, file_info_.length_in_msec, bitrate_history[bh_index_o], file_info_.sample_rate, file_info_.channels);
+ }
}
else {
file_info_.eof = true;
@@ -378,6 +406,7 @@
unsigned target_sample = (unsigned)(distance * (double)file_info_.total_samples);
if(FLAC__file_decoder_seek_absolute(decoder_, (FLAC__uint64)target_sample)) {
flac_ip.output->flush(file_info_.seek_to_in_sec * 1000);
+ bh_index_last_w = bh_index_last_o = file_info_.seek_to_in_sec * 1000 / BITRATE_HIST_SEG...
2004 Sep 10
0
getting framesize in client
...sition_last) / (written_time - written_time_last) : file_info_.sample_rate * file_info_.channels * file_info_.bits_per_sample;
+ decode_position_last = decode_position;
+ written_time_last = written_time;
+ }
}
else {
file_info_.eof = true;
@@ -378,11 +398,20 @@
unsigned target_sample = (unsigned)(distance * (double)file_info_.total_samples);
if(FLAC__file_decoder_seek_absolute(decoder_, (FLAC__uint64)target_sample)) {
flac_ip.output->flush(file_info_.seek_to_in_sec * 1000);
+ bh_index_last_w = bh_index_last_o = file_info_.seek_to_in_sec * 1000 / BITRATE_HIST_SEG...
2004 Sep 10
2
getting framesize in client
--- Miroslav Lichvar <lichvarm@phoenix.inf.upol.cz> wrote:
> On Sat, Nov 09, 2002 at 06:02:33PM +0100, Miroslav Lichvar wrote:
> > On Fri, Nov 08, 2002 at 07:12:35PM -0800, Josh Coalson wrote:
> > > Yeah, it's useful, so now there is a
> > > FLAC__seekable_stream_decoder_get_decode_position() and
> > > FLAC__file_decoder_get_decode_position(). I
2024 Sep 01
1
Feedback on implementation of decoding of chained streams
...mmand
>> line tool. So, I'd like some feedback.
I only looked briefly, but I had a few questions.
How does FLAC__stream_decoder_get_total_samples() work for chained
streams? I.e., is there a way to get the total samples for all chained
links (to know what the range of valid values for target_sample is for
seek_to_absolute_sample_())?
Since chained streams can have different sample rates, how would one go
about seeking to a specific _time_?
Am I reading the seeking implementation correctly that the only way to
seek to a future link is to scan forward through all of the file data?
2004 Sep 10
3
getting framesize in client
On Fri, Nov 08, 2002 at 12:39:52PM -0800, Josh Coalson wrote:
> --- Miroslav Lichvar <lichvarm@phoenix.inf.upol.cz> wrote:
> > I have few notes:
> >
> > It seems there is changed API in CVS again. So, what about adding
> > function like
> > unsigned FLAC__format_frame_size(const FLAC__Frame *frame)
> > which returns size of the frame in bytes. This
2024 Sep 02
1
Feedback on implementation of decoding of chained streams
...So, I'd like some feedback.
>
> I only looked briefly, but I had a few questions.
>
> How does FLAC__stream_decoder_get_total_samples() work for chained
> streams? I.e., is there a way to get the total samples for all chained
> links (to know what the range of valid values for target_sample is for
> seek_to_absolute_sample_())?
It returns the number of samples stated in the metadata of the current
active link.
> Since chained streams can have different sample rates, how would one go
> about seeking to a specific _time_?
I assume one would first use the sample rate of the...
2004 Sep 10
0
http streaming in the xmms plugin
...if(sample_buffer_last_ - sample_buffer_first_ > 0) {
***************
*** 405,411 ****
}
else
xmms_usleep(10000);
! if(file_info_.seek_to_in_sec != -1) {
const double distance = (double)file_info_.seek_to_in_sec * 1000.0 / (double)file_info_.length_in_msec;
unsigned target_sample = (unsigned)(distance * (double)file_info_.total_samples);
if(FLAC__file_decoder_seek_absolute(decoder_, (FLAC__uint64)target_sample)) {
--- 500,506 ----
}
else
xmms_usleep(10000);
! if(decoder_func_table_->seekable && file_info_.seek_to_in_sec != -1) {
const do...