gi-gstaudio-1.0.24: GStreamerAudio bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GstAudio.Interfaces.StreamVolume

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.

Synopsis

Exported types

class (GObject o, IsDescendantOf StreamVolume o) => IsStreamVolume o Source #

Type class for types which can be safely cast to StreamVolume, for instance with toStreamVolume.

Instances

Instances details
(GObject o, IsDescendantOf StreamVolume o) => IsStreamVolume o Source # 
Instance details

Defined in GI.GstAudio.Interfaces.StreamVolume

toStreamVolume :: (MonadIO m, IsStreamVolume o) => o -> m StreamVolume Source #

Cast to StreamVolume, for types for which this is known to be safe. For general casts, use castTo.

Methods

convertVolume

streamVolumeConvertVolume Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> StreamVolumeFormat

from: StreamVolumeFormat to convert from

-> StreamVolumeFormat

to: StreamVolumeFormat to convert to

-> Double

val: Volume in from format that should be converted

-> m Double

Returns: the converted volume

No description available in the introspection data.

getMute

streamVolumeGetMute Source #

Arguments

:: (HasCallStack, MonadIO m, IsStreamVolume a) 
=> a

volume: StreamVolume that should be used

-> m Bool

Returns: Returns True if the stream is muted

No description available in the introspection data.

getVolume

streamVolumeGetVolume Source #

Arguments

:: (HasCallStack, MonadIO m, IsStreamVolume a) 
=> a

volume: StreamVolume that should be used

-> StreamVolumeFormat

format: StreamVolumeFormat which should be returned

-> m Double

Returns: The current stream volume as linear factor

No description available in the introspection data.

setMute

streamVolumeSetMute Source #

Arguments

:: (HasCallStack, MonadIO m, IsStreamVolume a) 
=> a

volume: StreamVolume that should be used

-> Bool

mute: Mute state that should be set

-> m () 

No description available in the introspection data.

setVolume

streamVolumeSetVolume Source #

Arguments

:: (HasCallStack, MonadIO m, IsStreamVolume a) 
=> a

volume: StreamVolume that should be used

-> StreamVolumeFormat

format: StreamVolumeFormat of val

-> Double

val: Linear volume factor that should be set

-> m () 

No description available in the introspection data.

Properties

mute

No description available in the introspection data.

constructStreamVolumeMute :: (IsStreamVolume o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “mute” property. This is rarely needed directly, but it is used by new.

getStreamVolumeMute :: (MonadIO m, IsStreamVolume o) => o -> m Bool Source #

Get the value of the “mute” property. When overloading is enabled, this is equivalent to

get streamVolume #mute

setStreamVolumeMute :: (MonadIO m, IsStreamVolume o) => o -> Bool -> m () Source #

Set the value of the “mute” property. When overloading is enabled, this is equivalent to

set streamVolume [ #mute := value ]

volume

No description available in the introspection data.

constructStreamVolumeVolume :: (IsStreamVolume o, MonadIO m) => Double -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “volume” property. This is rarely needed directly, but it is used by new.

getStreamVolumeVolume :: (MonadIO m, IsStreamVolume o) => o -> m Double Source #

Get the value of the “volume” property. When overloading is enabled, this is equivalent to

get streamVolume #volume

setStreamVolumeVolume :: (MonadIO m, IsStreamVolume o) => o -> Double -> m () Source #

Set the value of the “volume” property. When overloading is enabled, this is equivalent to

set streamVolume [ #volume := value ]