MateMixerStreamControl

MateMixerStreamControl

Synopsis

#include <libmatemixer/matemixer.h>

#define             MATE_MIXER_INFINITY
enum                MateMixerStreamControlFlags;
enum                MateMixerStreamControlRole;
enum                MateMixerStreamControlMediaRole;
enum                MateMixerChannelPosition;
                    MateMixerStreamControl;
struct              MateMixerStreamControlClass;
const gchar *       mate_mixer_stream_control_get_name  (MateMixerStreamControl *control);
const gchar *       mate_mixer_stream_control_get_label (MateMixerStreamControl *control);
MateMixerStreamControlFlags mate_mixer_stream_control_get_flags
                                                        (MateMixerStreamControl *control);
MateMixerStreamControlRole mate_mixer_stream_control_get_role
                                                        (MateMixerStreamControl *control);
MateMixerStreamControlMediaRole mate_mixer_stream_control_get_media_role
                                                        (MateMixerStreamControl *control);
MateMixerAppInfo *  mate_mixer_stream_control_get_app_info
                                                        (MateMixerStreamControl *control);
MateMixerStream *   mate_mixer_stream_control_get_stream
                                                        (MateMixerStreamControl *control);
gboolean            mate_mixer_stream_control_set_stream
                                                        (MateMixerStreamControl *control,
                                                         MateMixerStream *stream);
gboolean            mate_mixer_stream_control_get_mute  (MateMixerStreamControl *control);
gboolean            mate_mixer_stream_control_set_mute  (MateMixerStreamControl *control,
                                                         gboolean mute);
guint               mate_mixer_stream_control_get_num_channels
                                                        (MateMixerStreamControl *control);
guint               mate_mixer_stream_control_get_volume
                                                        (MateMixerStreamControl *control);
gboolean            mate_mixer_stream_control_set_volume
                                                        (MateMixerStreamControl *control,
                                                         guint volume);
gdouble             mate_mixer_stream_control_get_decibel
                                                        (MateMixerStreamControl *control);
gboolean            mate_mixer_stream_control_set_decibel
                                                        (MateMixerStreamControl *control,
                                                         gdouble decibel);
gboolean            mate_mixer_stream_control_has_channel_position
                                                        (MateMixerStreamControl *control,
                                                         MateMixerChannelPosition position);
MateMixerChannelPosition mate_mixer_stream_control_get_channel_position
                                                        (MateMixerStreamControl *control,
                                                         guint channel);
guint               mate_mixer_stream_control_get_channel_volume
                                                        (MateMixerStreamControl *control,
                                                         guint channel);
gboolean            mate_mixer_stream_control_set_channel_volume
                                                        (MateMixerStreamControl *control,
                                                         guint channel,
                                                         guint volume);
gdouble             mate_mixer_stream_control_get_channel_decibel
                                                        (MateMixerStreamControl *control,
                                                         guint channel);
gboolean            mate_mixer_stream_control_set_channel_decibel
                                                        (MateMixerStreamControl *control,
                                                         guint channel,
                                                         gdouble decibel);
gfloat              mate_mixer_stream_control_get_balance
                                                        (MateMixerStreamControl *control);
gboolean            mate_mixer_stream_control_set_balance
                                                        (MateMixerStreamControl *control,
                                                         gfloat balance);
gfloat              mate_mixer_stream_control_get_fade  (MateMixerStreamControl *control);
gboolean            mate_mixer_stream_control_set_fade  (MateMixerStreamControl *control,
                                                         gfloat fade);
gboolean            mate_mixer_stream_control_get_monitor_enabled
                                                        (MateMixerStreamControl *control);
gboolean            mate_mixer_stream_control_set_monitor_enabled
                                                        (MateMixerStreamControl *control,
                                                         gboolean enabled);
guint               mate_mixer_stream_control_get_min_volume
                                                        (MateMixerStreamControl *control);
guint               mate_mixer_stream_control_get_max_volume
                                                        (MateMixerStreamControl *control);
guint               mate_mixer_stream_control_get_normal_volume
                                                        (MateMixerStreamControl *control);
guint               mate_mixer_stream_control_get_base_volume
                                                        (MateMixerStreamControl *control);

Object Hierarchy

  GObject
   +----MateMixerStreamControl
         +----MateMixerStoredControl

Properties

  "balance"                  gfloat                : Read
  "fade"                     gfloat                : Read
  "flags"                    MateMixerStreamControlFlags  : Read / Write / Construct Only
  "label"                    gchar*                : Read / Write / Construct Only
  "media-role"               MateMixerStreamControlMediaRole  : Read / Write / Construct Only
  "mute"                     gboolean              : Read
  "name"                     gchar*                : Read / Write / Construct Only
  "role"                     MateMixerStreamControlRole  : Read / Write / Construct Only
  "stream"                   MateMixerStream*      : Read / Write / Construct Only
  "volume"                   guint                 : Read

