sample-frame-0.0.4: Handling of samples in an (audio) signal
Safe HaskellSafe-Inferred
LanguageHaskell98

Sound.Frame

Synopsis

Documentation

class C y where Source #

This is a class for nested tuples used as sample frames.

Should we make Storable a superclass of C?

Methods

numberOfChannels :: y -> Int Source #

The argument is not touched and can be undefined

sizeOfElement :: y -> Int Source #

Size of elements. In a nested record type, like Stereo (Stereo a), it is the size of the atomic element, in our example a. We assume that the atomic element values all have the same size, such that sizeOfElement undefined is defined.

Instances

Instances details
C Int16 Source # 
Instance details

Defined in Sound.Frame

C Int32 Source # 
Instance details

Defined in Sound.Frame

C Int8 Source # 
Instance details

Defined in Sound.Frame

C Word16 Source # 
Instance details

Defined in Sound.Frame

C Word32 Source # 
Instance details

Defined in Sound.Frame

C Word8 Source # 
Instance details

Defined in Sound.Frame

C T Source # 
Instance details

Defined in Sound.Frame.MuLaw

C Double Source # 
Instance details

Defined in Sound.Frame

C Float Source # 
Instance details

Defined in Sound.Frame

C a => C (T a) Source # 
Instance details

Defined in Sound.Frame.Stereo

numberOfChannelsFoldable :: (C y, Foldable f) => f y -> Int Source #

Default implementations for a foldable Frame.

sizeOfElementType :: C y => f y -> Int Source #

Returns the size of an undefined element. This might be more efficient than sizeOfElementFoldable.

paddedSizeOf :: Storable a => a -> Int Source #

Space that an element consumes in a Storable Array. This is space for the element plus padding.

withSignal :: (y -> a) -> sig y -> a Source #