mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-17 10:30:31 +00:00
Fix: make sure copies have proper event lengths. Also made it much clearer what's going on with the initial copy to the heap.
This commit is contained in:
parent
c740d9655a
commit
c85450648f
@ -11,10 +11,8 @@
|
|||||||
using namespace Storage::Disk;
|
using namespace Storage::Disk;
|
||||||
|
|
||||||
PCMSegmentEventSource::PCMSegmentEventSource(const PCMSegment &segment) :
|
PCMSegmentEventSource::PCMSegmentEventSource(const PCMSegment &segment) :
|
||||||
segment_(new PCMSegment)
|
segment_(new PCMSegment(segment))
|
||||||
{
|
{
|
||||||
*segment_ = segment;
|
|
||||||
|
|
||||||
// add an extra bit of storage at the bottom if one is going to be needed;
|
// add an extra bit of storage at the bottom if one is going to be needed;
|
||||||
// events returned are going to be in integral multiples of the length of a bit
|
// events returned are going to be in integral multiples of the length of a bit
|
||||||
// other than the very first and very last which will include a half bit length
|
// other than the very first and very last which will include a half bit length
|
||||||
@ -35,6 +33,9 @@ PCMSegmentEventSource::PCMSegmentEventSource(const PCMSegmentEventSource &origin
|
|||||||
{
|
{
|
||||||
// share underlying data with the original
|
// share underlying data with the original
|
||||||
segment_ = original.segment_;
|
segment_ = original.segment_;
|
||||||
|
|
||||||
|
// load up the clock rate and set initial conditions
|
||||||
|
next_event_.length.clock_rate = segment_->length_of_a_bit.clock_rate;
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user