Public Member Functions | |
Bitarray (Bitstream &bs) | |
void | Write (Bitstream &bs) const |
int | Get (int i) const |
void | Set (int i, int x) |
int | Max (int i) const |
unsigned int | operator^ (int i) const |
In ordinary C struct items must end on byte boundary, but in MP3 files fields have variable bit length. This class works line C struct, but unfortunately operator '.' can't be overloaded, I had to use '^' with low priority. Items can be selected via an enum to emulate C struct.
Definition at line 20 of file bitarray.h.
|
Constructor Reads needed bits from Bitstream
Definition at line 31 of file bitarray.h. |
|
Returns value of an field
Definition at line 53 of file bitarray.h. Referenced by Bitarray< mp3_frame_header >::operator^(). |
|
Get maximum value of a field
Definition at line 89 of file bitarray.h. |
|
Returns value of a field Just a shortcut for get() to imitate C struct, so bitarray^field can be used instead of bitarray.get(field), if 'field' is enumeration value.
Definition at line 105 of file bitarray.h. |
|
Sets value of a field
Definition at line 69 of file bitarray.h. Referenced by FrameHeader::Enlarge(). |
|
Writes bits to Bitstream
Definition at line 41 of file bitarray.h. Referenced by FrameHeader::Write(). |