Merge lp:~rsalveti/telepathy-ofono/remove-initial-voice-volume into lp:telepathy-ofono

Proposed by Ricardo Salveti
Status: Merged
Approved by: Michael Frey
Approved revision: 108
Merged at revision: 108
Proposed branch: lp:~rsalveti/telepathy-ofono/remove-initial-voice-volume
Merge into: lp:telepathy-ofono
Diff against target: 55 lines (+0/-20)
2 files modified
qpulseaudioengine.cpp (+0/-19)
qpulseaudioengine.h (+0/-1)
To merge this branch: bzr merge lp:~rsalveti/telepathy-ofono/remove-initial-voice-volume
Reviewer Review Type Date Requested Status
Michael Frey (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+235564@code.launchpad.net

Commit message

qpulseaudioengine: don't need to set initial volume anymore, handled by the indicator and pulse

Description of the change

qpulseaudioengine: don't need to set initial volume anymore, handled by the indicator and pulse

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :
Revision history for this message
Michael Frey (mfrey) wrote :

tested -- works perfect.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qpulseaudioengine.cpp'
2--- qpulseaudioengine.cpp 2014-08-26 22:47:34 +0000
3+++ qpulseaudioengine.cpp 2014-09-23 06:10:16 +0000
4@@ -26,9 +26,6 @@
5 #define PULSEAUDIO_PROFILE_HSP "hsp"
6 #define PULSEAUDIO_PROFILE_A2DP "a2dp"
7
8-/* Default initial value also used by android */
9-#define DEFAULT_VOICECALL_VOLUME 0.35
10-
11 QT_BEGIN_NAMESPACE
12
13 static void contextStateCallbackInit(pa_context *context, void *userdata)
14@@ -447,17 +444,6 @@
15 return true;
16 }
17
18-void QPulseAudioEngine::setSinkVolume(const char *sink_name, const double volume)
19-{
20- pa_cvolume cv;
21- pa_volume_t v = pa_sw_volume_from_linear(volume);
22-
23- qDebug("Setting sink '%s' volume to '%f'", sink_name, volume);
24-
25- pa_cvolume_set(&cv, 2, v);
26- pa_operation_unref(pa_context_set_sink_volume_by_name(m_context, sink_name, &cv, success_cb, this));
27-}
28-
29 int QPulseAudioEngine::setupVoiceCall()
30 {
31 pa_operation *o;
32@@ -595,11 +581,6 @@
33 if (!handleOperation(o, "pa_context_set_sink_port_by_name"))
34 return;
35 }
36- /* Identify initial voice volume for the used port.
37- * Set to a default fixed value when starting and when changing ports */
38- if ((m_callstatus == CallActive) && (m_nametoset != "") &&
39- ((p_callstatus != CallActive) || (m_valuetoset != "")))
40- setSinkVolume(m_nametoset.c_str(), DEFAULT_VOICECALL_VOLUME);
41
42 /* Same for source */
43 m_nametoset = m_valuetoset = "";
44
45=== modified file 'qpulseaudioengine.h'
46--- qpulseaudioengine.h 2014-08-26 22:47:34 +0000
47+++ qpulseaudioengine.h 2014-09-23 06:10:16 +0000
48@@ -63,7 +63,6 @@
49 void restoreVoiceCall(void);
50 void setCallMode(CallStatus callstatus, AudioMode audiomode);
51 void setMicMute(bool muted); /* True if muted, false if unmuted */
52- void setSinkVolume(const char *sink_name, const double volume);
53
54 /* Callbacks to be used internally */
55 void cardInfoCallback(const pa_card_info *card);

Subscribers

People subscribed via source and target branches