summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-06-21 16:41:05 +0200
committerMichal Ratajsky <[email protected]>2014-06-21 16:41:05 +0200
commit0309a021960c0a4e2e758dd52041197e684ed600 (patch)
treeee1396f34707b9fae8d01b4fb1e1e3cc70ce6c8a
parent02e93868a222a16b9a95a2a51e6b88fe733c5d97 (diff)
downloadlibmatemixer-0309a021960c0a4e2e758dd52041197e684ed600.tar.bz2
libmatemixer-0309a021960c0a4e2e758dd52041197e684ed600.tar.xz
Update decibel handling API and PulseAudio code
-rw-r--r--backends/pulse/pulse-stream.c151
-rw-r--r--configure.ac2
-rw-r--r--docs/reference/libmatemixer-sections.txt18
-rw-r--r--libmatemixer/matemixer-control.c2
-rw-r--r--libmatemixer/matemixer-stream.c58
-rw-r--r--libmatemixer/matemixer-stream.h44
6 files changed, 142 insertions, 133 deletions
diff --git a/backends/pulse/pulse-stream.c b/backends/pulse/pulse-stream.c
index 80b281b..05783e6 100644
--- a/backends/pulse/pulse-stream.c
+++ b/backends/pulse/pulse-stream.c
@@ -95,9 +95,9 @@ static guint stream_get_num_channels (MateMixerStream
static gint64 stream_get_volume (MateMixerStream *stream);
static gboolean stream_set_volume (MateMixerStream *stream,
gint64 volume);
-static gdouble stream_get_volume_db (MateMixerStream *stream);
-static gboolean stream_set_volume_db (MateMixerStream *stream,
- gdouble volume_db);
+static gdouble stream_get_decibel (MateMixerStream *stream);
+static gboolean stream_set_decibel (MateMixerStream *stream,
+ gdouble decibel);
static MateMixerChannelPosition stream_get_channel_position (MateMixerStream *stream,
guint channel);
static gint64 stream_get_channel_volume (MateMixerStream *stream,
@@ -105,11 +105,11 @@ static gint64 stream_get_channel_volume (MateMixerStream
static gboolean stream_set_channel_volume (MateMixerStream *stream,
guint channel,
gint64 volume);
-static gdouble stream_get_channel_volume_db (MateMixerStream *stream,
+static gdouble stream_get_channel_decibel (MateMixerStream *stream,
guint channel);
-static gboolean stream_set_channel_volume_db (MateMixerStream *stream,
+static gboolean stream_set_channel_decibel (MateMixerStream *stream,
guint channel,
- gdouble volume_db);
+ gdouble decibel);
static gboolean stream_has_position (MateMixerStream *stream,
MateMixerChannelPosition position);
static gint64 stream_get_position_volume (MateMixerStream *stream,
@@ -117,11 +117,11 @@ static gint64 stream_get_position_volume (MateMixerStream
static gboolean stream_set_position_volume (MateMixerStream *stream,
MateMixerChannelPosition position,
gint64 volume);
-static gdouble stream_get_position_volume_db (MateMixerStream *stream,
+static gdouble stream_get_position_decibel (MateMixerStream *stream,
MateMixerChannelPosition position);
-static gboolean stream_set_position_volume_db (MateMixerStream *stream,
+static gboolean stream_set_position_decibel (MateMixerStream *stream,
MateMixerChannelPosition position,
- gdouble volume_db);
+ gdouble decibel);
static gdouble stream_get_balance (MateMixerStream *stream);
static gboolean stream_set_balance (MateMixerStream *stream,
gdouble balance);
@@ -163,18 +163,18 @@ mate_mixer_stream_interface_init (MateMixerStreamInterface *iface)
iface->get_num_channels = stream_get_num_channels;
iface->get_volume = stream_get_volume;
iface->set_volume = stream_set_volume;
- iface->get_volume_db = stream_get_volume_db;
- iface->set_volume_db = stream_set_volume_db;
+ iface->get_decibel = stream_get_decibel;
+ iface->set_decibel = stream_set_decibel;
iface->get_channel_position = stream_get_channel_position;
iface->get_channel_volume = stream_get_channel_volume;
iface->set_channel_volume = stream_set_channel_volume;
- iface->get_channel_volume_db = stream_get_channel_volume_db;
- iface->set_channel_volume_db = stream_set_channel_volume_db;
+ iface->get_channel_decibel = stream_get_channel_decibel;
+ iface->set_channel_decibel = stream_set_channel_decibel;
iface->has_position = stream_has_position;
iface->get_position_volume = stream_get_position_volume;
iface->set_position_volume = stream_set_position_volume;
- iface->get_position_volume_db = stream_get_position_volume_db;
- iface->set_position_volume_db = stream_set_position_volume_db;
+ iface->get_position_decibel = stream_get_position_decibel;
+ iface->set_position_decibel = stream_set_position_decibel;
iface->get_balance = stream_get_balance;
iface->set_balance = stream_set_balance;
iface->get_fade = stream_get_fade;
@@ -648,34 +648,37 @@ stream_set_volume (MateMixerStream *stream, gint64 volume)
pulse = PULSE_STREAM (stream);
cvolume = pulse->priv->volume;
- if (pa_cvolume_scale (&cvolume, (pa_volume_t) volume) == NULL) {
- g_warning ("Invalid volume passed to stream %s",
- mate_mixer_stream_get_name (stream));
+ if (pa_cvolume_scale (&cvolume, (pa_volume_t) volume) == NULL)
return FALSE;
- }
+
return stream_set_cvolume (stream, &cvolume);
}
static gdouble
-stream_get_volume_db (MateMixerStream *stream)
+stream_get_decibel (MateMixerStream *stream)
{
- g_return_val_if_fail (PULSE_IS_STREAM (stream), 0);
+ gdouble value;
+
+ g_return_val_if_fail (PULSE_IS_STREAM (stream), -MATE_MIXER_INFINITY);
if (!(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_HAS_DECIBEL_VOLUME))
- return 0;
+ return -MATE_MIXER_INFINITY;
- return pa_sw_volume_to_dB (stream_get_volume (stream));
+ value = pa_sw_volume_to_dB (stream_get_volume (stream));
+
+ return (value == PA_DECIBEL_MININFTY) ? -MATE_MIXER_INFINITY : value;
}
static gboolean
-stream_set_volume_db (MateMixerStream *stream, gdouble volume_db)
+stream_set_decibel (MateMixerStream *stream, gdouble decibel)
{
g_return_val_if_fail (PULSE_IS_STREAM (stream), FALSE);
- if (!(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_HAS_DECIBEL_VOLUME))
+ if (!(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_HAS_DECIBEL_VOLUME) ||
+ !(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_CAN_SET_VOLUME))
return FALSE;
- return stream_set_volume (stream, pa_sw_volume_from_dB (volume_db));
+ return stream_set_volume (stream, pa_sw_volume_from_dB (decibel));
}
static MateMixerChannelPosition
@@ -687,10 +690,9 @@ stream_get_channel_position (MateMixerStream *stream, guint channel)
pulse = PULSE_STREAM (stream);
- if (channel >= pulse->priv->channel_map.channels) {
- g_warning ("Invalid channel %u of stream %s", channel, pulse->priv->name);
+ if (channel >= pulse->priv->channel_map.channels)
return MATE_MIXER_CHANNEL_UNKNOWN_POSITION;
- }
+
return pulse_convert_position_to_pulse (pulse->priv->channel_map.map[channel]);
}
@@ -703,10 +705,9 @@ stream_get_channel_volume (MateMixerStream *stream, guint channel)
pulse = PULSE_STREAM (stream);
- if (channel >= pulse->priv->volume.channels) {
- g_warning ("Invalid channel %u of stream %s", channel, pulse->priv->name);
+ if (channel >= pulse->priv->volume.channels)
return stream_get_min_volume (stream);
- }
+
return (gint64) pulse->priv->volume.values[channel];
}
@@ -721,47 +722,47 @@ stream_set_channel_volume (MateMixerStream *stream, guint channel, gint64 volume
pulse = PULSE_STREAM (stream);
cvolume = pulse->priv->volume;
- if (channel >= pulse->priv->volume.channels) {
- g_warning ("Invalid channel %u of stream %s", channel, pulse->priv->name);
+ if (channel >= pulse->priv->volume.channels)
return FALSE;
- }
+
cvolume.values[channel] = (pa_volume_t) volume;
return stream_set_cvolume (stream, &cvolume);
}
static gdouble
-stream_get_channel_volume_db (MateMixerStream *stream, guint channel)
+stream_get_channel_decibel (MateMixerStream *stream, guint channel)
{
PulseStream *pulse;
+ gdouble value;
- g_return_val_if_fail (PULSE_IS_STREAM (stream), 0);
+ g_return_val_if_fail (PULSE_IS_STREAM (stream), -MATE_MIXER_INFINITY);
if (!(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_HAS_DECIBEL_VOLUME))
- return 0;
+ return -MATE_MIXER_INFINITY;
pulse = PULSE_STREAM (stream);
- if (channel >= pulse->priv->volume.channels) {
- g_warning ("Invalid channel %u of stream %s", channel, pulse->priv->name);
- return 0;
- }
- return pa_sw_volume_to_dB (pulse->priv->volume.values[channel]);
+ if (channel >= pulse->priv->volume.channels)
+ return -MATE_MIXER_INFINITY;
+
+ value = pa_sw_volume_to_dB (pulse->priv->volume.values[channel]);
+
+ return (value == PA_DECIBEL_MININFTY) ? -MATE_MIXER_INFINITY : value;
}
static gboolean
-stream_set_channel_volume_db (MateMixerStream *stream,
- guint channel,
- gdouble volume_db)
+stream_set_channel_decibel (MateMixerStream *stream,
+ guint channel,
+ gdouble decibel)
{
g_return_val_if_fail (PULSE_IS_STREAM (stream), FALSE);
- if (!(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_HAS_DECIBEL_VOLUME))
+ if (!(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_HAS_DECIBEL_VOLUME) ||
+ !(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_CAN_SET_VOLUME))
return FALSE;
- return stream_set_channel_volume (stream,
- channel,
- pa_sw_volume_from_dB (volume_db));
+ return stream_set_channel_volume (stream, channel, pa_sw_volume_from_dB (decibel));
}
static gboolean
@@ -808,36 +809,40 @@ stream_set_position_volume (MateMixerStream *stream,
if (!pa_cvolume_set_position (&cvolume,
&pulse->priv->channel_map,
pulse_convert_position_to_pulse (position),
- (pa_volume_t) volume)) {
- // XXX
+ (pa_volume_t) volume))
return FALSE;
- }
+
return stream_set_cvolume (stream, &cvolume);
}
static gdouble
-stream_get_position_volume_db (MateMixerStream *stream,
- MateMixerChannelPosition position)
+stream_get_position_decibel (MateMixerStream *stream,
+ MateMixerChannelPosition position)
{
- g_return_val_if_fail (PULSE_IS_STREAM (stream), 0);
+ gdouble value;
+
+ g_return_val_if_fail (PULSE_IS_STREAM (stream), -MATE_MIXER_INFINITY);
if (!(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_HAS_DECIBEL_VOLUME))
- return 0;
+ return -MATE_MIXER_INFINITY;
- return pa_sw_volume_to_dB (stream_get_position_volume (stream, position));
+ value = pa_sw_volume_to_dB (stream_get_position_volume (stream, position));
+
+ return (value == PA_DECIBEL_MININFTY) ? -MATE_MIXER_INFINITY : value;
}
static gboolean
-stream_set_position_volume_db (MateMixerStream *stream,
- MateMixerChannelPosition position,
- gdouble volume_db)
+stream_set_position_decibel (MateMixerStream *stream,
+ MateMixerChannelPosition position,
+ gdouble decibel)
{
g_return_val_if_fail (PULSE_IS_STREAM (stream), FALSE);
- if (!(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_HAS_DECIBEL_VOLUME))
+ if (!(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_HAS_DECIBEL_VOLUME) ||
+ !(mate_mixer_stream_get_flags (stream) & MATE_MIXER_STREAM_CAN_SET_VOLUME))
return FALSE;
- return stream_set_position_volume (stream, position, pa_sw_volume_from_dB (volume_db));
+ return stream_set_position_volume (stream, position, pa_sw_volume_from_dB (decibel));
}
static gdouble
@@ -849,8 +854,7 @@ stream_get_balance (MateMixerStream *stream)
pulse = PULSE_STREAM (stream);
- return pa_cvolume_get_balance (&pulse->priv->volume,
- &pulse->priv->channel_map);
+ return pa_cvolume_get_balance (&pulse->priv->volume, &pulse->priv->channel_map);
}
static gboolean
@@ -864,12 +868,9 @@ stream_set_balance (MateMixerStream *stream, gdouble balance)
pulse = PULSE_STREAM (stream);
cvolume = pulse->priv->volume;
- if (pa_cvolume_set_balance (&cvolume,
- &pulse->priv->channel_map,
- (float) balance) == NULL) {
- // XXX
+ if (pa_cvolume_set_balance (&cvolume, &pulse->priv->channel_map, (float) balance) == NULL)
return FALSE;
- }
+
return stream_set_cvolume (stream, &cvolume);
}
@@ -882,8 +883,7 @@ stream_get_fade (MateMixerStream *stream)
pulse = PULSE_STREAM (stream);
- return pa_cvolume_get_fade (&pulse->priv->volume,
- &pulse->priv->channel_map);
+ return pa_cvolume_get_fade (&pulse->priv->volume, &pulse->priv->channel_map);
}
static gboolean
@@ -897,12 +897,9 @@ stream_set_fade (MateMixerStream *stream, gdouble fade)
pulse = PULSE_STREAM (stream);
cvolume = pulse->priv->volume;
- if (pa_cvolume_set_fade (&cvolume,
- &pulse->priv->channel_map,
- (float) fade) == NULL) {
- // XXX
+ if (pa_cvolume_set_fade (&cvolume, &pulse->priv->channel_map, (float) fade) == NULL)
return FALSE;
- }
+
return stream_set_cvolume (stream, &cvolume);
}
diff --git a/configure.ac b/configure.ac
index 3ec28d2..ab68cba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,7 +41,7 @@ AC_PROG_INSTALL
# Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([string.h sys/types.h unistd.h locale.h])
+AC_CHECK_HEADERS([stdlib.h string.h math.h sys/types.h unistd.h locale.h])
# =======================================================================
# Libtool
diff --git a/docs/reference/libmatemixer-sections.txt b/docs/reference/libmatemixer-sections.txt
index 8bd0d99..376030d 100644
--- a/docs/reference/libmatemixer-sections.txt
+++ b/docs/reference/libmatemixer-sections.txt
@@ -39,6 +39,7 @@ mate_mixer_control_set_app_version
mate_mixer_control_set_app_icon
mate_mixer_control_set_server_address
mate_mixer_control_open
+mate_mixer_control_close
mate_mixer_control_get_state
mate_mixer_control_get_device
mate_mixer_control_get_stream
@@ -136,6 +137,7 @@ MateMixerStreamFlags
MateMixerStreamState
MateMixerStream
MateMixerStreamInterface
+MATE_MIXER_INFINITY
mate_mixer_stream_get_name
mate_mixer_stream_get_description
mate_mixer_stream_get_device
@@ -146,24 +148,27 @@ mate_mixer_stream_set_mute
mate_mixer_stream_get_num_channels
mate_mixer_stream_get_volume
mate_mixer_stream_set_volume
-mate_mixer_stream_get_volume_db
-mate_mixer_stream_set_volume_db
+mate_mixer_stream_get_decibel
+mate_mixer_stream_set_decibel
mate_mixer_stream_get_channel_position
mate_mixer_stream_get_channel_volume
mate_mixer_stream_set_channel_volume
-mate_mixer_stream_get_channel_volume_db
-mate_mixer_stream_set_channel_volume_db
+mate_mixer_stream_get_channel_decibel
+mate_mixer_stream_set_channel_decibel
mate_mixer_stream_has_position
mate_mixer_stream_get_position_volume
mate_mixer_stream_set_position_volume
-mate_mixer_stream_get_position_volume_db
-mate_mixer_stream_set_position_volume_db
+mate_mixer_stream_get_position_decibel
+mate_mixer_stream_set_position_decibel
mate_mixer_stream_get_balance
mate_mixer_stream_set_balance
mate_mixer_stream_get_fade
mate_mixer_stream_set_fade
mate_mixer_stream_suspend
mate_mixer_stream_resume
+mate_mixer_stream_monitor_start
+mate_mixer_stream_monitor_stop
+mate_mixer_stream_monitor_is_running
mate_mixer_stream_list_ports
mate_mixer_stream_get_active_port
mate_mixer_stream_set_active_port
@@ -177,4 +182,3 @@ MATE_MIXER_STREAM_GET_INTERFACE
MATE_MIXER_TYPE_STREAM
mate_mixer_stream_get_type
</SECTION>
-
diff --git a/libmatemixer/matemixer-control.c b/libmatemixer/matemixer-control.c
index 3619a94..2bc61ae 100644
--- a/libmatemixer/matemixer-control.c
+++ b/libmatemixer/matemixer-control.c
@@ -761,7 +761,7 @@ mate_mixer_control_open (MateMixerControl *control)
if (G_UNLIKELY (state != MATE_MIXER_STATE_READY &&
state != MATE_MIXER_STATE_CONNECTING)) {
- /* This would a backend bug */
+ /* This would be a backend bug */
g_warn_if_reached ();
control_close (control);
diff --git a/libmatemixer/matemixer-stream.c b/libmatemixer/matemixer-stream.c
index 1ad4c50..fbf9293 100644
--- a/libmatemixer/matemixer-stream.c
+++ b/libmatemixer/matemixer-stream.c
@@ -286,22 +286,22 @@ mate_mixer_stream_set_volume (MateMixerStream *stream, gint64 volume)
}
gdouble
-mate_mixer_stream_get_volume_db (MateMixerStream *stream)
+mate_mixer_stream_get_decibel (MateMixerStream *stream)
{
MateMixerStreamInterface *iface;
- g_return_val_if_fail (MATE_MIXER_IS_STREAM (stream), 0);
+ g_return_val_if_fail (MATE_MIXER_IS_STREAM (stream), -MATE_MIXER_INFINITY);
iface = MATE_MIXER_STREAM_GET_INTERFACE (stream);
- if (iface->get_volume_db)
- return iface->get_volume_db (stream);
+ if (iface->get_decibel)
+ return iface->get_decibel (stream);
- return 0;
+ return -MATE_MIXER_INFINITY;
}
gboolean
-mate_mixer_stream_set_volume_db (MateMixerStream *stream, gdouble volume_db)
+mate_mixer_stream_set_decibel (MateMixerStream *stream, gdouble decibel)
{
MateMixerStreamInterface *iface;
@@ -309,8 +309,8 @@ mate_mixer_stream_set_volume_db (MateMixerStream *stream, gdouble volume_db)
iface = MATE_MIXER_STREAM_GET_INTERFACE (stream);
- if (iface->set_volume_db)
- return iface->set_volume_db (stream, volume_db);
+ if (iface->set_decibel)
+ return iface->set_decibel (stream, decibel);
return FALSE;
}
@@ -378,24 +378,24 @@ mate_mixer_stream_set_channel_volume (MateMixerStream *stream,
}
gdouble
-mate_mixer_stream_get_channel_volume_db (MateMixerStream *stream, guint channel)
+mate_mixer_stream_get_channel_decibel (MateMixerStream *stream, guint channel)
{
MateMixerStreamInterface *iface;
- g_return_val_if_fail (MATE_MIXER_IS_STREAM (stream), 0);
+ g_return_val_if_fail (MATE_MIXER_IS_STREAM (stream), -MATE_MIXER_INFINITY);
iface = MATE_MIXER_STREAM_GET_INTERFACE (stream);
- if (iface->get_channel_volume_db)
- return iface->get_channel_volume_db (stream, channel);
+ if (iface->get_channel_decibel)
+ return iface->get_channel_decibel (stream, channel);
- return 0;
+ return -MATE_MIXER_INFINITY;
}
gboolean
-mate_mixer_stream_set_channel_volume_db (MateMixerStream *stream,
- guint channel,
- gdouble volume_db)
+mate_mixer_stream_set_channel_decibel (MateMixerStream *stream,
+ guint channel,
+ gdouble decibel)
{
MateMixerStreamInterface *iface;
@@ -403,8 +403,8 @@ mate_mixer_stream_set_channel_volume_db (MateMixerStream *stream,
iface = MATE_MIXER_STREAM_GET_INTERFACE (stream);
- if (iface->set_channel_volume_db)
- return iface->set_channel_volume_db (stream, channel, volume_db);
+ if (iface->set_channel_decibel)
+ return iface->set_channel_decibel (stream, channel, decibel);
return FALSE;
}
@@ -459,25 +459,25 @@ mate_mixer_stream_set_position_volume (MateMixerStream *stream,
}
gdouble
-mate_mixer_stream_get_position_volume_db (MateMixerStream *stream,
- MateMixerChannelPosition position)
+mate_mixer_stream_get_position_decibel (MateMixerStream *stream,
+ MateMixerChannelPosition position)
{
MateMixerStreamInterface *iface;
- g_return_val_if_fail (MATE_MIXER_IS_STREAM (stream), 0);
+ g_return_val_if_fail (MATE_MIXER_IS_STREAM (stream), -MATE_MIXER_INFINITY);
iface = MATE_MIXER_STREAM_GET_INTERFACE (stream);
- if (iface->get_position_volume_db)
- return iface->get_position_volume_db (stream, position);
+ if (iface->get_position_decibel)
+ return iface->get_position_decibel (stream, position);
- return 0;
+ return -MATE_MIXER_INFINITY;
}
gboolean
-mate_mixer_stream_set_position_volume_db (MateMixerStream *stream,
- MateMixerChannelPosition position,
- gdouble volume_db)
+mate_mixer_stream_set_position_decibel (MateMixerStream *stream,
+ MateMixerChannelPosition position,
+ gdouble decibel)
{
MateMixerStreamInterface *iface;
@@ -485,8 +485,8 @@ mate_mixer_stream_set_position_volume_db (MateMixerStream *stream,
iface = MATE_MIXER_STREAM_GET_INTERFACE (stream);
- if (iface->set_position_volume_db)
- return iface->set_position_volume_db (stream, position, volume_db);
+ if (iface->set_position_decibel)
+ return iface->set_position_decibel (stream, position, decibel);
return FALSE;
}
diff --git a/libmatemixer/matemixer-stream.h b/libmatemixer/matemixer-stream.h
index d39cc43..7b202b8 100644
--- a/libmatemixer/matemixer-stream.h
+++ b/libmatemixer/matemixer-stream.h
@@ -18,6 +18,8 @@
#ifndef MATEMIXER_STREAM_H
#define MATEMIXER_STREAM_H
+#include <math.h>
+#include <stdlib.h>
#include <glib.h>
#include <glib-object.h>
@@ -27,6 +29,12 @@
G_BEGIN_DECLS
+#ifdef INFINITY
+#define MATE_MIXER_INFINITY INFINITY
+#else
+#define MATE_MIXER_INFINITY (atof ("inf"))
+#endif
+
#define MATE_MIXER_TYPE_STREAM \
(mate_mixer_stream_get_type ())
#define MATE_MIXER_STREAM(o) \
@@ -56,9 +64,9 @@ struct _MateMixerStreamInterface
gint64 (*get_volume) (MateMixerStream *stream);
gboolean (*set_volume) (MateMixerStream *stream,
gint64 volume);
- gdouble (*get_volume_db) (MateMixerStream *stream);
- gboolean (*set_volume_db) (MateMixerStream *stream,
- gdouble volume_db);
+ gdouble (*get_decibel) (MateMixerStream *stream);
+ gboolean (*set_decibel) (MateMixerStream *stream,
+ gdouble decibel);
MateMixerChannelPosition (*get_channel_position) (MateMixerStream *stream,
guint channel);
gint64 (*get_channel_volume) (MateMixerStream *stream,
@@ -66,11 +74,11 @@ struct _MateMixerStreamInterface
gboolean (*set_channel_volume) (MateMixerStream *stream,
guint channel,
gint64 volume);
- gdouble (*get_channel_volume_db) (MateMixerStream *stream,
+ gdouble (*get_channel_decibel) (MateMixerStream *stream,
guint channel);
- gboolean (*set_channel_volume_db) (MateMixerStream *stream,
+ gboolean (*set_channel_decibel) (MateMixerStream *stream,
guint channel,
- gdouble volume_db);
+ gdouble decibel);
gboolean (*has_position) (MateMixerStream *stream,
MateMixerChannelPosition position);
gint64 (*get_position_volume) (MateMixerStream *stream,
@@ -78,11 +86,11 @@ struct _MateMixerStreamInterface
gboolean (*set_position_volume) (MateMixerStream *stream,
MateMixerChannelPosition position,
gint64 volume);
- gdouble (*get_position_volume_db) (MateMixerStream *stream,
+ gdouble (*get_position_decibel) (MateMixerStream *stream,
MateMixerChannelPosition position);
- gboolean (*set_position_volume_db) (MateMixerStream *stream,
+ gboolean (*set_position_decibel) (MateMixerStream *stream,
MateMixerChannelPosition position,
- gdouble volume_db);
+ gdouble decibel);
gdouble (*get_balance) (MateMixerStream *stream);
gboolean (*set_balance) (MateMixerStream *stream,
gdouble balance);
@@ -125,9 +133,9 @@ gint64 mate_mixer_stream_get_volume (MateMixerStre
gboolean mate_mixer_stream_set_volume (MateMixerStream *stream,
gint64 volume);
-gdouble mate_mixer_stream_get_volume_db (MateMixerStream *stream);
-gboolean mate_mixer_stream_set_volume_db (MateMixerStream *stream,
- gdouble volume_db);
+gdouble mate_mixer_stream_get_decibel (MateMixerStream *stream);
+gboolean mate_mixer_stream_set_decibel (MateMixerStream *stream,
+ gdouble decibel);
MateMixerChannelPosition mate_mixer_stream_get_channel_position (MateMixerStream *stream,
guint channel);
@@ -138,11 +146,11 @@ gboolean mate_mixer_stream_set_channel_volume (MateMixerStre
guint channel,
gint64 volume);
-gdouble mate_mixer_stream_get_channel_volume_db (MateMixerStream *stream,
+gdouble mate_mixer_stream_get_channel_decibel (MateMixerStream *stream,
guint channel);
-gboolean mate_mixer_stream_set_channel_volume_db (MateMixerStream *stream,
+gboolean mate_mixer_stream_set_channel_decibel (MateMixerStream *stream,
guint channel,
- gdouble volume_db);
+ gdouble decibel);
gboolean mate_mixer_stream_has_position (MateMixerStream *stream,
MateMixerChannelPosition position);
@@ -153,11 +161,11 @@ gboolean mate_mixer_stream_set_position_volume (MateMixerStre
MateMixerChannelPosition position,
gint64 volume);
-gdouble mate_mixer_stream_get_position_volume_db (MateMixerStream *stream,
+gdouble mate_mixer_stream_get_position_decibel (MateMixerStream *stream,
MateMixerChannelPosition position);
-gboolean mate_mixer_stream_set_position_volume_db (MateMixerStream *stream,
+gboolean mate_mixer_stream_set_position_decibel (MateMixerStream *stream,
MateMixerChannelPosition position,
- gdouble volume_db);
+ gdouble decibel);
gdouble mate_mixer_stream_get_balance (MateMixerStream *stream);
gboolean mate_mixer_stream_set_balance (MateMixerStream *stream,