zoom-cache-1.2.1.4: A streamable, seekable, zoomable cache file format

Portabilityunknown
Stabilityunstable
MaintainerConrad Parker <conrad@metadecks.org>
Safe HaskellSafe-Infered

Data.ZoomCache.Common

Contents

Description

Types used throughout zoom-cache

Synopsis

TimeStamps

newtype TimeStampDiff Source

Constructors

TSDiff Double 

timeStampDiff :: TimeStamp -> TimeStamp -> TimeStampDiffSource

timeStampDiff (TS t1) (TS t2) = TSDiff (t1 - t2)

utcTimeFromTimeStamp :: UTCTime -> TimeStamp -> UTCTimeSource

utcTimeFromTimeStamp base (TS ts) = baseUTC + ts

SampleOffsets

sampleOffsetDiff :: SampleOffset -> SampleOffset -> SampleOffsetDiffSource

sampleOffsetDiff (SO t1) (SO t2) = SODiff (t1 - t2)

Types

data SampleRateType Source

Constant or Variable samplerate. For constant samplerate, timestamps are implied as incrementing by 1/samplerate For variable samplerate, explicit timestamps are attached to each datum, encoded as a separate block of SampleOffset in the Raw Data packet.

Constructors

ConstantSR 
VariableSR 

Global header

data Global Source

Constructors

Global 

Version

data Version Source

Constructors

Version !Int !Int 

Instances