{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstAudio.Interfaces.StreamVolume
(
StreamVolume(..) ,
noStreamVolume ,
IsStreamVolume ,
toStreamVolume ,
#if defined(ENABLE_OVERLOADING)
ResolveStreamVolumeMethod ,
#endif
streamVolumeConvertVolume ,
#if defined(ENABLE_OVERLOADING)
StreamVolumeGetMuteMethodInfo ,
#endif
streamVolumeGetMute ,
#if defined(ENABLE_OVERLOADING)
StreamVolumeGetVolumeMethodInfo ,
#endif
streamVolumeGetVolume ,
#if defined(ENABLE_OVERLOADING)
StreamVolumeSetMuteMethodInfo ,
#endif
streamVolumeSetMute ,
#if defined(ENABLE_OVERLOADING)
StreamVolumeSetVolumeMethodInfo ,
#endif
streamVolumeSetVolume ,
#if defined(ENABLE_OVERLOADING)
StreamVolumeMutePropertyInfo ,
#endif
constructStreamVolumeMute ,
getStreamVolumeMute ,
setStreamVolumeMute ,
#if defined(ENABLE_OVERLOADING)
streamVolumeMute ,
#endif
#if defined(ENABLE_OVERLOADING)
StreamVolumeVolumePropertyInfo ,
#endif
constructStreamVolumeVolume ,
getStreamVolumeVolume ,
setStreamVolumeVolume ,
#if defined(ENABLE_OVERLOADING)
streamVolumeVolume ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.GstAudio.Enums as GstAudio.Enums
newtype StreamVolume = StreamVolume (ManagedPtr StreamVolume)
deriving (StreamVolume -> StreamVolume -> Bool
(StreamVolume -> StreamVolume -> Bool)
-> (StreamVolume -> StreamVolume -> Bool) -> Eq StreamVolume
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StreamVolume -> StreamVolume -> Bool
$c/= :: StreamVolume -> StreamVolume -> Bool
== :: StreamVolume -> StreamVolume -> Bool
$c== :: StreamVolume -> StreamVolume -> Bool
Eq)
noStreamVolume :: Maybe StreamVolume
noStreamVolume :: Maybe StreamVolume
noStreamVolume = Maybe StreamVolume
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList StreamVolume = StreamVolumeSignalList
type StreamVolumeSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_stream_volume_get_type"
c_gst_stream_volume_get_type :: IO GType
instance GObject StreamVolume where
gobjectType :: IO GType
gobjectType = IO GType
c_gst_stream_volume_get_type
instance B.GValue.IsGValue StreamVolume where
toGValue :: StreamVolume -> IO GValue
toGValue o :: StreamVolume
o = do
GType
gtype <- IO GType
c_gst_stream_volume_get_type
StreamVolume -> (Ptr StreamVolume -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr StreamVolume
o (GType
-> (GValue -> Ptr StreamVolume -> IO ())
-> Ptr StreamVolume
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr StreamVolume -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO StreamVolume
fromGValue gv :: GValue
gv = do
Ptr StreamVolume
ptr <- GValue -> IO (Ptr StreamVolume)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr StreamVolume)
(ManagedPtr StreamVolume -> StreamVolume)
-> Ptr StreamVolume -> IO StreamVolume
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr StreamVolume -> StreamVolume
StreamVolume Ptr StreamVolume
ptr
class (GObject o, O.IsDescendantOf StreamVolume o) => IsStreamVolume o
instance (GObject o, O.IsDescendantOf StreamVolume o) => IsStreamVolume o
instance O.HasParentTypes StreamVolume
type instance O.ParentTypes StreamVolume = '[GObject.Object.Object]
toStreamVolume :: (MonadIO m, IsStreamVolume o) => o -> m StreamVolume
toStreamVolume :: o -> m StreamVolume
toStreamVolume = IO StreamVolume -> m StreamVolume
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO StreamVolume -> m StreamVolume)
-> (o -> IO StreamVolume) -> o -> m StreamVolume
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr StreamVolume -> StreamVolume) -> o -> IO StreamVolume
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr StreamVolume -> StreamVolume
StreamVolume
getStreamVolumeMute :: (MonadIO m, IsStreamVolume o) => o -> m Bool
getStreamVolumeMute :: o -> m Bool
getStreamVolumeMute obj :: o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "mute"
setStreamVolumeMute :: (MonadIO m, IsStreamVolume o) => o -> Bool -> m ()
setStreamVolumeMute :: o -> Bool -> m ()
setStreamVolumeMute obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj "mute" Bool
val
constructStreamVolumeMute :: (IsStreamVolume o) => Bool -> IO (GValueConstruct o)
constructStreamVolumeMute :: Bool -> IO (GValueConstruct o)
constructStreamVolumeMute val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "mute" Bool
val
#if defined(ENABLE_OVERLOADING)
data StreamVolumeMutePropertyInfo
instance AttrInfo StreamVolumeMutePropertyInfo where
type AttrAllowedOps StreamVolumeMutePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint StreamVolumeMutePropertyInfo = IsStreamVolume
type AttrSetTypeConstraint StreamVolumeMutePropertyInfo = (~) Bool
type AttrTransferTypeConstraint StreamVolumeMutePropertyInfo = (~) Bool
type AttrTransferType StreamVolumeMutePropertyInfo = Bool
type AttrGetType StreamVolumeMutePropertyInfo = Bool
type AttrLabel StreamVolumeMutePropertyInfo = "mute"
type AttrOrigin StreamVolumeMutePropertyInfo = StreamVolume
attrGet = getStreamVolumeMute
attrSet = setStreamVolumeMute
attrTransfer _ v = do
return v
attrConstruct = constructStreamVolumeMute
attrClear = undefined
#endif
getStreamVolumeVolume :: (MonadIO m, IsStreamVolume o) => o -> m Double
getStreamVolumeVolume :: o -> m Double
getStreamVolumeVolume obj :: o
obj = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Double
forall a. GObject a => a -> String -> IO Double
B.Properties.getObjectPropertyDouble o
obj "volume"
setStreamVolumeVolume :: (MonadIO m, IsStreamVolume o) => o -> Double -> m ()
setStreamVolumeVolume :: o -> Double -> m ()
setStreamVolumeVolume obj :: o
obj val :: Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Double -> IO ()
forall a. GObject a => a -> String -> Double -> IO ()
B.Properties.setObjectPropertyDouble o
obj "volume" Double
val
constructStreamVolumeVolume :: (IsStreamVolume o) => Double -> IO (GValueConstruct o)
constructStreamVolumeVolume :: Double -> IO (GValueConstruct o)
constructStreamVolumeVolume val :: Double
val = String -> Double -> IO (GValueConstruct o)
forall o. String -> Double -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyDouble "volume" Double
val
#if defined(ENABLE_OVERLOADING)
data StreamVolumeVolumePropertyInfo
instance AttrInfo StreamVolumeVolumePropertyInfo where
type AttrAllowedOps StreamVolumeVolumePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint StreamVolumeVolumePropertyInfo = IsStreamVolume
type AttrSetTypeConstraint StreamVolumeVolumePropertyInfo = (~) Double
type AttrTransferTypeConstraint StreamVolumeVolumePropertyInfo = (~) Double
type AttrTransferType StreamVolumeVolumePropertyInfo = Double
type AttrGetType StreamVolumeVolumePropertyInfo = Double
type AttrLabel StreamVolumeVolumePropertyInfo = "volume"
type AttrOrigin StreamVolumeVolumePropertyInfo = StreamVolume
attrGet = getStreamVolumeVolume
attrSet = setStreamVolumeVolume
attrTransfer _ v = do
return v
attrConstruct = constructStreamVolumeVolume
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList StreamVolume
type instance O.AttributeList StreamVolume = StreamVolumeAttributeList
type StreamVolumeAttributeList = ('[ '("mute", StreamVolumeMutePropertyInfo), '("volume", StreamVolumeVolumePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
streamVolumeMute :: AttrLabelProxy "mute"
streamVolumeMute = AttrLabelProxy
streamVolumeVolume :: AttrLabelProxy "volume"
streamVolumeVolume = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveStreamVolumeMethod (t :: Symbol) (o :: *) :: * where
ResolveStreamVolumeMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveStreamVolumeMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveStreamVolumeMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveStreamVolumeMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveStreamVolumeMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveStreamVolumeMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveStreamVolumeMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveStreamVolumeMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveStreamVolumeMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveStreamVolumeMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveStreamVolumeMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveStreamVolumeMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveStreamVolumeMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveStreamVolumeMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveStreamVolumeMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveStreamVolumeMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveStreamVolumeMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveStreamVolumeMethod "getMute" o = StreamVolumeGetMuteMethodInfo
ResolveStreamVolumeMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveStreamVolumeMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveStreamVolumeMethod "getVolume" o = StreamVolumeGetVolumeMethodInfo
ResolveStreamVolumeMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveStreamVolumeMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveStreamVolumeMethod "setMute" o = StreamVolumeSetMuteMethodInfo
ResolveStreamVolumeMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveStreamVolumeMethod "setVolume" o = StreamVolumeSetVolumeMethodInfo
ResolveStreamVolumeMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveStreamVolumeMethod t StreamVolume, O.MethodInfo info StreamVolume p) => OL.IsLabel t (StreamVolume -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
foreign import ccall "gst_stream_volume_get_mute" gst_stream_volume_get_mute ::
Ptr StreamVolume ->
IO CInt
streamVolumeGetMute ::
(B.CallStack.HasCallStack, MonadIO m, IsStreamVolume a) =>
a
-> m Bool
streamVolumeGetMute :: a -> m Bool
streamVolumeGetMute volume :: a
volume = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr StreamVolume
volume' <- a -> IO (Ptr StreamVolume)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volume
CInt
result <- Ptr StreamVolume -> IO CInt
gst_stream_volume_get_mute Ptr StreamVolume
volume'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
volume
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StreamVolumeGetMuteMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsStreamVolume a) => O.MethodInfo StreamVolumeGetMuteMethodInfo a signature where
overloadedMethod = streamVolumeGetMute
#endif
foreign import ccall "gst_stream_volume_get_volume" gst_stream_volume_get_volume ::
Ptr StreamVolume ->
CUInt ->
IO CDouble
streamVolumeGetVolume ::
(B.CallStack.HasCallStack, MonadIO m, IsStreamVolume a) =>
a
-> GstAudio.Enums.StreamVolumeFormat
-> m Double
streamVolumeGetVolume :: a -> StreamVolumeFormat -> m Double
streamVolumeGetVolume volume :: a
volume format :: StreamVolumeFormat
format = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
Ptr StreamVolume
volume' <- a -> IO (Ptr StreamVolume)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volume
let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (StreamVolumeFormat -> Int) -> StreamVolumeFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StreamVolumeFormat -> Int
forall a. Enum a => a -> Int
fromEnum) StreamVolumeFormat
format
CDouble
result <- Ptr StreamVolume -> CUInt -> IO CDouble
gst_stream_volume_get_volume Ptr StreamVolume
volume' CUInt
format'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
volume
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data StreamVolumeGetVolumeMethodInfo
instance (signature ~ (GstAudio.Enums.StreamVolumeFormat -> m Double), MonadIO m, IsStreamVolume a) => O.MethodInfo StreamVolumeGetVolumeMethodInfo a signature where
overloadedMethod = streamVolumeGetVolume
#endif
foreign import ccall "gst_stream_volume_set_mute" gst_stream_volume_set_mute ::
Ptr StreamVolume ->
CInt ->
IO ()
streamVolumeSetMute ::
(B.CallStack.HasCallStack, MonadIO m, IsStreamVolume a) =>
a
-> Bool
-> m ()
streamVolumeSetMute :: a -> Bool -> m ()
streamVolumeSetMute volume :: a
volume mute :: Bool
mute = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StreamVolume
volume' <- a -> IO (Ptr StreamVolume)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volume
let mute' :: CInt
mute' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
mute
Ptr StreamVolume -> CInt -> IO ()
gst_stream_volume_set_mute Ptr StreamVolume
volume' CInt
mute'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
volume
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StreamVolumeSetMuteMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsStreamVolume a) => O.MethodInfo StreamVolumeSetMuteMethodInfo a signature where
overloadedMethod = streamVolumeSetMute
#endif
foreign import ccall "gst_stream_volume_set_volume" gst_stream_volume_set_volume ::
Ptr StreamVolume ->
CUInt ->
CDouble ->
IO ()
streamVolumeSetVolume ::
(B.CallStack.HasCallStack, MonadIO m, IsStreamVolume a) =>
a
-> GstAudio.Enums.StreamVolumeFormat
-> Double
-> m ()
streamVolumeSetVolume :: a -> StreamVolumeFormat -> Double -> m ()
streamVolumeSetVolume volume :: a
volume format :: StreamVolumeFormat
format val :: Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StreamVolume
volume' <- a -> IO (Ptr StreamVolume)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
volume
let format' :: CUInt
format' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (StreamVolumeFormat -> Int) -> StreamVolumeFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StreamVolumeFormat -> Int
forall a. Enum a => a -> Int
fromEnum) StreamVolumeFormat
format
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
Ptr StreamVolume -> CUInt -> CDouble -> IO ()
gst_stream_volume_set_volume Ptr StreamVolume
volume' CUInt
format' CDouble
val'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
volume
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StreamVolumeSetVolumeMethodInfo
instance (signature ~ (GstAudio.Enums.StreamVolumeFormat -> Double -> m ()), MonadIO m, IsStreamVolume a) => O.MethodInfo StreamVolumeSetVolumeMethodInfo a signature where
overloadedMethod = streamVolumeSetVolume
#endif
foreign import ccall "gst_stream_volume_convert_volume" gst_stream_volume_convert_volume ::
CUInt ->
CUInt ->
CDouble ->
IO CDouble
streamVolumeConvertVolume ::
(B.CallStack.HasCallStack, MonadIO m) =>
GstAudio.Enums.StreamVolumeFormat
-> GstAudio.Enums.StreamVolumeFormat
-> Double
-> m Double
streamVolumeConvertVolume :: StreamVolumeFormat -> StreamVolumeFormat -> Double -> m Double
streamVolumeConvertVolume from :: StreamVolumeFormat
from to :: StreamVolumeFormat
to val :: Double
val = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
let from' :: CUInt
from' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (StreamVolumeFormat -> Int) -> StreamVolumeFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StreamVolumeFormat -> Int
forall a. Enum a => a -> Int
fromEnum) StreamVolumeFormat
from
let to' :: CUInt
to' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (StreamVolumeFormat -> Int) -> StreamVolumeFormat -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StreamVolumeFormat -> Int
forall a. Enum a => a -> Int
fromEnum) StreamVolumeFormat
to
let val' :: CDouble
val' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
val
CDouble
result <- CUInt -> CUInt -> CDouble -> IO CDouble
gst_stream_volume_convert_volume CUInt
from' CUInt
to' CDouble
val'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
#endif