/usr/lib/hugs/packages/OpenAL/Sound/OpenAL/AL/SourceState.hs is in libhugs-openal-bundled 98.200609.21-5.4build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | -- #hide
--------------------------------------------------------------------------------
-- |
-- Module : Sound.OpenAL.AL.SourceState
-- Copyright : (c) Sven Panne 2003-2005
-- License : BSD-style (see the file libraries/OpenAL/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : provisional
-- Portability : portable
--
--------------------------------------------------------------------------------
module Sound.OpenAL.AL.SourceState (
SourceState(..), unmarshalSourceState
) where
import Sound.OpenAL.AL.BasicTypes ( ALint )
import Sound.OpenAL.Constants ( al_INITIAL, al_PLAYING, al_PAUSED, al_STOPPED )
--------------------------------------------------------------------------------
-- | Each source can be in one of four possible execution states: 'Initial',
-- 'Playing', 'Paused', 'Stopped'. Sources that are either 'Playing' or 'Paused'
-- are considered active. Sources that are 'Stopped' or 'Initial' are considered
-- inactive. Only 'Playing' sources are included in the processing. The
-- implementation is free to skip those processing stages for sources that have
-- no effect on the output (e.g. mixing for a source muted by zero gain, but not
-- sample offset increments). Depending on the current state of a source certain
-- (e.g. repeated) state transition commands are legal NOPs: they will be
-- ignored, no error is generated.
data SourceState =
Initial
| Playing
| Paused
| Stopped
deriving ( Eq, Ord, Show )
unmarshalSourceState :: ALint -> SourceState
unmarshalSourceState x
| x == al_INITIAL = Initial
| x == al_PLAYING = Playing
| x == al_PAUSED = Paused
| x == al_STOPPED = Stopped
| otherwise = error ("unmarshalSourceState: illegal value " ++ show x)
|