mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-04 01:57:54 +00:00
Reserves a more appropriate amount of data.
This commit is contained in:
parent
555c2a4377
commit
1471a35bb8
@ -127,7 +127,7 @@ template<class T> std::shared_ptr<Storage::Disk::Track>
|
|||||||
std::size_t post_data_bytes, uint8_t post_data_value,
|
std::size_t post_data_bytes, uint8_t post_data_value,
|
||||||
std::size_t expected_track_bytes) {
|
std::size_t expected_track_bytes) {
|
||||||
Storage::Disk::PCMSegment segment;
|
Storage::Disk::PCMSegment segment;
|
||||||
segment.data.reserve(expected_track_bytes);
|
segment.data.reserve(expected_track_bytes * 8);
|
||||||
T shifter(segment.data);
|
T shifter(segment.data);
|
||||||
|
|
||||||
// output the index mark
|
// output the index mark
|
||||||
@ -192,6 +192,7 @@ void Encoder::output_short(uint16_t value) {
|
|||||||
uint16_t mask = 0x8000;
|
uint16_t mask = 0x8000;
|
||||||
while(mask) {
|
while(mask) {
|
||||||
target_.push_back(!!(value & mask));
|
target_.push_back(!!(value & mask));
|
||||||
|
mask >>= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user