module JSDOM.Generated.AnalyserNode
(getFloatFrequencyData, getByteFrequencyData,
getByteTimeDomainData, setFftSize, getFftSize,
getFrequencyBinCount, setMinDecibels, getMinDecibels,
setMaxDecibels, getMaxDecibels, setSmoothingTimeConstant,
getSmoothingTimeConstant, AnalyserNode(..), gTypeAnalyserNode)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName)
import JSDOM.Enums
getFloatFrequencyData ::
(MonadDOM m, IsFloat32Array array) =>
AnalyserNode -> Maybe array -> m ()
getFloatFrequencyData self array
= liftDOM
(void (self ^. jsf "getFloatFrequencyData" [toJSVal array]))
getByteFrequencyData ::
(MonadDOM m, IsUint8Array array) =>
AnalyserNode -> Maybe array -> m ()
getByteFrequencyData self array
= liftDOM
(void (self ^. jsf "getByteFrequencyData" [toJSVal array]))
getByteTimeDomainData ::
(MonadDOM m, IsUint8Array array) =>
AnalyserNode -> Maybe array -> m ()
getByteTimeDomainData self array
= liftDOM
(void (self ^. jsf "getByteTimeDomainData" [toJSVal array]))
setFftSize :: (MonadDOM m) => AnalyserNode -> Word -> m ()
setFftSize self val = liftDOM (self ^. jss "fftSize" (toJSVal val))
getFftSize :: (MonadDOM m) => AnalyserNode -> m Word
getFftSize self
= liftDOM (round <$> ((self ^. js "fftSize") >>= valToNumber))
getFrequencyBinCount :: (MonadDOM m) => AnalyserNode -> m Word
getFrequencyBinCount self
= liftDOM
(round <$> ((self ^. js "frequencyBinCount") >>= valToNumber))
setMinDecibels :: (MonadDOM m) => AnalyserNode -> Double -> m ()
setMinDecibels self val
= liftDOM (self ^. jss "minDecibels" (toJSVal val))
getMinDecibels :: (MonadDOM m) => AnalyserNode -> m Double
getMinDecibels self
= liftDOM ((self ^. js "minDecibels") >>= valToNumber)
setMaxDecibels :: (MonadDOM m) => AnalyserNode -> Double -> m ()
setMaxDecibels self val
= liftDOM (self ^. jss "maxDecibels" (toJSVal val))
getMaxDecibels :: (MonadDOM m) => AnalyserNode -> m Double
getMaxDecibels self
= liftDOM ((self ^. js "maxDecibels") >>= valToNumber)
setSmoothingTimeConstant ::
(MonadDOM m) => AnalyserNode -> Double -> m ()
setSmoothingTimeConstant self val
= liftDOM (self ^. jss "smoothingTimeConstant" (toJSVal val))
getSmoothingTimeConstant ::
(MonadDOM m) => AnalyserNode -> m Double
getSmoothingTimeConstant self
= liftDOM ((self ^. js "smoothingTimeConstant") >>= valToNumber)