don't check the internal volume since this makes it impossible to unmute a
2007-08-18 Jens Granseuer <jensgr@gmx.net> * actions/acme-volume-gstreamer.c: (update_state): don't check the internal volume since this makes it impossible to unmute a low volume (that translates to an internal GStreamer volume of 0) * gnome-settings-multimedia-keys.c: (do_sound_action): if we're muted and silent, don't just unmute on VOL+ but also raise the volume svn path=/trunk/; revision=8017
This commit is contained in:
parent
70a23111a8
commit
8323405071
3 changed files with 29 additions and 18 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2007-08-18 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
* actions/acme-volume-gstreamer.c: (update_state): don't check the
|
||||||
|
internal volume since this makes it impossible to unmute a low volume
|
||||||
|
(that translates to an internal GStreamer volume of 0)
|
||||||
|
|
||||||
|
* gnome-settings-multimedia-keys.c: (do_sound_action): if we're
|
||||||
|
muted and silent, don't just unmute on VOL+ but also raise the
|
||||||
|
volume
|
||||||
|
|
||||||
2007-08-17 Jens Granseuer <jensgr@gmx.net>
|
2007-08-17 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
* gnome-settings-daemon.c: (initialize_modules), (start_modules),
|
* gnome-settings-daemon.c: (initialize_modules), (start_modules),
|
||||||
|
|
|
@ -134,7 +134,7 @@ update_state (AcmeVolumeGStreamer * self)
|
||||||
{
|
{
|
||||||
gint *volumes, n;
|
gint *volumes, n;
|
||||||
gdouble vol = 0;
|
gdouble vol = 0;
|
||||||
GstMixerTrack *track = GST_MIXER_TRACK(self->_priv->mixer_tracks->data);
|
GstMixerTrack *track = GST_MIXER_TRACK (self->_priv->mixer_tracks->data);
|
||||||
|
|
||||||
/* update mixer by getting volume */
|
/* update mixer by getting volume */
|
||||||
volumes = g_new0 (gint, track->num_channels);
|
volumes = g_new0 (gint, track->num_channels);
|
||||||
|
@ -146,8 +146,7 @@ update_state (AcmeVolumeGStreamer * self)
|
||||||
vol = 100 * vol / (track->max_volume - track->min_volume);
|
vol = 100 * vol / (track->max_volume - track->min_volume);
|
||||||
|
|
||||||
/* update mute flag, and volume if not muted */
|
/* update mute flag, and volume if not muted */
|
||||||
if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_MUTE) ||
|
if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_MUTE))
|
||||||
(vol == 0 && self->_priv->volume != 0))
|
|
||||||
self->_priv->mute = TRUE;
|
self->_priv->mute = TRUE;
|
||||||
else
|
else
|
||||||
self->_priv->volume = vol;
|
self->_priv->volume = vol;
|
||||||
|
|
|
@ -646,7 +646,9 @@ do_sound_action (Acme *acme, int type)
|
||||||
break;
|
break;
|
||||||
case VOLUME_UP_KEY:
|
case VOLUME_UP_KEY:
|
||||||
if (muted) {
|
if (muted) {
|
||||||
acme_volume_mute_toggle(acme->volobj);
|
if (vol == 0)
|
||||||
|
acme_volume_set_volume (acme->volobj, vol + vol_step);
|
||||||
|
acme_volume_mute_toggle (acme->volobj);
|
||||||
} else {
|
} else {
|
||||||
acme_volume_set_volume (acme->volobj, vol + vol_step);
|
acme_volume_set_volume (acme->volobj, vol + vol_step);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue