MateMixerStreamControl: libmatemixer Reference Manual

## MateMixerStreamControl MateMixerStreamControl |

## Functions

const gchar * | mate_mixer_stream_control_get_name ()
const gchar * | mate_mixer_stream_control_get_label ()
MateMixerStreamControlFlags | mate_mixer_stream_control_get_flags ()
MateMixerStreamControlRole | mate_mixer_stream_control_get_role ()
MateMixerStreamControlMediaRole | mate_mixer_stream_control_get_media_role ()
MateMixerAppInfo * | mate_mixer_stream_control_get_app_info ()
MateMixerStream * | mate_mixer_stream_control_get_stream ()
gboolean | mate_mixer_stream_control_set_stream ()
gboolean | mate_mixer_stream_control_get_mute ()
gboolean | mate_mixer_stream_control_set_mute ()
guint | mate_mixer_stream_control_get_num_channels ()
guint | mate_mixer_stream_control_get_volume ()
gboolean | mate_mixer_stream_control_set_volume ()
gdouble | mate_mixer_stream_control_get_decibel ()
gboolean | mate_mixer_stream_control_set_decibel ()
gboolean | mate_mixer_stream_control_has_channel_position ()
MateMixerChannelPosition | mate_mixer_stream_control_get_channel_position ()
guint | mate_mixer_stream_control_get_channel_volume ()
gboolean | mate_mixer_stream_control_set_channel_volume ()
gdouble | mate_mixer_stream_control_get_channel_decibel ()
gboolean | mate_mixer_stream_control_set_channel_decibel ()
gfloat | mate_mixer_stream_control_get_balance ()
gboolean | mate_mixer_stream_control_set_balance ()
gfloat | mate_mixer_stream_control_get_fade ()
gboolean | mate_mixer_stream_control_set_fade ()
gboolean | mate_mixer_stream_control_get_monitor_enabled ()
gboolean | mate_mixer_stream_control_set_monitor_enabled ()
guint | mate_mixer_stream_control_get_min_volume ()
guint | mate_mixer_stream_control_get_max_volume ()
guint | mate_mixer_stream_control_get_normal_volume ()
guint | mate_mixer_stream_control_get_base_volume ()

## Properties

float | balance | Read
float | fade | Read
MateMixerStreamControlFlags | flags | Read / Write / Construct Only
char * | label | Read / Write / Construct Only
MateMixerStreamControlMediaRole | media-role | Read / Write / Construct Only
gboolean | mute | Read
char * | name | Read / Write / Construct Only
MateMixerStreamControlRole | role | Read / Write / Construct Only
MateMixerStream * | stream | Read / Write / Construct Only
guint | volume | Read

## Signals

void | monitor-value | Run First

## Types and Values

#define | MATE_MIXER_INFINITY
enum | MateMixerStreamControlFlags
enum | MateMixerStreamControlRole
enum | MateMixerStreamControlMediaRole
enum | MateMixerChannelPosition
| MateMixerStreamControl
struct | MateMixerStreamControlClass

## Object Hierarchy

        GObject
        ╰── MateMixerStreamControl
            ╰── MateMixerStoredControl

## Includes

    #include <libmatemixer/matemixer.h>

## Description

## Functions

