Safe Haskell | None |
---|---|
Language | Haskell2010 |
Media segments with a fixed duration
- newtype Segment duration c = MkSegment c
- segmentContent :: Iso (Segment d c) (Segment d c') c c'
- class CanSegment a where
Documentation
newtype Segment duration c Source #
A segment is some content with a fixed (type level) duration.
class CanSegment a where Source #
Class of types that support splitting values into parts with a certain duration.
splitAfterDuration :: HasStaticDuration d => proxy d -> a -> Maybe (Segment d a, a) Source #
Try to split the packet into the a part which has the given
duration and a rest. If it is not possible to split of the desired duration,
e.g. because the input data is too short, return Nothing
.
(CanBeSample (Pcm c t), KnownRate r) => CanSegment (Audio r c (Raw * t)) Source # | |