alsa-seq-0.5.1: src/Sound/ALSA/Sequencer/Marshal/QuerySubscribe.hsc
module Sound.ALSA.Sequencer.Marshal.QuerySubscribe where
#include <alsa/asoundlib.h>
import Foreign.C.Types (CInt, )
data Type =
Read
| Write
deriving (Show, Eq, Ord, Enum)
expType :: Type -> CInt
expType t = case t of
Read -> #{const SND_SEQ_QUERY_SUBS_READ}
Write -> #{const SND_SEQ_QUERY_SUBS_WRITE}
impType :: CInt -> Type
impType t = case t of
#{const SND_SEQ_QUERY_SUBS_READ} -> Read
#{const SND_SEQ_QUERY_SUBS_WRITE} -> Write
_ -> error ("QuerySubscribe.impType: unknown subscription type (" ++ show t ++ ")")