    {-# LINE 1 "Graphics/UI/SDL/Audio.hsc" #-}

    {-# LINE 5 "Graphics/UI/SDL/Audio.hsc" #-}
    -----------------------------------------------------------------------------
    -- |
    -- Module      :  Graphics.UI.SDL.Audio
    -- Copyright   :  (c) David Himmelstrup 2005
    -- License     :  BSD-like
    --
    -- Maintainer  :  lemmih@gmail.com
    -- Stability   :  provisional
    -- Portability :  portable
    --
    -----------------------------------------------------------------------------
    module Graphics.UI.SDL.Audio
        ( AudioFormat (..)
        , fromAudioFormat
        , toAudioFormat
        ) where

    import Data.Word (Word16)

    data AudioFormat
        = AudioU8
        | AudioS8
        | AudioU16LSB
        | AudioS16LSB
        | AudioU16MSB
        | AudioS16MSB
        | AudioU16Sys
        | AudioS16Sys
          deriving (Int -> AudioFormat -> ShowS
    [AudioFormat] -> ShowS
    AudioFormat -> String
    (Int -> AudioFormat -> ShowS)
    -> (AudioFormat -> String)
    -> ([AudioFormat] -> ShowS)
    -> Show AudioFormat
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> AudioFormat -> ShowS
    showsPrec :: Int -> AudioFormat -> ShowS
    $cshow :: AudioFormat -> String
    show :: AudioFormat -> String
    $cshowList :: [AudioFormat] -> ShowS
    showList :: [AudioFormat] -> ShowS
    Show,AudioFormat -> AudioFormat -> Bool
    (AudioFormat -> AudioFormat -> Bool)
    -> (AudioFormat -> AudioFormat -> Bool) -> Eq AudioFormat
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: AudioFormat -> AudioFormat -> Bool
    == :: AudioFormat -> AudioFormat -> Bool
    $c/= :: AudioFormat -> AudioFormat -> Bool
    /= :: AudioFormat -> AudioFormat -> Bool
    Eq,Eq AudioFormat
    Eq AudioFormat
    -> (AudioFormat -> AudioFormat -> Ordering)
    -> (AudioFormat -> AudioFormat -> Bool)
    -> (AudioFormat -> AudioFormat -> Bool)
    -> (AudioFormat -> AudioFormat -> Bool)
    -> (AudioFormat -> AudioFormat -> Bool)
    -> (AudioFormat -> AudioFormat -> AudioFormat)
    -> (AudioFormat -> AudioFormat -> AudioFormat)
    -> Ord AudioFormat
    AudioFormat -> AudioFormat -> Bool
    AudioFormat -> AudioFormat -> Ordering
    AudioFormat -> AudioFormat -> AudioFormat
    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
    $ccompare :: AudioFormat -> AudioFormat -> Ordering
    compare :: AudioFormat -> AudioFormat -> Ordering
    $c< :: AudioFormat -> AudioFormat -> Bool
    < :: AudioFormat -> AudioFormat -> Bool
    $c<= :: AudioFormat -> AudioFormat -> Bool
    <= :: AudioFormat -> AudioFormat -> Bool
    $c> :: AudioFormat -> AudioFormat -> Bool
    > :: AudioFormat -> AudioFormat -> Bool
    $c>= :: AudioFormat -> AudioFormat -> Bool
    >= :: AudioFormat -> AudioFormat -> Bool
    $cmax :: AudioFormat -> AudioFormat -> AudioFormat
    max :: AudioFormat -> AudioFormat -> AudioFormat
    $cmin :: AudioFormat -> AudioFormat -> AudioFormat
    min :: AudioFormat -> AudioFormat -> AudioFormat
    Ord,Int -> AudioFormat
    AudioFormat -> Int
    AudioFormat -> [AudioFormat]
    AudioFormat -> AudioFormat
    AudioFormat -> AudioFormat -> [AudioFormat]
    AudioFormat -> AudioFormat -> AudioFormat -> [AudioFormat]
    (AudioFormat -> AudioFormat)
    -> (AudioFormat -> AudioFormat)
    -> (Int -> AudioFormat)
    -> (AudioFormat -> Int)
    -> (AudioFormat -> [AudioFormat])
    -> (AudioFormat -> AudioFormat -> [AudioFormat])
    -> (AudioFormat -> AudioFormat -> [AudioFormat])
    -> (AudioFormat -> AudioFormat -> AudioFormat -> [AudioFormat])
    -> Enum AudioFormat
    forall a.
    (a -> a)
    -> (a -> a)
    -> (Int -> a)
    -> (a -> Int)
    -> (a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> a -> [a])
    -> Enum a
    $csucc :: AudioFormat -> AudioFormat
    succ :: AudioFormat -> AudioFormat
    $cpred :: AudioFormat -> AudioFormat
    pred :: AudioFormat -> AudioFormat
    $ctoEnum :: Int -> AudioFormat
    toEnum :: Int -> AudioFormat
    $cfromEnum :: AudioFormat -> Int
    fromEnum :: AudioFormat -> Int
    $cenumFrom :: AudioFormat -> [AudioFormat]
    enumFrom :: AudioFormat -> [AudioFormat]
    $cenumFromThen :: AudioFormat -> AudioFormat -> [AudioFormat]
    enumFromThen :: AudioFormat -> AudioFormat -> [AudioFormat]
    $cenumFromTo :: AudioFormat -> AudioFormat -> [AudioFormat]
    enumFromTo :: AudioFormat -> AudioFormat -> [AudioFormat]
    $cenumFromThenTo :: AudioFormat -> AudioFormat -> AudioFormat -> [AudioFormat]
    enumFromThenTo :: AudioFormat -> AudioFormat -> AudioFormat -> [AudioFormat]
    Enum)

    fromAudioFormat :: AudioFormat -> Word16
    fromAudioFormat :: AudioFormat -> Word16
    fromAudioFormat AudioFormat
    AudioU8 = Word16
    8
    {-# LINE 37 "Graphics/UI/SDL/Audio.hsc" #-}
    fromAudioFormat AudioS8 = 32776
    {-# LINE 38 "Graphics/UI/SDL/Audio.hsc" #-}
    fromAudioFormat AudioU16LSB = 16
    {-# LINE 39 "Graphics/UI/SDL/Audio.hsc" #-}
    fromAudioFormat AudioS16LSB = 32784
    {-# LINE 40 "Graphics/UI/SDL/Audio.hsc" #-}
    fromAudioFormat AudioU16MSB = 4112
    {-# LINE 41 "Graphics/UI/SDL/Audio.hsc" #-}
    fromAudioFormat AudioS16MSB = 36880
    {-# LINE 42 "Graphics/UI/SDL/Audio.hsc" #-}
    fromAudioFormat AudioU16Sys = 16
    {-# LINE 43 "Graphics/UI/SDL/Audio.hsc" #-}
    fromAudioFormat AudioS16Sys = 32784
    {-# LINE 44 "Graphics/UI/SDL/Audio.hsc" #-}

    toAudioFormat :: Word16 -> AudioFormat
    toAudioFormat :: Word16 -> AudioFormat
    toAudioFormat Word16
    8 = AudioFormat
    AudioU8
    {-# LINE 47 "Graphics/UI/SDL/Audio.hsc" #-}
    toAudioFormat 32776 = AudioS8
    {-# LINE 48 "Graphics/UI/SDL/Audio.hsc" #-}
    toAudioFormat 16 = AudioU16LSB
    {-# LINE 49 "Graphics/UI/SDL/Audio.hsc" #-}
    toAudioFormat 32784 = AudioS16LSB
    {-# LINE 50 "Graphics/UI/SDL/Audio.hsc" #-}
    toAudioFormat 4112 = AudioU16MSB
    {-# LINE 51 "Graphics/UI/SDL/Audio.hsc" #-}
    toAudioFormat 36880 = AudioS16MSB
    {-# LINE 52 "Graphics/UI/SDL/Audio.hsc" #-}
    toAudioFormat _ = error "Graphics.UI.SDL.Audio.toAudioFormat: bad argument"