add FLAC__bitbuffer_get_input_bits_unconsumed()

This commit is contained in:
Josh Coalson
2007-01-09 02:01:54 +00:00
parent 03af3c827f
commit 08f582e35b
2 changed files with 6 additions and 0 deletions

View File

@@ -580,6 +580,11 @@ unsigned FLAC__bitbuffer_get_input_bytes_unconsumed(const FLAC__BitBuffer *bb)
return (bb->total_bits - bb->total_consumed_bits) >> 3;
}
unsigned FLAC__bitbuffer_get_input_bits_unconsumed(const FLAC__BitBuffer *bb)
{
return bb->total_bits - bb->total_consumed_bits;
}
void FLAC__bitbuffer_get_buffer(FLAC__BitBuffer *bb, const FLAC__byte **buffer, size_t *bytes)
{
FLAC__ASSERT((bb->consumed_bits & 7) == 0 && (bb->bits & 7) == 0);

View File

@@ -80,6 +80,7 @@ FLAC__bool FLAC__bitbuffer_is_byte_aligned(const FLAC__BitBuffer *bb);
FLAC__bool FLAC__bitbuffer_is_consumed_byte_aligned(const FLAC__BitBuffer *bb);
unsigned FLAC__bitbuffer_bits_left_for_byte_alignment(const FLAC__BitBuffer *bb);
unsigned FLAC__bitbuffer_get_input_bytes_unconsumed(const FLAC__BitBuffer *bb); /* do not call unless byte-aligned */
unsigned FLAC__bitbuffer_get_input_bits_unconsumed(const FLAC__BitBuffer *bb); /* can be called anytime, returns total # of bits unconsumed */
/*
* direct buffer access