Signals

  "monitor-value"                                  : Run First

Description

Details

MATE_MIXER_INFINITY

#  define MATE_MIXER_INFINITY INFINITY

enum MateMixerStreamControlFlags

typedef enum {
    MATE_MIXER_STREAM_CONTROL_NO_FLAGS        = 0,
    MATE_MIXER_STREAM_CONTROL_MUTE_READABLE   = 1 << 0,
    MATE_MIXER_STREAM_CONTROL_MUTE_WRITABLE   = 1 << 1,
    MATE_MIXER_STREAM_CONTROL_VOLUME_READABLE = 1 << 2,
    MATE_MIXER_STREAM_CONTROL_VOLUME_WRITABLE = 1 << 3,
    MATE_MIXER_STREAM_CONTROL_CAN_BALANCE     = 1 << 4,
    MATE_MIXER_STREAM_CONTROL_CAN_FADE        = 1 << 5,
    MATE_MIXER_STREAM_CONTROL_MOVABLE         = 1 << 6,
    MATE_MIXER_STREAM_CONTROL_HAS_DECIBEL     = 1 << 7,
    MATE_MIXER_STREAM_CONTROL_HAS_MONITOR     = 1 << 8,
    MATE_MIXER_STREAM_CONTROL_STORED          = 1 << 9
} MateMixerStreamControlFlags;

Flags describing capabilities and properties of a stream control.

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

typedef enum {
    MATE_MIXER_STREAM_CONTROL_ROLE_UNKNOWN,
    MATE_MIXER_STREAM_CONTROL_ROLE_MASTER,
    MATE_MIXER_STREAM_CONTROL_ROLE_APPLICATION,
    MATE_MIXER_STREAM_CONTROL_ROLE_PCM,
    MATE_MIXER_STREAM_CONTROL_ROLE_SPEAKER,
    MATE_MIXER_STREAM_CONTROL_ROLE_MICROPHONE,
    MATE_MIXER_STREAM_CONTROL_ROLE_PORT,
    MATE_MIXER_STREAM_CONTROL_ROLE_BOOST,
    MATE_MIXER_STREAM_CONTROL_ROLE_BASS,
    MATE_MIXER_STREAM_CONTROL_ROLE_TREBLE,
    MATE_MIXER_STREAM_CONTROL_ROLE_CD,
    MATE_MIXER_STREAM_CONTROL_ROLE_VIDEO,
    MATE_MIXER_STREAM_CONTROL_ROLE_MUSIC
} MateMixerStreamControlRole;

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

typedef enum {
    MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_UNKNOWN,
    MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_VIDEO,
    MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_MUSIC,
    MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_GAME,
    MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_EVENT,
    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
} 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.

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

typedef enum {
    MATE_MIXER_CHANNEL_UNKNOWN = 0,
    MATE_MIXER_CHANNEL_MONO,
    MATE_MIXER_CHANNEL_FRONT_LEFT,
    MATE_MIXER_CHANNEL_FRONT_RIGHT,
    MATE_MIXER_CHANNEL_FRONT_CENTER,
    MATE_MIXER_CHANNEL_LFE,
    MATE_MIXER_CHANNEL_BACK_LEFT,
    MATE_MIXER_CHANNEL_BACK_RIGHT,
    MATE_MIXER_CHANNEL_BACK_CENTER,
    MATE_MIXER_CHANNEL_FRONT_LEFT_CENTER,
    MATE_MIXER_CHANNEL_FRONT_RIGHT_CENTER,
    MATE_MIXER_CHANNEL_SIDE_LEFT,
    MATE_MIXER_CHANNEL_SIDE_RIGHT,
    MATE_MIXER_CHANNEL_TOP_FRONT_LEFT,
    MATE_MIXER_CHANNEL_TOP_FRONT_RIGHT,
    MATE_MIXER_CHANNEL_TOP_FRONT_CENTER,
    MATE_MIXER_CHANNEL_TOP_CENTER,
    MATE_MIXER_CHANNEL_TOP_BACK_LEFT,
    MATE_MIXER_CHANNEL_TOP_BACK_RIGHT,
    MATE_MIXER_CHANNEL_TOP_BACK_CENTER,
} MateMixerChannelPosition;

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.

GObjectClass parent_class;

The parent class.

mate_mixer_stream_control_get_name ()

