| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.GstAudio.Interfaces.StreamVolume
Contents
Description
This interface is implemented by elements that provide a stream volume. Examples for
such elements are volume and playbin.
Applications can use this interface to get or set the current stream volume. For this
the "volume" Object property can be used or the helper functions streamVolumeSetVolume
and streamVolumeGetVolume. This volume is always a linear factor, i.e. 0.0 is muted
1.0 is 100%. For showing the volume in a GUI it might make sense to convert it to
a different format by using streamVolumeConvertVolume. Volume sliders should usually
use a cubic volume.
Separate from the volume the stream can also be muted by the "mute" Object property or
streamVolumeSetMute and streamVolumeGetMute.
Elements that provide some kind of stream volume should implement the "volume" and
"mute" Object properties and handle setting and getting of them properly.
The volume property is defined to be a linear volume factor.
- newtype StreamVolume = StreamVolume (ManagedPtr StreamVolume)
- noStreamVolume :: Maybe StreamVolume
- class GObject o => IsStreamVolume o
- toStreamVolume :: (MonadIO m, IsStreamVolume o) => o -> m StreamVolume
- streamVolumeConvertVolume :: (HasCallStack, MonadIO m) => StreamVolumeFormat -> StreamVolumeFormat -> Double -> m Double
- streamVolumeGetMute :: (HasCallStack, MonadIO m, IsStreamVolume a) => a -> m Bool
- streamVolumeGetVolume :: (HasCallStack, MonadIO m, IsStreamVolume a) => a -> StreamVolumeFormat -> m Double
- streamVolumeSetMute :: (HasCallStack, MonadIO m, IsStreamVolume a) => a -> Bool -> m ()
- streamVolumeSetVolume :: (HasCallStack, MonadIO m, IsStreamVolume a) => a -> StreamVolumeFormat -> Double -> m ()
- constructStreamVolumeMute :: IsStreamVolume o => Bool -> IO (GValueConstruct o)
- getStreamVolumeMute :: (MonadIO m, IsStreamVolume o) => o -> m Bool
- setStreamVolumeMute :: (MonadIO m, IsStreamVolume o) => o -> Bool -> m ()
- constructStreamVolumeVolume :: IsStreamVolume o => Double -> IO (GValueConstruct o)
- getStreamVolumeVolume :: (MonadIO m, IsStreamVolume o) => o -> m Double
- setStreamVolumeVolume :: (MonadIO m, IsStreamVolume o) => o -> Double -> m ()
Exported types
newtype StreamVolume Source #
Constructors
| StreamVolume (ManagedPtr StreamVolume) |
class GObject o => IsStreamVolume o Source #
Instances
toStreamVolume :: (MonadIO m, IsStreamVolume o) => o -> m StreamVolume Source #
Methods
convertVolume
streamVolumeConvertVolume Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => StreamVolumeFormat |
|
| -> StreamVolumeFormat |
|
| -> Double |
|
| -> m Double | Returns: the converted volume |
No description available in the introspection data.
getMute
Arguments
| :: (HasCallStack, MonadIO m, IsStreamVolume a) | |
| => a |
|
| -> m Bool | Returns: Returns |
No description available in the introspection data.
getVolume
streamVolumeGetVolume Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStreamVolume a) | |
| => a |
|
| -> StreamVolumeFormat |
|
| -> m Double | Returns: The current stream volume as linear factor |
No description available in the introspection data.
setMute
Arguments
| :: (HasCallStack, MonadIO m, IsStreamVolume a) | |
| => a |
|
| -> Bool |
|
| -> m () |
No description available in the introspection data.
setVolume
streamVolumeSetVolume Source #
Arguments
| :: (HasCallStack, MonadIO m, IsStreamVolume a) | |
| => a |
|
| -> StreamVolumeFormat |
|
| -> Double |
|
| -> m () |
No description available in the introspection data.
Properties
mute
constructStreamVolumeMute :: IsStreamVolume o => Bool -> IO (GValueConstruct o) Source #
getStreamVolumeMute :: (MonadIO m, IsStreamVolume o) => o -> m Bool Source #
setStreamVolumeMute :: (MonadIO m, IsStreamVolume o) => o -> Bool -> m () Source #
volume
constructStreamVolumeVolume :: IsStreamVolume o => Double -> IO (GValueConstruct o) Source #
getStreamVolumeVolume :: (MonadIO m, IsStreamVolume o) => o -> m Double Source #
setStreamVolumeVolume :: (MonadIO m, IsStreamVolume o) => o -> Double -> m () Source #