mmserv/tms/tmsserver/src/tmsrtplayer.cpp
changeset 20 b67dd1fc57c5
parent 12 5a06f39ad45b
child 21 2ed61feeead6
equal deleted inserted replaced
19:4a629bc82c5e 20:b67dd1fc57c5
   202     if (iProfile)
   202     if (iProfile)
   203         {
   203         {
   204         iProfile->Release();
   204         iProfile->Release();
   205         iProfile = NULL;
   205         iProfile = NULL;
   206         }
   206         }
   207     __ASSERT_DEBUG(iEngine, PANIC(TMS_RESULT_UNINITIALIZED_OBJECT));
   207     __ASSERT_ALWAYS(iEngine, PANIC(TMS_RESULT_UNINITIALIZED_OBJECT));
   208 
   208 
   209     iProfile = iEngine->ActiveProfileL();
   209     iProfile = iEngine->ActiveProfileL();
   210     MProEngToneSettings& settings = iProfile->ToneSettings();
   210     if (iProfile)
   211     iRtParam.iVolume = settings.RingingVolume();
   211         {
   212     iRtParam.iRingingType = settings.RingingType();
   212         MProEngToneSettings& settings = iProfile->ToneSettings();
   213     iRtParam.iCallerText = settings.TextToSpeech();
   213         iRtParam.iVolume = settings.RingingVolume();
       
   214         iRtParam.iRingingType = settings.RingingType();
       
   215         iRtParam.iCallerText = settings.TextToSpeech();
       
   216         }
   214     }
   217     }
   215 
   218 
   216 // -----------------------------------------------------------------------------
   219 // -----------------------------------------------------------------------------
   217 // TMSRingTonePlayer::LoadProfileRingToneL
   220 // TMSRingTonePlayer::LoadProfileRingToneL
   218 // -----------------------------------------------------------------------------
   221 // -----------------------------------------------------------------------------
   220 void TMSRingTonePlayer::LoadProfileRingToneL()
   223 void TMSRingTonePlayer::LoadProfileRingToneL()
   221     {
   224     {
   222     TRACE_PRN_FN_ENT;
   225     TRACE_PRN_FN_ENT;
   223 
   226 
   224     LoadActiveProfileSettingsL();
   227     LoadActiveProfileSettingsL();
   225     __ASSERT_DEBUG(iProfile, PANIC(TMS_RESULT_UNINITIALIZED_OBJECT));
   228     __ASSERT_ALWAYS(iProfile, PANIC(TMS_RESULT_UNINITIALIZED_OBJECT));
   226 
   229 
   227     MProEngTones& tones = iProfile->ProfileTones();
   230     MProEngTones& tones = iProfile->ProfileTones();
   228     // Get alternate line RT: tones.RingingTone2()
   231     // Get alternate line RT: tones.RingingTone2()
   229     // Get default video RT: tones.VideoCallRingingTone()
   232     // Get default video RT: tones.VideoCallRingingTone()
   230 
   233 
  1112     TRACE_PRN_FN_ENT;
  1115     TRACE_PRN_FN_ENT;
  1113 
  1116 
  1114     TMSRtAudioHdlr* currPlayer = NULL;
  1117     TMSRtAudioHdlr* currPlayer = NULL;
  1115     currPlayer = GetCurrentlyActiveAudioPlayerWithTTS();
  1118     currPlayer = GetCurrentlyActiveAudioPlayerWithTTS();
  1116 
  1119 
  1117     if (!currPlayer)
  1120     if (!currPlayer || !iTtsPlayer)
  1118         {
  1121         {
  1119         return;
  1122         return;
  1120         }
  1123         }
  1121 
  1124 
  1122     TInt volume(0);
  1125     TInt volume(0);
  1374                     }
  1377                     }
  1375                 iAudioPlayer = NULL;
  1378                 iAudioPlayer = NULL;
  1376                 }
  1379                 }
  1377 
  1380 
  1378 #ifdef __WINS__
  1381 #ifdef __WINS__
  1379             TRAPD(ignore, PlayAudioRingToneL());
  1382             TRAP_IGNORE(PlayAudioRingToneL());
  1380             iTonePlayingStatus = EDefaultTonePlaying;
  1383             iTonePlayingStatus = EDefaultTonePlaying;
  1381 #else
  1384 #else
  1382             TRAPD(ignore, PlayDefaultToneL());
  1385             TRAP_IGNORE(PlayDefaultToneL());
  1383 #endif
  1386 #endif
  1384             if (ignore) ;
       
  1385             break;
  1387             break;
  1386             }
  1388             }
  1387         case EDefaultTonePlaying:
  1389         case EDefaultTonePlaying:
  1388             {
  1390             {
  1389             if (aDelete)
  1391             if (aDelete)
  1590     // Get file size
  1592     // Get file size
  1591     TInt size = 0;
  1593     TInt size = 0;
  1592     TInt error = TMS_RESULT_SUCCESS;
  1594     TInt error = TMS_RESULT_SUCCESS;
  1593 
  1595 
  1594     RFs fs;
  1596     RFs fs;
  1595     fs.Connect();
  1597     error = fs.Connect();
  1596     TEntry entry;
  1598 
  1597     if (TMS_RESULT_SUCCESS == fs.Entry(aFile, entry))
  1599     if (error == TMS_RESULT_SUCCESS)
  1598         {
  1600         {
  1599         size = entry.iSize;
  1601         TEntry entry;
       
  1602         if (TMS_RESULT_SUCCESS == fs.Entry(aFile, entry))
       
  1603             {
       
  1604             size = entry.iSize;
       
  1605             }
  1600         }
  1606         }
  1601     fs.Close();
  1607     fs.Close();
  1602 
  1608 
  1603     aSizeLimitKB *= Kkilo;
  1609     aSizeLimitKB *= Kkilo;
  1604     if (aSizeLimitKB && size > aSizeLimitKB)
  1610     if (aSizeLimitKB && size > aSizeLimitKB)