Commit 08f582e3 authored by Josh Coalson's avatar Josh Coalson
Browse files

add FLAC__bitbuffer_get_input_bits_unconsumed()

parent 03af3c82
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment