1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Switched to a probably more helpful way around of expecting bits in bytes.

This commit is contained in:
Thomas Harte 2016-07-10 16:21:52 -04:00
parent 845a00ccef
commit 6593caca93

View File

@ -172,7 +172,8 @@ PCMTrack::Event PCMTrack::get_next_event()
while(_bit_pointer < _segments[_segment_pointer].duration.length)
{
// for timing simplicity, bits are modelled as happening at the end of their window
int bit = segment_data[_bit_pointer >> 3] & (1 << (_bit_pointer&7));
// TODO: should I account for the converse bit ordering? Or can I assume MSB first?
int bit = segment_data[_bit_pointer >> 3] & (0x80 >> (_bit_pointer&7));
_bit_pointer++;
_next_event.length.length += clock_multiplier;