From f75af3b45e2a1ef9cae6ae77a7088b8a4ac1cc34 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 1 Jul 2018 14:41:17 -0400 Subject: [PATCH] Adds some extra exposition. --- Storage/Disk/Track/TrackSerialiser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Storage/Disk/Track/TrackSerialiser.cpp b/Storage/Disk/Track/TrackSerialiser.cpp index 3fff2f82b..1741419ca 100644 --- a/Storage/Disk/Track/TrackSerialiser.cpp +++ b/Storage/Disk/Track/TrackSerialiser.cpp @@ -17,6 +17,8 @@ Storage::Disk::PCMSegment Storage::Disk::track_serialisation(const Track &track, DigitalPhaseLockedLoop pll(100, history_size); std::unique_ptr track_copy(track.clone()); + // ResultAccumulator exists to append whatever comes out of the PLL to + // its PCMSegment. struct ResultAccumulator: public DigitalPhaseLockedLoop::Delegate { PCMSegment result; void digital_phase_locked_loop_output_bit(int value) { @@ -25,6 +27,9 @@ Storage::Disk::PCMSegment Storage::Disk::track_serialisation(const Track &track, } result_accumulator; result_accumulator.result.length_of_a_bit = length_of_a_bit; + // Obtain a length multiplier which is 100 times the reciprocal + // of the expected bit length. So a perfect bit length from + // the source data will come out as 100 ticks. Time length_multiplier = Time(100*length_of_a_bit.clock_rate, length_of_a_bit.length); length_multiplier.simplify();