Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
6b1a485d
Commit
6b1a485d
authored
Sep 11, 2013
by
Tristan Matthews
Browse files
* #29271: pulse: add/fix volume and mute controls
parent
2eeb667b
Changes
3
Hide whitespace changes
Inline
Side-by-side
daemon/src/audio/pulseaudio/pulselayer.cpp
View file @
6b1a485d
...
...
@@ -529,6 +529,8 @@ void PulseLayer::readFromMic()
unsigned
int
mainBufferSampleRate
=
Manager
::
instance
().
getMainBuffer
().
getInternalSamplingRate
();
bool
resample
=
sampleRate_
!=
mainBufferSampleRate
;
in
.
applyGain
(
captureGain_
);
AudioBuffer
*
out
=
&
in
;
if
(
resample
)
{
...
...
gnome/src/config/audioconf.c
View file @
6b1a485d
...
...
@@ -777,7 +777,13 @@ select_audio_manager(GtkWidget *alsa_button, SFLPhoneClient *client)
gtk_container_add
(
GTK_CONTAINER
(
alsa_conf
),
alsabox
);
gtk_widget_show
(
alsa_conf
);
gtk_widget_set_sensitive
(
alsa_conf
,
TRUE
);
gtk_action_set_sensitive
(
volumeToggle_
,
TRUE
);
if
(
gtk_toggle_action_get_active
(
GTK_TOGGLE_ACTION
(
volumeToggle_
)))
{
main_window_volume_controls
(
FALSE
);
g_settings_set_boolean
(
client
->
settings
,
"show-volume-controls"
,
FALSE
);
gtk_toggle_action_set_active
(
GTK_TOGGLE_ACTION
(
volumeToggle_
),
FALSE
);
}
}
else
if
(
must_show_alsa_conf
()
&&
!
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
alsa_button
)))
{
dbus_set_audio_manager
(
PULSEAUDIO_API_STR
);
gtk_container_remove
(
GTK_CONTAINER
(
alsa_conf
),
alsabox
);
...
...
@@ -787,7 +793,6 @@ select_audio_manager(GtkWidget *alsa_button, SFLPhoneClient *client)
gtk_container_add
(
GTK_CONTAINER
(
pulse_conf
),
pulsebox
);
gtk_widget_show
(
pulse_conf
);
gtk_widget_set_sensitive
(
pulse_conf
,
TRUE
);
gtk_action_set_sensitive
(
volumeToggle_
,
TRUE
);
if
(
gtk_toggle_action_get_active
(
GTK_TOGGLE_ACTION
(
volumeToggle_
)))
{
main_window_volume_controls
(
FALSE
);
...
...
@@ -795,7 +800,6 @@ select_audio_manager(GtkWidget *alsa_button, SFLPhoneClient *client)
gtk_toggle_action_set_active
(
GTK_TOGGLE_ACTION
(
volumeToggle_
),
FALSE
);
}
gtk_action_set_sensitive
(
volumeToggle_
,
FALSE
);
}
else
g_warning
(
"Unexpected audio API state"
);
}
...
...
@@ -973,5 +977,5 @@ gboolean must_show_alsa_conf()
gboolean
must_show_volume
(
SFLPhoneClient
*
client
)
{
return
g_settings_get_boolean
(
client
->
settings
,
"show-volume-controls"
)
&&
must_show_alsa_conf
()
;
return
g_settings_get_boolean
(
client
->
settings
,
"show-volume-controls"
);
}
gnome/src/uimanager.c
View file @
6b1a485d
...
...
@@ -1673,7 +1673,7 @@ create_menus(GtkUIManager *ui, SFLPhoneClient *client)
// Set the toggle buttons
gtk_toggle_action_set_active
(
GTK_TOGGLE_ACTION
(
get_action
(
ui
,
"/MenuBar/ViewMenu/Dialpad"
)),
g_settings_get_boolean
(
client
->
settings
,
"show-dialpad"
));
gtk_toggle_action_set_active
(
GTK_TOGGLE_ACTION
(
volumeToggle_
),
must_show_volume
(
client
));
gtk_action_set_sensitive
(
volumeToggle_
,
must_show_alsa_conf
()
);
gtk_action_set_sensitive
(
volumeToggle_
,
TRUE
);
gtk_action_set_sensitive
(
get_action
(
ui
,
"/MenuBar/ViewMenu/Toolbar"
),
FALSE
);
/* Add the loading icon at the right of the toolbar. It is used for addressbook searches. */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment