VorbisBitArray
@UnstableApi
class VorbisBitArray
Wraps a byte array, providing methods that allow it to be read as a Vorbis bitstream.
See the Vorbis bitpacking specification
Summary
Public constructors |
|---|
VorbisBitArray(data: ByteArray!)Creates a new instance that wraps an existing array. |
Public functions |
|
|---|---|
Int |
bitsLeft()Returns the number of remaining bits. |
Int |
Returns the reading position in bits. |
Boolean |
readBit()Reads a single bit. |
Int |
Reads up to 32 bits. |
Unit |
reset()Resets the reading position to zero. |
Unit |
setPosition(position: Int)Sets the reading position in bits. |
Unit |
Skips |
Public constructors
VorbisBitArray
VorbisBitArray(data: ByteArray!)
Creates a new instance that wraps an existing array.
| Parameters | |
|---|---|
data: ByteArray! |
the array to wrap. |
Public functions
readBit
fun readBit(): Boolean
Reads a single bit.
| Returns | |
|---|---|
Boolean |
|
readBits
fun readBits(numBits: Int): Int
Reads up to 32 bits.
| Parameters | |
|---|---|
numBits: Int |
The number of bits to read. |
| Returns | |
|---|---|
Int |
An integer whose bottom |
setPosition
fun setPosition(position: Int): Unit
Sets the reading position in bits.
| Parameters | |
|---|---|
position: Int |
The new reading position in bits. |