module Sound.SC3.Server.Enum where
import Data.Maybe
data AddAction = AddToHead
| AddToTail
| AddBefore
| AddAfter
| AddReplace
deriving (AddAction -> AddAction -> Bool
(AddAction -> AddAction -> Bool)
-> (AddAction -> AddAction -> Bool) -> Eq AddAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddAction -> AddAction -> Bool
$c/= :: AddAction -> AddAction -> Bool
== :: AddAction -> AddAction -> Bool
$c== :: AddAction -> AddAction -> Bool
Eq,Int -> AddAction -> ShowS
[AddAction] -> ShowS
AddAction -> String
(Int -> AddAction -> ShowS)
-> (AddAction -> String)
-> ([AddAction] -> ShowS)
-> Show AddAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddAction] -> ShowS
$cshowList :: [AddAction] -> ShowS
show :: AddAction -> String
$cshow :: AddAction -> String
showsPrec :: Int -> AddAction -> ShowS
$cshowsPrec :: Int -> AddAction -> ShowS
Show,Int -> AddAction
AddAction -> Int
AddAction -> [AddAction]
AddAction -> AddAction
AddAction -> AddAction -> [AddAction]
AddAction -> AddAction -> AddAction -> [AddAction]
(AddAction -> AddAction)
-> (AddAction -> AddAction)
-> (Int -> AddAction)
-> (AddAction -> Int)
-> (AddAction -> [AddAction])
-> (AddAction -> AddAction -> [AddAction])
-> (AddAction -> AddAction -> [AddAction])
-> (AddAction -> AddAction -> AddAction -> [AddAction])
-> Enum AddAction
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 :: AddAction -> AddAction -> AddAction -> [AddAction]
$cenumFromThenTo :: AddAction -> AddAction -> AddAction -> [AddAction]
enumFromTo :: AddAction -> AddAction -> [AddAction]
$cenumFromTo :: AddAction -> AddAction -> [AddAction]
enumFromThen :: AddAction -> AddAction -> [AddAction]
$cenumFromThen :: AddAction -> AddAction -> [AddAction]
enumFrom :: AddAction -> [AddAction]
$cenumFrom :: AddAction -> [AddAction]
fromEnum :: AddAction -> Int
$cfromEnum :: AddAction -> Int
toEnum :: Int -> AddAction
$ctoEnum :: Int -> AddAction
pred :: AddAction -> AddAction
$cpred :: AddAction -> AddAction
succ :: AddAction -> AddAction
$csucc :: AddAction -> AddAction
Enum)
data B_Gen = Normalise | Wavetable | Clear
deriving (B_Gen -> B_Gen -> Bool
(B_Gen -> B_Gen -> Bool) -> (B_Gen -> B_Gen -> Bool) -> Eq B_Gen
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: B_Gen -> B_Gen -> Bool
$c/= :: B_Gen -> B_Gen -> Bool
== :: B_Gen -> B_Gen -> Bool
$c== :: B_Gen -> B_Gen -> Bool
Eq,Int -> B_Gen
B_Gen -> Int
B_Gen -> [B_Gen]
B_Gen -> B_Gen
B_Gen -> B_Gen -> [B_Gen]
B_Gen -> B_Gen -> B_Gen -> [B_Gen]
(B_Gen -> B_Gen)
-> (B_Gen -> B_Gen)
-> (Int -> B_Gen)
-> (B_Gen -> Int)
-> (B_Gen -> [B_Gen])
-> (B_Gen -> B_Gen -> [B_Gen])
-> (B_Gen -> B_Gen -> [B_Gen])
-> (B_Gen -> B_Gen -> B_Gen -> [B_Gen])
-> Enum B_Gen
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 :: B_Gen -> B_Gen -> B_Gen -> [B_Gen]
$cenumFromThenTo :: B_Gen -> B_Gen -> B_Gen -> [B_Gen]
enumFromTo :: B_Gen -> B_Gen -> [B_Gen]
$cenumFromTo :: B_Gen -> B_Gen -> [B_Gen]
enumFromThen :: B_Gen -> B_Gen -> [B_Gen]
$cenumFromThen :: B_Gen -> B_Gen -> [B_Gen]
enumFrom :: B_Gen -> [B_Gen]
$cenumFrom :: B_Gen -> [B_Gen]
fromEnum :: B_Gen -> Int
$cfromEnum :: B_Gen -> Int
toEnum :: Int -> B_Gen
$ctoEnum :: Int -> B_Gen
pred :: B_Gen -> B_Gen
$cpred :: B_Gen -> B_Gen
succ :: B_Gen -> B_Gen
$csucc :: B_Gen -> B_Gen
Enum,B_Gen
B_Gen -> B_Gen -> Bounded B_Gen
forall a. a -> a -> Bounded a
maxBound :: B_Gen
$cmaxBound :: B_Gen
minBound :: B_Gen
$cminBound :: B_Gen
Bounded,Int -> B_Gen -> ShowS
[B_Gen] -> ShowS
B_Gen -> String
(Int -> B_Gen -> ShowS)
-> (B_Gen -> String) -> ([B_Gen] -> ShowS) -> Show B_Gen
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [B_Gen] -> ShowS
$cshowList :: [B_Gen] -> ShowS
show :: B_Gen -> String
$cshow :: B_Gen -> String
showsPrec :: Int -> B_Gen -> ShowS
$cshowsPrec :: Int -> B_Gen -> ShowS
Show)
b_gen_bit :: B_Gen -> Int
b_gen_bit :: B_Gen -> Int
b_gen_bit = B_Gen -> Int
forall a. Enum a => a -> Int
fromEnum
b_gen_flag :: [B_Gen] -> Int
b_gen_flag :: [B_Gen] -> Int
b_gen_flag = [Int] -> Int
forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a
sum ([Int] -> Int) -> ([B_Gen] -> [Int]) -> [B_Gen] -> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (B_Gen -> Int) -> [B_Gen] -> [Int]
forall a b. (a -> b) -> [a] -> [b]
map ((Int
2 Int -> Int -> Int
forall a b. (Num a, Integral b) => a -> b -> a
^) (Int -> Int) -> (B_Gen -> Int) -> B_Gen -> Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. B_Gen -> Int
b_gen_bit)
data ErrorScope = Globally
| Locally
deriving (ErrorScope -> ErrorScope -> Bool
(ErrorScope -> ErrorScope -> Bool)
-> (ErrorScope -> ErrorScope -> Bool) -> Eq ErrorScope
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ErrorScope -> ErrorScope -> Bool
$c/= :: ErrorScope -> ErrorScope -> Bool
== :: ErrorScope -> ErrorScope -> Bool
$c== :: ErrorScope -> ErrorScope -> Bool
Eq,Int -> ErrorScope -> ShowS
[ErrorScope] -> ShowS
ErrorScope -> String
(Int -> ErrorScope -> ShowS)
-> (ErrorScope -> String)
-> ([ErrorScope] -> ShowS)
-> Show ErrorScope
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ErrorScope] -> ShowS
$cshowList :: [ErrorScope] -> ShowS
show :: ErrorScope -> String
$cshow :: ErrorScope -> String
showsPrec :: Int -> ErrorScope -> ShowS
$cshowsPrec :: Int -> ErrorScope -> ShowS
Show,Int -> ErrorScope
ErrorScope -> Int
ErrorScope -> [ErrorScope]
ErrorScope -> ErrorScope
ErrorScope -> ErrorScope -> [ErrorScope]
ErrorScope -> ErrorScope -> ErrorScope -> [ErrorScope]
(ErrorScope -> ErrorScope)
-> (ErrorScope -> ErrorScope)
-> (Int -> ErrorScope)
-> (ErrorScope -> Int)
-> (ErrorScope -> [ErrorScope])
-> (ErrorScope -> ErrorScope -> [ErrorScope])
-> (ErrorScope -> ErrorScope -> [ErrorScope])
-> (ErrorScope -> ErrorScope -> ErrorScope -> [ErrorScope])
-> Enum ErrorScope
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 :: ErrorScope -> ErrorScope -> ErrorScope -> [ErrorScope]
$cenumFromThenTo :: ErrorScope -> ErrorScope -> ErrorScope -> [ErrorScope]
enumFromTo :: ErrorScope -> ErrorScope -> [ErrorScope]
$cenumFromTo :: ErrorScope -> ErrorScope -> [ErrorScope]
enumFromThen :: ErrorScope -> ErrorScope -> [ErrorScope]
$cenumFromThen :: ErrorScope -> ErrorScope -> [ErrorScope]
enumFrom :: ErrorScope -> [ErrorScope]
$cenumFrom :: ErrorScope -> [ErrorScope]
fromEnum :: ErrorScope -> Int
$cfromEnum :: ErrorScope -> Int
toEnum :: Int -> ErrorScope
$ctoEnum :: Int -> ErrorScope
pred :: ErrorScope -> ErrorScope
$cpred :: ErrorScope -> ErrorScope
succ :: ErrorScope -> ErrorScope
$csucc :: ErrorScope -> ErrorScope
Enum)
data ErrorMode = ErrorsOff
| ErrorsOn
deriving (ErrorMode -> ErrorMode -> Bool
(ErrorMode -> ErrorMode -> Bool)
-> (ErrorMode -> ErrorMode -> Bool) -> Eq ErrorMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ErrorMode -> ErrorMode -> Bool
$c/= :: ErrorMode -> ErrorMode -> Bool
== :: ErrorMode -> ErrorMode -> Bool
$c== :: ErrorMode -> ErrorMode -> Bool
Eq,Int -> ErrorMode -> ShowS
[ErrorMode] -> ShowS
ErrorMode -> String
(Int -> ErrorMode -> ShowS)
-> (ErrorMode -> String)
-> ([ErrorMode] -> ShowS)
-> Show ErrorMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ErrorMode] -> ShowS
$cshowList :: [ErrorMode] -> ShowS
show :: ErrorMode -> String
$cshow :: ErrorMode -> String
showsPrec :: Int -> ErrorMode -> ShowS
$cshowsPrec :: Int -> ErrorMode -> ShowS
Show,Int -> ErrorMode
ErrorMode -> Int
ErrorMode -> [ErrorMode]
ErrorMode -> ErrorMode
ErrorMode -> ErrorMode -> [ErrorMode]
ErrorMode -> ErrorMode -> ErrorMode -> [ErrorMode]
(ErrorMode -> ErrorMode)
-> (ErrorMode -> ErrorMode)
-> (Int -> ErrorMode)
-> (ErrorMode -> Int)
-> (ErrorMode -> [ErrorMode])
-> (ErrorMode -> ErrorMode -> [ErrorMode])
-> (ErrorMode -> ErrorMode -> [ErrorMode])
-> (ErrorMode -> ErrorMode -> ErrorMode -> [ErrorMode])
-> Enum ErrorMode
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 :: ErrorMode -> ErrorMode -> ErrorMode -> [ErrorMode]
$cenumFromThenTo :: ErrorMode -> ErrorMode -> ErrorMode -> [ErrorMode]
enumFromTo :: ErrorMode -> ErrorMode -> [ErrorMode]
$cenumFromTo :: ErrorMode -> ErrorMode -> [ErrorMode]
enumFromThen :: ErrorMode -> ErrorMode -> [ErrorMode]
$cenumFromThen :: ErrorMode -> ErrorMode -> [ErrorMode]
enumFrom :: ErrorMode -> [ErrorMode]
$cenumFrom :: ErrorMode -> [ErrorMode]
fromEnum :: ErrorMode -> Int
$cfromEnum :: ErrorMode -> Int
toEnum :: Int -> ErrorMode
$ctoEnum :: Int -> ErrorMode
pred :: ErrorMode -> ErrorMode
$cpred :: ErrorMode -> ErrorMode
succ :: ErrorMode -> ErrorMode
$csucc :: ErrorMode -> ErrorMode
Enum)
data PrintLevel = NoPrinter
| TextPrinter
| HexPrinter
| AllPrinter
deriving (PrintLevel -> PrintLevel -> Bool
(PrintLevel -> PrintLevel -> Bool)
-> (PrintLevel -> PrintLevel -> Bool) -> Eq PrintLevel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PrintLevel -> PrintLevel -> Bool
$c/= :: PrintLevel -> PrintLevel -> Bool
== :: PrintLevel -> PrintLevel -> Bool
$c== :: PrintLevel -> PrintLevel -> Bool
Eq,Int -> PrintLevel -> ShowS
[PrintLevel] -> ShowS
PrintLevel -> String
(Int -> PrintLevel -> ShowS)
-> (PrintLevel -> String)
-> ([PrintLevel] -> ShowS)
-> Show PrintLevel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PrintLevel] -> ShowS
$cshowList :: [PrintLevel] -> ShowS
show :: PrintLevel -> String
$cshow :: PrintLevel -> String
showsPrec :: Int -> PrintLevel -> ShowS
$cshowsPrec :: Int -> PrintLevel -> ShowS
Show,Int -> PrintLevel
PrintLevel -> Int
PrintLevel -> [PrintLevel]
PrintLevel -> PrintLevel
PrintLevel -> PrintLevel -> [PrintLevel]
PrintLevel -> PrintLevel -> PrintLevel -> [PrintLevel]
(PrintLevel -> PrintLevel)
-> (PrintLevel -> PrintLevel)
-> (Int -> PrintLevel)
-> (PrintLevel -> Int)
-> (PrintLevel -> [PrintLevel])
-> (PrintLevel -> PrintLevel -> [PrintLevel])
-> (PrintLevel -> PrintLevel -> [PrintLevel])
-> (PrintLevel -> PrintLevel -> PrintLevel -> [PrintLevel])
-> Enum PrintLevel
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 :: PrintLevel -> PrintLevel -> PrintLevel -> [PrintLevel]
$cenumFromThenTo :: PrintLevel -> PrintLevel -> PrintLevel -> [PrintLevel]
enumFromTo :: PrintLevel -> PrintLevel -> [PrintLevel]
$cenumFromTo :: PrintLevel -> PrintLevel -> [PrintLevel]
enumFromThen :: PrintLevel -> PrintLevel -> [PrintLevel]
$cenumFromThen :: PrintLevel -> PrintLevel -> [PrintLevel]
enumFrom :: PrintLevel -> [PrintLevel]
$cenumFrom :: PrintLevel -> [PrintLevel]
fromEnum :: PrintLevel -> Int
$cfromEnum :: PrintLevel -> Int
toEnum :: Int -> PrintLevel
$ctoEnum :: Int -> PrintLevel
pred :: PrintLevel -> PrintLevel
$cpred :: PrintLevel -> PrintLevel
succ :: PrintLevel -> PrintLevel
$csucc :: PrintLevel -> PrintLevel
Enum)
data SoundFileFormat = Aiff | Flac | Ircam | Next | Raw | Wave
deriving (Int -> SoundFileFormat
SoundFileFormat -> Int
SoundFileFormat -> [SoundFileFormat]
SoundFileFormat -> SoundFileFormat
SoundFileFormat -> SoundFileFormat -> [SoundFileFormat]
SoundFileFormat
-> SoundFileFormat -> SoundFileFormat -> [SoundFileFormat]
(SoundFileFormat -> SoundFileFormat)
-> (SoundFileFormat -> SoundFileFormat)
-> (Int -> SoundFileFormat)
-> (SoundFileFormat -> Int)
-> (SoundFileFormat -> [SoundFileFormat])
-> (SoundFileFormat -> SoundFileFormat -> [SoundFileFormat])
-> (SoundFileFormat -> SoundFileFormat -> [SoundFileFormat])
-> (SoundFileFormat
-> SoundFileFormat -> SoundFileFormat -> [SoundFileFormat])
-> Enum SoundFileFormat
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 :: SoundFileFormat
-> SoundFileFormat -> SoundFileFormat -> [SoundFileFormat]
$cenumFromThenTo :: SoundFileFormat
-> SoundFileFormat -> SoundFileFormat -> [SoundFileFormat]
enumFromTo :: SoundFileFormat -> SoundFileFormat -> [SoundFileFormat]
$cenumFromTo :: SoundFileFormat -> SoundFileFormat -> [SoundFileFormat]
enumFromThen :: SoundFileFormat -> SoundFileFormat -> [SoundFileFormat]
$cenumFromThen :: SoundFileFormat -> SoundFileFormat -> [SoundFileFormat]
enumFrom :: SoundFileFormat -> [SoundFileFormat]
$cenumFrom :: SoundFileFormat -> [SoundFileFormat]
fromEnum :: SoundFileFormat -> Int
$cfromEnum :: SoundFileFormat -> Int
toEnum :: Int -> SoundFileFormat
$ctoEnum :: Int -> SoundFileFormat
pred :: SoundFileFormat -> SoundFileFormat
$cpred :: SoundFileFormat -> SoundFileFormat
succ :: SoundFileFormat -> SoundFileFormat
$csucc :: SoundFileFormat -> SoundFileFormat
Enum, SoundFileFormat -> SoundFileFormat -> Bool
(SoundFileFormat -> SoundFileFormat -> Bool)
-> (SoundFileFormat -> SoundFileFormat -> Bool)
-> Eq SoundFileFormat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SoundFileFormat -> SoundFileFormat -> Bool
$c/= :: SoundFileFormat -> SoundFileFormat -> Bool
== :: SoundFileFormat -> SoundFileFormat -> Bool
$c== :: SoundFileFormat -> SoundFileFormat -> Bool
Eq, ReadPrec [SoundFileFormat]
ReadPrec SoundFileFormat
Int -> ReadS SoundFileFormat
ReadS [SoundFileFormat]
(Int -> ReadS SoundFileFormat)
-> ReadS [SoundFileFormat]
-> ReadPrec SoundFileFormat
-> ReadPrec [SoundFileFormat]
-> Read SoundFileFormat
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SoundFileFormat]
$creadListPrec :: ReadPrec [SoundFileFormat]
readPrec :: ReadPrec SoundFileFormat
$creadPrec :: ReadPrec SoundFileFormat
readList :: ReadS [SoundFileFormat]
$creadList :: ReadS [SoundFileFormat]
readsPrec :: Int -> ReadS SoundFileFormat
$creadsPrec :: Int -> ReadS SoundFileFormat
Read, Int -> SoundFileFormat -> ShowS
[SoundFileFormat] -> ShowS
SoundFileFormat -> String
(Int -> SoundFileFormat -> ShowS)
-> (SoundFileFormat -> String)
-> ([SoundFileFormat] -> ShowS)
-> Show SoundFileFormat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SoundFileFormat] -> ShowS
$cshowList :: [SoundFileFormat] -> ShowS
show :: SoundFileFormat -> String
$cshow :: SoundFileFormat -> String
showsPrec :: Int -> SoundFileFormat -> ShowS
$cshowsPrec :: Int -> SoundFileFormat -> ShowS
Show)
data SampleFormat =
PcmInt8 | PcmInt16 | PcmInt24 | PcmInt32
| PcmFloat | PcmDouble
| PcmMulaw | PcmAlaw
deriving (Int -> SampleFormat
SampleFormat -> Int
SampleFormat -> [SampleFormat]
SampleFormat -> SampleFormat
SampleFormat -> SampleFormat -> [SampleFormat]
SampleFormat -> SampleFormat -> SampleFormat -> [SampleFormat]
(SampleFormat -> SampleFormat)
-> (SampleFormat -> SampleFormat)
-> (Int -> SampleFormat)
-> (SampleFormat -> Int)
-> (SampleFormat -> [SampleFormat])
-> (SampleFormat -> SampleFormat -> [SampleFormat])
-> (SampleFormat -> SampleFormat -> [SampleFormat])
-> (SampleFormat -> SampleFormat -> SampleFormat -> [SampleFormat])
-> Enum SampleFormat
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 :: SampleFormat -> SampleFormat -> SampleFormat -> [SampleFormat]
$cenumFromThenTo :: SampleFormat -> SampleFormat -> SampleFormat -> [SampleFormat]
enumFromTo :: SampleFormat -> SampleFormat -> [SampleFormat]
$cenumFromTo :: SampleFormat -> SampleFormat -> [SampleFormat]
enumFromThen :: SampleFormat -> SampleFormat -> [SampleFormat]
$cenumFromThen :: SampleFormat -> SampleFormat -> [SampleFormat]
enumFrom :: SampleFormat -> [SampleFormat]
$cenumFrom :: SampleFormat -> [SampleFormat]
fromEnum :: SampleFormat -> Int
$cfromEnum :: SampleFormat -> Int
toEnum :: Int -> SampleFormat
$ctoEnum :: Int -> SampleFormat
pred :: SampleFormat -> SampleFormat
$cpred :: SampleFormat -> SampleFormat
succ :: SampleFormat -> SampleFormat
$csucc :: SampleFormat -> SampleFormat
Enum, SampleFormat -> SampleFormat -> Bool
(SampleFormat -> SampleFormat -> Bool)
-> (SampleFormat -> SampleFormat -> Bool) -> Eq SampleFormat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SampleFormat -> SampleFormat -> Bool
$c/= :: SampleFormat -> SampleFormat -> Bool
== :: SampleFormat -> SampleFormat -> Bool
$c== :: SampleFormat -> SampleFormat -> Bool
Eq, ReadPrec [SampleFormat]
ReadPrec SampleFormat
Int -> ReadS SampleFormat
ReadS [SampleFormat]
(Int -> ReadS SampleFormat)
-> ReadS [SampleFormat]
-> ReadPrec SampleFormat
-> ReadPrec [SampleFormat]
-> Read SampleFormat
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SampleFormat]
$creadListPrec :: ReadPrec [SampleFormat]
readPrec :: ReadPrec SampleFormat
$creadPrec :: ReadPrec SampleFormat
readList :: ReadS [SampleFormat]
$creadList :: ReadS [SampleFormat]
readsPrec :: Int -> ReadS SampleFormat
$creadsPrec :: Int -> ReadS SampleFormat
Read, Int -> SampleFormat -> ShowS
[SampleFormat] -> ShowS
SampleFormat -> String
(Int -> SampleFormat -> ShowS)
-> (SampleFormat -> String)
-> ([SampleFormat] -> ShowS)
-> Show SampleFormat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SampleFormat] -> ShowS
$cshowList :: [SampleFormat] -> ShowS
show :: SampleFormat -> String
$cshow :: SampleFormat -> String
showsPrec :: Int -> SampleFormat -> ShowS
$cshowsPrec :: Int -> SampleFormat -> ShowS
Show)
soundFileFormatString :: SoundFileFormat -> String
soundFileFormatString :: SoundFileFormat -> String
soundFileFormatString SoundFileFormat
f =
case SoundFileFormat
f of
SoundFileFormat
Aiff -> String
"aiff"
SoundFileFormat
Flac -> String
"flac"
SoundFileFormat
Ircam -> String
"ircam"
SoundFileFormat
Next -> String
"next"
SoundFileFormat
Raw -> String
"raw"
SoundFileFormat
Wave -> String
"wav"
soundFileFormat_from_extension :: String -> Maybe SoundFileFormat
soundFileFormat_from_extension :: String -> Maybe SoundFileFormat
soundFileFormat_from_extension =
let tbl :: [(String, SoundFileFormat)]
tbl = [(String
"aif",SoundFileFormat
Aiff)
,(String
"aiff",SoundFileFormat
Aiff)
,(String
"flac",SoundFileFormat
Flac)
,(String
"ircam",SoundFileFormat
Ircam)
,(String
"next",SoundFileFormat
Next)
,(String
"raw",SoundFileFormat
Raw)
,(String
"wav",SoundFileFormat
Wave)]
in (String -> [(String, SoundFileFormat)] -> Maybe SoundFileFormat)
-> [(String, SoundFileFormat)] -> String -> Maybe SoundFileFormat
forall a b c. (a -> b -> c) -> b -> a -> c
flip String -> [(String, SoundFileFormat)] -> Maybe SoundFileFormat
forall a b. Eq a => a -> [(a, b)] -> Maybe b
lookup [(String, SoundFileFormat)]
tbl
soundFileFormat_from_extension_err :: String -> SoundFileFormat
soundFileFormat_from_extension_err :: String -> SoundFileFormat
soundFileFormat_from_extension_err =
SoundFileFormat -> Maybe SoundFileFormat -> SoundFileFormat
forall a. a -> Maybe a -> a
fromMaybe (String -> SoundFileFormat
forall a. HasCallStack => String -> a
error String
"soundFileFormat_from_extension: unknown sf extension") (Maybe SoundFileFormat -> SoundFileFormat)
-> (String -> Maybe SoundFileFormat) -> String -> SoundFileFormat
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
String -> Maybe SoundFileFormat
soundFileFormat_from_extension
sampleFormatString :: SampleFormat -> String
sampleFormatString :: SampleFormat -> String
sampleFormatString SampleFormat
f =
case SampleFormat
f of
SampleFormat
PcmInt8 -> String
"int8"
SampleFormat
PcmInt16 -> String
"int16"
SampleFormat
PcmInt24 -> String
"int24"
SampleFormat
PcmInt32 -> String
"int32"
SampleFormat
PcmFloat -> String
"float"
SampleFormat
PcmDouble -> String
"double"
SampleFormat
PcmMulaw -> String
"mulaw"
SampleFormat
PcmAlaw -> String
"alaw"