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
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 Int32 where
numberOfChannels _ = 1
format _ = Format.signedLong
withSignal :: (y -> a) -> (sig y -> a)
withSignal f _ = f undefined