sox-0.0.1: src/Sound/Sox/Frame.hs
module Sound.Sox.Frame where
import qualified Sound.Sox.Format as Format
import Data.Word (Word8, Word16, )
import Data.Int (Int8, Int16, Int32, )
class C y where
{- | The argument is not touched and can be undefined -}
numberOfChannels :: y -> Int
format :: y -> Format.T
instance C Word8 where
numberOfChannels _ = 1
format _ = Format.unsignedByte
instance C Int8 where
numberOfChannels _ = 1
format _ = Format.signedByte
instance C Word16 where
numberOfChannels _ = 1
format _ = Format.unsignedWord
instance C Int16 where
numberOfChannels _ = 1
format _ = Format.signedWord
{-
instance C Word32 where
numberOfChannels _ = 1
format _ = Format.unsignedLong
-}
instance C Int32 where
numberOfChannels _ = 1
format _ = Format.signedLong
withSignal :: (y -> a) -> (sig y -> a)
withSignal f _ = f undefined