Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class HasDuration a where
- class SetTimestamp t (GetTimestamp t) ~ t => HasTimestampT t where
- type GetTimestamp t
- type SetTimestamp t s
- class HasTimestampT t => HasTimestamp t where
- newtype Ticks rate w = MkTicks w
- type Ticks32 r = Ticks r Word32
- type Ticks64 r = Ticks r Word64
- type Ticks32At8000 = Ticks32 8000
- type Ticks32At16000 = Ticks32 16000
- type Ticks32At48000 = Ticks32 48000
- type Ticks64At8000 = Ticks64 8000
- type Ticks64At16000 = Ticks64 16000
- type Ticks64At48000 = Ticks64 48000
- mkTicks :: forall proxy rate baseType. proxy '(rate, baseType) -> baseType -> Ticks rate baseType
- at8kHzU32 :: Proxy '(8000, Word32)
- at16kHzU32 :: Proxy '(16000, Word32)
- at48kHzU32 :: Proxy '(48000, Word32)
- at16kHzU64 :: Proxy '(16000, Word64)
- at48kHzU64 :: Proxy '(48000, Word64)
- nominalDiffTime :: forall r w. (Integral w, KnownNat r) => Iso' (Ticks r w) NominalDiffTime
- convertTicks :: (Integral w, Integral w', KnownNat r, KnownNat r') => Ticks r w -> Ticks r' w'
- deriveFrameTimestamp :: (Monad m, KnownNat r, Integral t, HasDuration a, HasTimestamp a) => Ticks r t -> Conduit a m (SetTimestamp a (Ticks r t))
- data StaticTicks where
- MkStaticTicks :: Nat -> Rate -> StaticTicks
- class KnownStaticTicks s where
- data Rate = MkRate Nat
- type (:@) ticks rate = MkStaticTicks ticks (MkRate rate)
- type family StaticTicksRate (s :: StaticTicks) :: Nat where ...
- type family StaticTicksTicks (s :: StaticTicks) :: Nat where ...
- class (KnownStaticTicks (GetStaticDuration s), SetStaticDuration s (GetStaticDuration s) ~ s) => HasStaticDuration s where
- type SetStaticDuration s (pt :: StaticTicks) :: k'
- type GetStaticDuration s :: StaticTicks
- toStaticDurationProxy :: HasStaticDuration s => proxy s -> Proxy (GetStaticDuration s)
- getStaticDuration :: forall proxy s. HasStaticDuration s => proxy s -> NominalDiffTime
- getStaticTicks :: forall proxy s r t i. (KnownNat r, KnownNat t, HasStaticDuration s, GetStaticDuration s ~ (t :@ r), Integral i) => proxy s -> Ticks r i
- getStaticRate :: forall proxy s r t. (KnownNat r, KnownNat t, HasStaticDuration s, GetStaticDuration s ~ (t :@ r)) => proxy s -> Integer
- ticksFromStaticDuration :: forall proxy rate ticks i. (KnownNat rate, KnownNat ticks, Integral i) => proxy (ticks :@ rate) -> Ticks rate i
- rateFromStaticDuration :: forall proxy rate ticks. (KnownNat rate, KnownNat ticks) => proxy (ticks :@ rate) -> Integer
Documentation
class HasDuration a where Source #
Types with a duration (e.g. audio samples).
getDuration :: a -> NominalDiffTime Source #
getDurationTicks :: (Integral i, KnownNat r) => a -> Ticks r i Source #
HasDuration a => HasDuration (Maybe a) Source # | |
HasDuration a => HasDuration (Discontinous a) Source # | |
(HasDuration (Proxy * sampleType), Storable sampleType) => HasDuration (SampleBuffer sampleType) Source # | |
HasDuration (Proxy * a) => HasDuration (Proxy * (ChannelPair a)) Source # | |
KnownNat r => HasDuration (Proxy * (S16 r)) Source # | |
HasDuration (Proxy * ALaw) Source # | |
HasStaticDuration StaticTicks d => HasDuration (Segment d x) Source # | |
HasDuration c => HasDuration (Frame s t c) Source # | |
HasDuration (FrameCtx i s t p) Source # | |
HasDuration c => HasDuration (Stream i s t p c) Source # | |
class SetTimestamp t (GetTimestamp t) ~ t => HasTimestampT t Source #
type GetTimestamp t Source #
type SetTimestamp t s Source #
(HasTimestampT a, HasTimestampT b, (~) * (GetTimestamp a) (GetTimestamp b)) => HasTimestampT (Series a b) Source # | |
HasTimestampT (Frame s t c) Source # | |
HasTimestampT (FrameCtx i s t p) Source # | |
HasTimestampT (Stream i s t p c) Source # | |
class HasTimestampT t => HasTimestamp t where Source #
timestamp :: Lens t (SetTimestamp t s) (GetTimestamp t) s Source #
timestamp' :: Lens' t (GetTimestamp t) Source #
(HasTimestamp a, HasTimestamp b, (~) * (GetTimestamp a) (GetTimestamp b)) => HasTimestamp (Series a b) Source # | |
HasTimestamp (Frame s t c) Source # | |
HasTimestamp (FrameCtx i s t p) Source # | |
HasTimestamp (Stream i s t p c) Source # | |
MkTicks w |
Enum w => Enum (Ticks rate w) Source # | |
Eq w => Eq (Ticks rate w) Source # | |
(LocalOrd w, Integral w) => Integral (Ticks rate w) Source # | |
Num w => Num (Ticks rate w) Source # | |
(Eq w, LocalOrd w) => Ord (Ticks rate w) Source # | |
(LocalOrd w, Real w) => Real (Ticks rate w) Source # | |
(KnownNat r, Integral w, Show w) => Show (Ticks r w) Source # | |
Generic (Ticks rate w) Source # | |
Arbitrary w => Arbitrary (Ticks rate w) Source # | |
Default w => Default (Ticks rate w) Source # | |
NFData w => NFData (Ticks rate w) Source # | |
Random w => Random (Ticks rate w) Source # | |
LocalOrd w => LocalOrd (Ticks rate w) Source # | |
type Rep (Ticks rate w) Source # | |
type Ticks32At8000 = Ticks32 8000 Source #
type Ticks32At16000 = Ticks32 16000 Source #
type Ticks32At48000 = Ticks32 48000 Source #
type Ticks64At8000 = Ticks64 8000 Source #
type Ticks64At16000 = Ticks64 16000 Source #
type Ticks64At48000 = Ticks64 48000 Source #
mkTicks :: forall proxy rate baseType. proxy '(rate, baseType) -> baseType -> Ticks rate baseType Source #
at16kHzU32 :: Proxy '(16000, Word32) Source #
at48kHzU32 :: Proxy '(48000, Word32) Source #
at16kHzU64 :: Proxy '(16000, Word64) Source #
at48kHzU64 :: Proxy '(48000, Word64) Source #
nominalDiffTime :: forall r w. (Integral w, KnownNat r) => Iso' (Ticks r w) NominalDiffTime Source #
convertTicks :: (Integral w, Integral w', KnownNat r, KnownNat r') => Ticks r w -> Ticks r' w' Source #
deriveFrameTimestamp :: (Monad m, KnownNat r, Integral t, HasDuration a, HasTimestamp a) => Ticks r t -> Conduit a m (SetTimestamp a (Ticks r t)) Source #
data StaticTicks where Source #
MkStaticTicks :: Nat -> Rate -> StaticTicks |
(KnownNat r, KnownNat t) => HasStaticDuration StaticTicks ((:@) t r) Source # | |
type SetStaticDuration StaticTicks StaticTicks ((:@) t r) ((:@) t' r') Source # | |
type GetStaticDuration StaticTicks ((:@) t r) Source # | |
class KnownStaticTicks s where Source #
(KnownNat d, KnownNat r) => KnownStaticTicks (MkStaticTicks d (MkRate r)) Source # | |
type (:@) ticks rate = MkStaticTicks ticks (MkRate rate) Source #
type family StaticTicksRate (s :: StaticTicks) :: Nat where ... Source #
StaticTicksRate (t :@ r) = r |
type family StaticTicksTicks (s :: StaticTicks) :: Nat where ... Source #
StaticTicksTicks (t :@ r) = t |
class (KnownStaticTicks (GetStaticDuration s), SetStaticDuration s (GetStaticDuration s) ~ s) => HasStaticDuration s Source #
type SetStaticDuration s (pt :: StaticTicks) :: k' Source #
type GetStaticDuration s :: StaticTicks Source #
(KnownNat r, KnownNat t) => HasStaticDuration StaticTicks ((:@) t r) Source # | |
KnownStaticTicks d => HasStaticDuration * (Segment d x) Source # | |
toStaticDurationProxy :: HasStaticDuration s => proxy s -> Proxy (GetStaticDuration s) Source #
getStaticDuration :: forall proxy s. HasStaticDuration s => proxy s -> NominalDiffTime Source #
getStaticTicks :: forall proxy s r t i. (KnownNat r, KnownNat t, HasStaticDuration s, GetStaticDuration s ~ (t :@ r), Integral i) => proxy s -> Ticks r i Source #
getStaticRate :: forall proxy s r t. (KnownNat r, KnownNat t, HasStaticDuration s, GetStaticDuration s ~ (t :@ r)) => proxy s -> Integer Source #