31 #include "tmscenrepaudiohandler.h" |
31 #include "tmscenrepaudiohandler.h" |
32 #include "tmscenreplistener.h" |
32 #include "tmscenreplistener.h" |
33 #include "tmspubsublistener.h" |
33 #include "tmspubsublistener.h" |
34 #include "tmsutility.h" |
34 #include "tmsutility.h" |
35 |
35 |
36 #ifdef __WINSCW__ |
36 #ifndef __WINS__ |
|
37 const TInt KDefaultMaxGain = 1; |
|
38 #else |
37 const TInt KDefaultMaxGain = 64; |
39 const TInt KDefaultMaxGain = 64; |
38 #else |
|
39 const TInt KDefaultMaxGain = 1; |
|
40 #endif |
40 #endif |
41 |
41 |
42 using namespace TMS; |
42 using namespace TMS; |
43 |
43 |
44 // --------------------------------------------------------------------------- |
44 // --------------------------------------------------------------------------- |
76 void TMSCenRepAudioHandler::HandleNotifyPSL(const TUid /*aUid*/, |
76 void TMSCenRepAudioHandler::HandleNotifyPSL(const TUid /*aUid*/, |
77 const TInt& /*aKey*/, const TRequestStatus& /*aStatus*/) |
77 const TInt& /*aKey*/, const TRequestStatus& /*aStatus*/) |
78 { |
78 { |
79 TInt muteVal; |
79 TInt muteVal; |
80 TInt err = KErrNotFound; |
80 TInt err = KErrNotFound; |
81 if (iPublish) |
81 |
82 { |
82 if (iMuteListener) |
83 if (iMuteListener) |
83 { |
84 { |
84 err = iMuteListener->Get(muteVal); |
85 err = iMuteListener->Get(muteVal); |
85 } |
86 } |
86 if (err == KErrNone && muteVal == EPSTelMicMuteOn) |
87 if (err == KErrNone && muteVal == EPSTelMicMuteOn) |
87 { |
88 { |
|
89 #if !defined(__WINSCW__) |
88 #if !defined(__WINSCW__) |
90 if (iTMSSer) |
89 if (iTMSSer) |
91 { |
90 { |
92 iTMSSer->SetGain(NULL, 0); |
91 iTMSSer->SetGain(NULL, 0); |
93 } |
92 } |
94 #endif //__WINSCW__ |
93 #endif //__WINSCW__ |
95 } |
94 } |
96 else if (err == KErrNone) |
95 else if (err == KErrNone) |
97 { |
96 { |
98 #if !defined(__WINSCW__) |
97 #if !defined(__WINSCW__) |
99 // Change when gain is really changed |
98 // Change when gain is really changed |
100 if (iTMSSer) |
99 if (iTMSSer) |
101 { |
100 { |
102 iTMSSer->SetGain(NULL, KDefaultMaxGain); |
101 iTMSSer->SetGain(NULL, KDefaultMaxGain); |
103 } |
102 } |
104 #endif //__WINSCW__ |
103 #endif //__WINSCW__ |
105 } |
104 } |
106 } |
|
107 iPublish = TRUE; |
|
108 } |
105 } |
109 |
106 |
110 // --------------------------------------------------------------------------- |
107 // --------------------------------------------------------------------------- |
111 // TMSCenRepAudioHandler::SetMuteState |
108 // TMSCenRepAudioHandler::SetMuteState |
112 // --------------------------------------------------------------------------- |
109 // --------------------------------------------------------------------------- |