mmserv/tms/tmsserver/src/tmscenrepaudiohandler.cpp
branchRCL_3
changeset 20 0ac9a5310753
parent 19 095bea5f582e
equal deleted inserted replaced
19:095bea5f582e 20:0ac9a5310753
    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 // ---------------------------------------------------------------------------
   122         else
   119         else
   123             {
   120             {
   124             iMuteListener->Set(EPSTelMicMuteOff);
   121             iMuteListener->Set(EPSTelMicMuteOff);
   125             }
   122             }
   126         }
   123         }
   127     iPublish = FALSE;
       
   128     }
   124     }
   129 
   125 
   130 // ---------------------------------------------------------------------------
   126 // ---------------------------------------------------------------------------
   131 // TMSCenRepAudioHandler::SetLoudSpeakerVol
   127 // TMSCenRepAudioHandler::SetLoudSpeakerVol
   132 // ---------------------------------------------------------------------------
   128 // ---------------------------------------------------------------------------
   218     if (iIncallLoudspeakerVolumeListener)
   214     if (iIncallLoudspeakerVolumeListener)
   219         {
   215         {
   220         /*volGetRes =*/ iIncallLoudspeakerVolumeListener->Get(volLoud);
   216         /*volGetRes =*/ iIncallLoudspeakerVolumeListener->Get(volLoud);
   221         }
   217         }
   222 
   218 
   223     iPublish = TRUE;
       
   224     TRACE_PRN_FN_EXT;
   219     TRACE_PRN_FN_EXT;
   225     }
   220     }
   226 
   221 
   227 // End of file
   222 // End of file