### mate_mixer_stream_control_get_name ()

    const gchar *
    mate_mixer_stream_control_get_name (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_get_label ()

    const gchar *
    mate_mixer_stream_control_get_label (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_get_flags ()

    MateMixerStreamControlFlags
    mate_mixer_stream_control_get_flags (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_get_role ()

    MateMixerStreamControlRole
    mate_mixer_stream_control_get_role (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_get_media_role ()

    MateMixerStreamControlMediaRole
    mate_mixer_stream_control_get_media_role
                                   (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_get_app_info ()

    MateMixerAppInfo *
    mate_mixer_stream_control_get_app_info
                                   (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_get_stream ()

    MateMixerStream *
    mate_mixer_stream_control_get_stream (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_set_stream ()

    gboolean
    mate_mixer_stream_control_set_stream (MateMixerStreamControl *control,
                                          MateMixerStream *stream);

#### Parameters

control | a MateMixerStreamControl |
stream | a MateMixerStream |

### mate_mixer_stream_control_get_mute ()

    gboolean
    mate_mixer_stream_control_get_mute (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_set_mute ()

    gboolean
    mate_mixer_stream_control_set_mute (MateMixerStreamControl *control,
                                        gboolean mute);

#### Parameters

control | a MateMixerStreamControl |
mute | the mute toggle state to set |

### mate_mixer_stream_control_get_num_channels ()

    guint
    mate_mixer_stream_control_get_num_channels
                                   (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_get_volume ()

    guint
    mate_mixer_stream_control_get_volume (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_set_volume ()

    gboolean
    mate_mixer_stream_control_set_volume (MateMixerStreamControl *control,
                                          guint volume);

#### Parameters

control | a MateMixerStreamControl |
volume | the volume to set |

### mate_mixer_stream_control_get_decibel ()

    gdouble
    mate_mixer_stream_control_get_decibel (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_set_decibel ()

    gboolean
    mate_mixer_stream_control_set_decibel (MateMixerStreamControl *control,
                                           gdouble decibel);

#### Parameters

control | a MateMixerStreamControl |
decibel | the volume to set in decibels |

### mate_mixer_stream_control_has_channel_position ()

    gboolean
    mate_mixer_stream_control_has_channel_position
                                   (MateMixerStreamControl *control,
                                    MateMixerChannelPosition position);

#### Parameters

control | a MateMixerStreamControl |
position | to channel position to check |

### mate_mixer_stream_control_get_channel_position ()

    MateMixerChannelPosition
    mate_mixer_stream_control_get_channel_position
                                   (MateMixerStreamControl *control,
                                    guint channel);

#### Parameters

control | a MateMixerStreamControl |
channel | a channel index |

### mate_mixer_stream_control_get_channel_volume ()

    guint
    mate_mixer_stream_control_get_channel_volume
                                   (MateMixerStreamControl *control,
                                    guint channel);

#### Parameters

control | a MateMixerStreamControl |
channel | a channel index |

### mate_mixer_stream_control_set_channel_volume ()

    gboolean
    mate_mixer_stream_control_set_channel_volume
                                   (MateMixerStreamControl *control,
                                    guint channel,
                                    guint volume);

#### Parameters

control | a MateMixerStreamControl |
channel | a channel index |
volume | the volume to set |

### mate_mixer_stream_control_get_channel_decibel ()

    gdouble
    mate_mixer_stream_control_get_channel_decibel
                                   (MateMixerStreamControl *control,
                                    guint channel);

#### Parameters

control | a MateMixerStreamControl |
channel | a channel index |

### mate_mixer_stream_control_set_channel_decibel ()

    gboolean
    mate_mixer_stream_control_set_channel_decibel
                                   (MateMixerStreamControl *control,
                                    guint channel,
                                    gdouble decibel);

#### Parameters

control | a MateMixerStreamControl |
channel | a channel index |
decibel | the volume to set in decibels |

### mate_mixer_stream_control_get_balance ()

    gfloat
    mate_mixer_stream_control_get_balance (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_set_balance ()

    gboolean
    mate_mixer_stream_control_set_balance (MateMixerStreamControl *control,
                                           gfloat balance);

#### Parameters

control | a MateMixerStreamControl |
balance | the balance value |

### mate_mixer_stream_control_get_fade ()

    gfloat
    mate_mixer_stream_control_get_fade (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_set_fade ()

    gboolean
    mate_mixer_stream_control_set_fade (MateMixerStreamControl *control,
                                        gfloat fade);

#### Parameters

control | a MateMixerStreamControl |
fade | the fade value |

### mate_mixer_stream_control_get_monitor_enabled ()

    gboolean
    mate_mixer_stream_control_get_monitor_enabled
                                   (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_set_monitor_enabled ()

    gboolean
    mate_mixer_stream_control_set_monitor_enabled
                                   (MateMixerStreamControl *control,
                                    gboolean enabled);

#### Parameters

control | a MateMixerStreamControl |
enabled | a boolean value |

### mate_mixer_stream_control_get_min_volume ()

    guint
    mate_mixer_stream_control_get_min_volume
                                   (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_get_max_volume ()

    guint
    mate_mixer_stream_control_get_max_volume
                                   (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_get_normal_volume ()

    guint
    mate_mixer_stream_control_get_normal_volume
                                   (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

### mate_mixer_stream_control_get_base_volume ()

    guint
    mate_mixer_stream_control_get_base_volume
                                   (MateMixerStreamControl *control);

#### Parameters

control | a MateMixerStreamControl |

## Types and Values

### MATE_MIXER_INFINITY

    #  define MATE_MIXER_INFINITY INFINITY

### enum MateMixerStreamControlFlags

Flags describing capabilities and properties of a stream control.

#### Members

MATE_MIXER_STREAM_CONTROL_NO_FLAGS | No flags. |
MATE_MIXER_STREAM_CONTROL_MUTE_READABLE | The stream control includes a mute toggle and allows reading the mute state. |
MATE_MIXER_STREAM_CONTROL_MUTE_WRITABLE | The stream control includes a mute toggle and allows changing the mute state. |
MATE_MIXER_STREAM_CONTROL_VOLUME_READABLE | The stream control includes a volume control and allows reading the volume. |
MATE_MIXER_STREAM_CONTROL_VOLUME_WRITABLE | The stream control includes a volume control and allows changing the volume. |
MATE_MIXER_STREAM_CONTROL_CAN_BALANCE | The stream control includes the necessary channel positions to allow left/right volume balancing. |
MATE_MIXER_STREAM_CONTROL_CAN_FADE | The stream control includes the necessary channel positions to allow front/back volume fading. |
MATE_MIXER_STREAM_CONTROL_MOVABLE | It is possible to move the stream control to a different stream using the `mate_mixer_stream_control_set_stream()` function. See the function description for details. |
MATE_MIXER_STREAM_CONTROL_HAS_DECIBEL | The stream controls supports decibel values and it is possible to successfully use the functions which operate on decibel values. |
MATE_MIXER_STREAM_CONTROL_HAS_MONITOR | The stream control supports peak level monitoring. |
MATE_MIXER_STREAM_CONTROL_STORED | The stream control is a MateMixerStoredControl. |

### enum MateMixerStreamControlRole

#### Members

MATE_MIXER_STREAM_CONTROL_ROLE_UNKNOWN | Unknown role. |
MATE_MIXER_STREAM_CONTROL_ROLE_MASTER | Master volume control. |
MATE_MIXER_STREAM_CONTROL_ROLE_APPLICATION | Application volume control. |
MATE_MIXER_STREAM_CONTROL_ROLE_PCM | PCM volume control. |
MATE_MIXER_STREAM_CONTROL_ROLE_SPEAKER | Speaker volume control. |
MATE_MIXER_STREAM_CONTROL_ROLE_MICROPHONE | Microphone volume control. |
MATE_MIXER_STREAM_CONTROL_ROLE_PORT | Volume control for a connector of a sound device. |
MATE_MIXER_STREAM_CONTROL_ROLE_BOOST | Boost control (for example a microphone boost or bass boost). |
MATE_MIXER_STREAM_CONTROL_ROLE_BASS | Bass control. |
MATE_MIXER_STREAM_CONTROL_ROLE_TREBLE | Treble control. |
MATE_MIXER_STREAM_CONTROL_ROLE_CD | CD input volume control. |
MATE_MIXER_STREAM_CONTROL_ROLE_VIDEO | Video volume control. |
MATE_MIXER_STREAM_CONTROL_ROLE_MUSIC | Music volume control. |

### enum MateMixerStreamControlMediaRole

Constants describing a media role of a control. These constants are mapped to PulseAudio media role property and therefore are only available when using the PulseAudio sound system.

Media roles are commonly set by applications to indicate what kind of sound input/output they provide and may be the defining property of stored controls (for example an event role stored control can be used to provide a volume slider for event sounds).

See the PulseAudio documentation for more detailed information about media roles.

#### Members

MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_UNKNOWN | Unknown media role. |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_VIDEO | Video role. |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_MUSIC | Music role. |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_GAME | Game role. |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_EVENT | Event sounds. |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_PHONE |  |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_ANIMATION |  |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_PRODUCTION |  |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_A11Y |  |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_TEST |  |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_ABSTRACT |  |
MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_FILTER |  |

### enum MateMixerChannelPosition

#### Members

MATE_MIXER_CHANNEL_UNKNOWN | Unknown channel position. |
MATE_MIXER_CHANNEL_MONO | Mono channel. Only used for single-channel controls. |
MATE_MIXER_CHANNEL_FRONT_LEFT | Front left channel. |
MATE_MIXER_CHANNEL_FRONT_RIGHT | Front right channel. |
MATE_MIXER_CHANNEL_FRONT_CENTER | Front center channel. |
MATE_MIXER_CHANNEL_LFE | Low-frequency effects channel (subwoofer). |
MATE_MIXER_CHANNEL_BACK_LEFT | Back (rear) left channel. |
MATE_MIXER_CHANNEL_BACK_RIGHT | Back (rear) right channel. |
MATE_MIXER_CHANNEL_BACK_CENTER | Back (rear) center channel. |
MATE_MIXER_CHANNEL_FRONT_LEFT_CENTER | Front left of center channel. |
MATE_MIXER_CHANNEL_FRONT_RIGHT_CENTER | Front right of center channel. |
MATE_MIXER_CHANNEL_SIDE_LEFT | Side left channel. |
MATE_MIXER_CHANNEL_SIDE_RIGHT | Side right channel. |
MATE_MIXER_CHANNEL_TOP_FRONT_LEFT | Top front left channel. |
MATE_MIXER_CHANNEL_TOP_FRONT_RIGHT | Top front right channel. |
MATE_MIXER_CHANNEL_TOP_FRONT_CENTER | Top front center channel. |
MATE_MIXER_CHANNEL_TOP_CENTER | Top center channel. |
MATE_MIXER_CHANNEL_TOP_BACK_LEFT | Top back (rear) left channel. |
MATE_MIXER_CHANNEL_TOP_BACK_RIGHT | Top back (rear) right channel. |
MATE_MIXER_CHANNEL_TOP_BACK_CENTER | Top back (rear) center channel. |

### MateMixerStreamControl

    typedef struct _MateMixerStreamControl MateMixerStreamControl;

The MateMixerStreamControl structure contains only private data and should only be accessed using the provided API.

### struct MateMixerStreamControlClass

    struct MateMixerStreamControlClass {
        GObjectClass parent_class;
    };

The class structure for MateMixerStreamControl.

#### Members

## Property Details

### The `“balance”` property

      “balance”                  float

Balance value of the stream control.

Owner: MateMixerStreamControl

Flags: Read

Allowed values: [-1,1]

Default value: 0

### The `“fade”` property

      “fade”                     float

Fade value of the stream control.

Owner: MateMixerStreamControl

Flags: Read

Allowed values: [-1,1]

Default value: 0

### The `“flags”` property

      “flags”                    MateMixerStreamControlFlags

Capability flags of the stream control.

Owner: MateMixerStreamControl

Flags: Read / Write / Construct Only

### The `“label”` property

      “label”                    char *

Label of the stream control.

Owner: MateMixerStreamControl

Flags: Read / Write / Construct Only

Default value: NULL

### The `“media-role”` property

      “media-role”               MateMixerStreamControlMediaRole

Media role of the stream control.

Owner: MateMixerStreamControl

Flags: Read / Write / Construct Only

Default value: MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_UNKNOWN

### The `“mute”` property

      “mute”                     gboolean

Mute state of the stream control.

Owner: MateMixerStreamControl

Flags: Read

Default value: FALSE

### The `“name”` property

      “name”                     char *

Name of the stream control.

Owner: MateMixerStreamControl

Flags: Read / Write / Construct Only

Default value: NULL

### The `“role”` property

      “role”                     MateMixerStreamControlRole

Role of the stream control.

Owner: MateMixerStreamControl

Flags: Read / Write / Construct Only

Default value: MATE_MIXER_STREAM_CONTROL_ROLE_UNKNOWN

### The `“stream”` property

      “stream”                   MateMixerStream *

Stream which owns the control.

Owner: MateMixerStreamControl

Flags: Read / Write / Construct Only

### The `“volume”` property

      “volume”                   guint

Volume of the stream control.

Owner: MateMixerStreamControl

Flags: Read

Default value: 0

## Signal Details

### The `“monitor-value”` signal

    void
    user_function (MateMixerStreamControl *matemixerstreamcontrol,
                   double                  arg1,
                   gpointer                user_data)

Flags: Run First