Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class CanSegment a where
- newtype Segment duration c = MkSegment c
- segmentContent :: forall duration c duration c. Iso (Segment duration c) (Segment duration c) c c
Documentation
class CanSegment a where Source #
Class of types that support splitting of from the front a packet containing roughly 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 at most the given
duration and a rest. If not possible, e.g. because the input data is
already shorter than the given duration, return Nothing
.
(Storable a, HasDuration (Proxy * a)) => CanSegment (SampleBuffer a) Source # | |
newtype Segment duration c Source #
A segment is some content with a fixed (type level) duration.
HasDebugPlaybackSink s t c => HasDebugPlaybackSink s t (Segment d c) Source # | |
Functor (Segment duration) Source # | |
KnownStaticTicks d => HasStaticDuration * (Segment d x) Source # | |
Eq c => Eq (Segment duration c) Source # | |
(HasStaticDuration StaticTicks d, Show c) => Show (Segment d c) Source # | |
Arbitrary c => Arbitrary (Segment duration c) Source # | |
Default c => Default (Segment duration c) Source # | |
NFData c => NFData (Segment duration c) Source # | |
HasStaticDuration StaticTicks d => HasDuration (Segment d x) Source # | |
(HasStaticDuration StaticTicks d, CanGenerateBlankMedia a) => CanBeBlank (Segment d a) Source # | |
type SetStaticDuration * * (Segment d x) pt Source # | |
type GetStaticDuration * (Segment d x) Source # | |