module Mpv.Data.AudioDelay where

import Polysemy.Time (NanoSeconds)
import Polysemy.Time.Json (json)

newtype AudioDelay =
  AudioDelay { AudioDelay -> NanoSeconds
unAudioDelay :: NanoSeconds }
  deriving stock (AudioDelay -> AudioDelay -> Bool
(AudioDelay -> AudioDelay -> Bool)
-> (AudioDelay -> AudioDelay -> Bool) -> Eq AudioDelay
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioDelay -> AudioDelay -> Bool
$c/= :: AudioDelay -> AudioDelay -> Bool
== :: AudioDelay -> AudioDelay -> Bool
$c== :: AudioDelay -> AudioDelay -> Bool
Eq, Int -> AudioDelay -> ShowS
[AudioDelay] -> ShowS
AudioDelay -> String
(Int -> AudioDelay -> ShowS)
-> (AudioDelay -> String)
-> ([AudioDelay] -> ShowS)
-> Show AudioDelay
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AudioDelay] -> ShowS
$cshowList :: [AudioDelay] -> ShowS
show :: AudioDelay -> String
$cshow :: AudioDelay -> String
showsPrec :: Int -> AudioDelay -> ShowS
$cshowsPrec :: Int -> AudioDelay -> ShowS
Show, (forall x. AudioDelay -> Rep AudioDelay x)
-> (forall x. Rep AudioDelay x -> AudioDelay) -> Generic AudioDelay
forall x. Rep AudioDelay x -> AudioDelay
forall x. AudioDelay -> Rep AudioDelay x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AudioDelay x -> AudioDelay
$cfrom :: forall x. AudioDelay -> Rep AudioDelay x
Generic)
  deriving newtype (Integer -> AudioDelay
AudioDelay -> AudioDelay
AudioDelay -> AudioDelay -> AudioDelay
(AudioDelay -> AudioDelay -> AudioDelay)
-> (AudioDelay -> AudioDelay -> AudioDelay)
-> (AudioDelay -> AudioDelay -> AudioDelay)
-> (AudioDelay -> AudioDelay)
-> (AudioDelay -> AudioDelay)
-> (AudioDelay -> AudioDelay)
-> (Integer -> AudioDelay)
-> Num AudioDelay
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> AudioDelay
$cfromInteger :: Integer -> AudioDelay
signum :: AudioDelay -> AudioDelay
$csignum :: AudioDelay -> AudioDelay
abs :: AudioDelay -> AudioDelay
$cabs :: AudioDelay -> AudioDelay
negate :: AudioDelay -> AudioDelay
$cnegate :: AudioDelay -> AudioDelay
* :: AudioDelay -> AudioDelay -> AudioDelay
$c* :: AudioDelay -> AudioDelay -> AudioDelay
- :: AudioDelay -> AudioDelay -> AudioDelay
$c- :: AudioDelay -> AudioDelay -> AudioDelay
+ :: AudioDelay -> AudioDelay -> AudioDelay
$c+ :: AudioDelay -> AudioDelay -> AudioDelay
Num, Eq AudioDelay
Eq AudioDelay
-> (AudioDelay -> AudioDelay -> Ordering)
-> (AudioDelay -> AudioDelay -> Bool)
-> (AudioDelay -> AudioDelay -> Bool)
-> (AudioDelay -> AudioDelay -> Bool)
-> (AudioDelay -> AudioDelay -> Bool)
-> (AudioDelay -> AudioDelay -> AudioDelay)
-> (AudioDelay -> AudioDelay -> AudioDelay)
-> Ord AudioDelay
AudioDelay -> AudioDelay -> Bool
AudioDelay -> AudioDelay -> Ordering
AudioDelay -> AudioDelay -> AudioDelay
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: AudioDelay -> AudioDelay -> AudioDelay
$cmin :: AudioDelay -> AudioDelay -> AudioDelay
max :: AudioDelay -> AudioDelay -> AudioDelay
$cmax :: AudioDelay -> AudioDelay -> AudioDelay
>= :: AudioDelay -> AudioDelay -> Bool
$c>= :: AudioDelay -> AudioDelay -> Bool
> :: AudioDelay -> AudioDelay -> Bool
$c> :: AudioDelay -> AudioDelay -> Bool
<= :: AudioDelay -> AudioDelay -> Bool
$c<= :: AudioDelay -> AudioDelay -> Bool
< :: AudioDelay -> AudioDelay -> Bool
$c< :: AudioDelay -> AudioDelay -> Bool
compare :: AudioDelay -> AudioDelay -> Ordering
$ccompare :: AudioDelay -> AudioDelay -> Ordering
Ord, Int -> AudioDelay
AudioDelay -> Int
AudioDelay -> [AudioDelay]
AudioDelay -> AudioDelay
AudioDelay -> AudioDelay -> [AudioDelay]
AudioDelay -> AudioDelay -> AudioDelay -> [AudioDelay]
(AudioDelay -> AudioDelay)
-> (AudioDelay -> AudioDelay)
-> (Int -> AudioDelay)
-> (AudioDelay -> Int)
-> (AudioDelay -> [AudioDelay])
-> (AudioDelay -> AudioDelay -> [AudioDelay])
-> (AudioDelay -> AudioDelay -> [AudioDelay])
-> (AudioDelay -> AudioDelay -> AudioDelay -> [AudioDelay])
-> Enum AudioDelay
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: AudioDelay -> AudioDelay -> AudioDelay -> [AudioDelay]
$cenumFromThenTo :: AudioDelay -> AudioDelay -> AudioDelay -> [AudioDelay]
enumFromTo :: AudioDelay -> AudioDelay -> [AudioDelay]
$cenumFromTo :: AudioDelay -> AudioDelay -> [AudioDelay]
enumFromThen :: AudioDelay -> AudioDelay -> [AudioDelay]
$cenumFromThen :: AudioDelay -> AudioDelay -> [AudioDelay]
enumFrom :: AudioDelay -> [AudioDelay]
$cenumFrom :: AudioDelay -> [AudioDelay]
fromEnum :: AudioDelay -> Int
$cfromEnum :: AudioDelay -> Int
toEnum :: Int -> AudioDelay
$ctoEnum :: Int -> AudioDelay
pred :: AudioDelay -> AudioDelay
$cpred :: AudioDelay -> AudioDelay
succ :: AudioDelay -> AudioDelay
$csucc :: AudioDelay -> AudioDelay
Enum, Num AudioDelay
Ord AudioDelay
Num AudioDelay
-> Ord AudioDelay -> (AudioDelay -> Rational) -> Real AudioDelay
AudioDelay -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
toRational :: AudioDelay -> Rational
$ctoRational :: AudioDelay -> Rational
Real, Num AudioDelay
Num AudioDelay
-> (AudioDelay -> AudioDelay -> AudioDelay)
-> (AudioDelay -> AudioDelay)
-> (Rational -> AudioDelay)
-> Fractional AudioDelay
Rational -> AudioDelay
AudioDelay -> AudioDelay
AudioDelay -> AudioDelay -> AudioDelay
forall a.
Num a
-> (a -> a -> a) -> (a -> a) -> (Rational -> a) -> Fractional a
fromRational :: Rational -> AudioDelay
$cfromRational :: Rational -> AudioDelay
recip :: AudioDelay -> AudioDelay
$crecip :: AudioDelay -> AudioDelay
/ :: AudioDelay -> AudioDelay -> AudioDelay
$c/ :: AudioDelay -> AudioDelay -> AudioDelay
Fractional)

json ''AudioDelay