1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00
CLK/Storage/Disk/Track/TrackSerialiser.hpp
Thomas Harte 9f4a407f94 Switches the track serialiser to a more standard header + implementation separation.
Also introduces a full priming of the PLL before deserialisation begins.
2017-09-26 22:01:32 -04:00

39 lines
1.1 KiB
C++

//
// TrackSerialiser.hpp
// Clock Signal
//
// Created by Thomas Harte on 23/09/2017.
// Copyright © 2017 Thomas Harte. All rights reserved.
//
#ifndef TrackSerialiser_h
#define TrackSerialiser_h
#include "../DPLL/DigitalPhaseLockedLoop.hpp"
#include "PCMSegment.hpp"
#include "Track.hpp"
namespace Storage {
namespace Disk {
/*!
Instantiates a PLL with a target bit length of @c length_of_a_bit and provides a complete
serialisation of @c track, starting from the index hole.
This feature is offered for the benefit of various parts of the code that need to make
sense of a track **other than emulation**, as it renders a one-off image of the track,
which can be inaccurate. However there are many occasions where a single rendering is
desireable — e.g. file formats that apply that constraint, or static analysis prior to
emulation launch, which works with broad strokes.
@param track The track to serialise.
@param length_of_a_bit The expected length of a single bit, as a proportion of the
track length.
*/
PCMSegment track_serialisation(Track &track, Time length_of_a_bit);
}
}
#endif /* TrackSerialiser_h */