const gchar *       mate_mixer_stream_control_get_name  (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_get_label ()

const gchar *       mate_mixer_stream_control_get_label (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_get_flags ()

MateMixerStreamControlFlags mate_mixer_stream_control_get_flags
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_get_role ()

MateMixerStreamControlRole mate_mixer_stream_control_get_role
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_get_media_role ()

MateMixerStreamControlMediaRole mate_mixer_stream_control_get_media_role
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_get_app_info ()

MateMixerAppInfo *  mate_mixer_stream_control_get_app_info
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_get_stream ()

MateMixerStream *   mate_mixer_stream_control_get_stream
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_set_stream ()

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

control :

a MateMixerStreamControl

stream :

a MateMixerStream

mate_mixer_stream_control_get_mute ()

gboolean            mate_mixer_stream_control_get_mute  (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_set_mute ()

gboolean            mate_mixer_stream_control_set_mute  (MateMixerStreamControl *control,
                                                         gboolean mute);

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);

control :

a MateMixerStreamControl

mate_mixer_stream_control_get_volume ()

guint               mate_mixer_stream_control_get_volume
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_set_volume ()

gboolean            mate_mixer_stream_control_set_volume
                                                        (MateMixerStreamControl *control,
                                                         guint volume);

control :

a MateMixerStreamControl

volume :

the volume to set

mate_mixer_stream_control_get_decibel ()

gdouble             mate_mixer_stream_control_get_decibel
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_set_decibel ()

gboolean            mate_mixer_stream_control_set_decibel
                                                        (MateMixerStreamControl *control,
                                                         gdouble decibel);

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);

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);

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);

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);

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);

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);

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);

control :

a MateMixerStreamControl

mate_mixer_stream_control_set_balance ()

gboolean            mate_mixer_stream_control_set_balance
                                                        (MateMixerStreamControl *control,
                                                         gfloat balance);

control :

a MateMixerStreamControl

balance :

the balance value

mate_mixer_stream_control_get_fade ()

gfloat              mate_mixer_stream_control_get_fade  (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_set_fade ()

gboolean            mate_mixer_stream_control_set_fade  (MateMixerStreamControl *control,
                                                         gfloat fade);

control :

a MateMixerStreamControl

fade :

the fade value

mate_mixer_stream_control_get_monitor_enabled ()

gboolean            mate_mixer_stream_control_get_monitor_enabled
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_set_monitor_enabled ()

gboolean            mate_mixer_stream_control_set_monitor_enabled
                                                        (MateMixerStreamControl *control,
                                                         gboolean enabled);

control :

a MateMixerStreamControl

enabled :

a boolean value

mate_mixer_stream_control_get_min_volume ()

guint               mate_mixer_stream_control_get_min_volume
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_get_max_volume ()

guint               mate_mixer_stream_control_get_max_volume
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_get_normal_volume ()

guint               mate_mixer_stream_control_get_normal_volume
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

mate_mixer_stream_control_get_base_volume ()

guint               mate_mixer_stream_control_get_base_volume
                                                        (MateMixerStreamControl *control);

control :

a MateMixerStreamControl

Property Details

The "balance" property

  "balance"                  gfloat                : Read

Balance value of the stream control.

Allowed values: [-1,1]

Default value: 0


The "fade" property

  "fade"                     gfloat                : Read

Fade value of the stream control.

Allowed values: [-1,1]

Default value: 0


The "flags" property

  "flags"                    MateMixerStreamControlFlags  : Read / Write / Construct Only

Capability flags of the stream control.


The "label" property

  "label"                    gchar*                : Read / Write / Construct Only

Label of the stream control.

Default value: NULL


The "media-role" property

  "media-role"               MateMixerStreamControlMediaRole  : Read / Write / Construct Only

Media role of the stream control.

Default value: MATE_MIXER_STREAM_CONTROL_MEDIA_ROLE_UNKNOWN


The "mute" property

  "mute"                     gboolean              : Read

Mute state of the stream control.

Default value: FALSE


The "name" property

  "name"                     gchar*                : Read / Write / Construct Only

Name of the stream control.

Default value: NULL


The "role" property

  "role"                     MateMixerStreamControlRole  : Read / Write / Construct Only

Role of the stream control.

Default value: MATE_MIXER_STREAM_CONTROL_ROLE_UNKNOWN


The "stream" property

  "stream"                   MateMixerStream*      : Read / Write / Construct Only

Stream which owns the control.


The "volume" property

  "volume"                   guint                 : Read

Volume of the stream control.

Default value: 0

Signal Details

The "monitor-value" signal

void                user_function                      (MateMixerStreamControl *matemixerstreamcontrol,
                                                        gdouble                 arg1,
                                                        gpointer                user_data)                   : Run First