mmserv/tms/tmsserver/src/tmsaudioinbandtoneplayer.cpp
changeset 33 5e8b14bae8c3
parent 20 b67dd1fc57c5
equal deleted inserted replaced
28:ebf79c79991a 33:5e8b14bae8c3
   261                             KPhoneInbandToneZero));
   261                             KPhoneInbandToneZero));
   262                     break;
   262                     break;
   263                 default:
   263                 default:
   264                     break;
   264                     break;
   265                 }
   265                 }
   266 #ifndef __WINS__
   266 #ifndef __WINSCW__
   267             //Play the tone
   267             //Play the tone
   268             iPlayer->Play();
   268             iPlayer->Play();
   269 #endif
   269 #endif
   270             }
   270             }
   271         }
   271         }
   280 void TMSAudioInbandTonePlayer::SetToneAttributes(const guint pref,
   280 void TMSAudioInbandTonePlayer::SetToneAttributes(const guint pref,
   281         const guint priority, const gint repeatTimes, const gint trailSilence)
   281         const guint priority, const gint repeatTimes, const gint trailSilence)
   282     {
   282     {
   283     iPlayer->SetRepeats(repeatTimes, TTimeIntervalMicroSeconds(trailSilence));
   283     iPlayer->SetRepeats(repeatTimes, TTimeIntervalMicroSeconds(trailSilence));
   284     iPlayer->SetPriority(priority, static_cast<TMdaPriorityPreference> (pref));
   284     iPlayer->SetPriority(priority, static_cast<TMdaPriorityPreference> (pref));
   285     }
       
   286 
       
   287 // -----------------------------------------------------------------------------
       
   288 // TMSAudioInbandTonePlayer::MatoPrepareComplete
       
   289 // Updates flag values and plays current inbandtone.
       
   290 // (other items were commented in a header).
       
   291 // -----------------------------------------------------------------------------
       
   292 //
       
   293 void TMSAudioInbandTonePlayer::MatoPrepareComplete(TInt aError)
       
   294     {
       
   295     TRACE_PRN_FN_ENT;
       
   296     if (aError == KErrNone)
       
   297         {
       
   298         PlayCurrentTone();
       
   299         }
       
   300     TRACE_PRN_FN_EXT;
       
   301     }
   285     }
   302 
   286 
   303 // -----------------------------------------------------------------------------
   287 // -----------------------------------------------------------------------------
   304 // TMSAudioInbandTonePlayer::SetVolume
   288 // TMSAudioInbandTonePlayer::SetVolume
   305 // -----------------------------------------------------------------------------
   289 // -----------------------------------------------------------------------------
   320         }
   304         }
   321     TRACE_PRN_FN_EXT;
   305     TRACE_PRN_FN_EXT;
   322     }
   306     }
   323 
   307 
   324 // -----------------------------------------------------------------------------
   308 // -----------------------------------------------------------------------------
       
   309 // TMSAudioInbandTonePlayer::MatoPrepareComplete
       
   310 // Updates flag values and plays current inbandtone.
       
   311 // (other items were commented in a header).
       
   312 // -----------------------------------------------------------------------------
       
   313 //
       
   314 void TMSAudioInbandTonePlayer::MatoPrepareComplete(TInt aError)
       
   315     {
       
   316     TRACE_PRN_FN_ENT;
       
   317     if (aError == KErrNone)
       
   318         {
       
   319         PlayCurrentTone();
       
   320         }
       
   321     TRACE_PRN_IF_ERR(aError);
       
   322     TRACE_PRN_FN_EXT;
       
   323     }
       
   324 
       
   325 // -----------------------------------------------------------------------------
   325 // TMSAudioInbandTonePlayer::MatoPlayComplete
   326 // TMSAudioInbandTonePlayer::MatoPlayComplete
   326 // -
   327 // -
   327 // (other items were commented in a header).
   328 // (other items were commented in a header).
   328 // -----------------------------------------------------------------------------
   329 // -----------------------------------------------------------------------------
   329 //
   330 //
   330 void TMSAudioInbandTonePlayer::MatoPlayComplete(TInt /*aError*/)
   331 void TMSAudioInbandTonePlayer::MatoPlayComplete(
       
   332 #ifdef _DEBUG
       
   333         TInt aError)
       
   334 #else
       
   335         TInt /*aError*/)
       
   336 #endif
   331     {
   337     {
   332     TRACE_PRN_FN_ENT;
   338     TRACE_PRN_FN_ENT;
   333     // TODO: process error?
   339     // TODO: process error?
       
   340 #ifdef _DEBUG
       
   341     TRACE_PRN_IF_ERR(aError);
       
   342 #endif
   334     TRACE_PRN_FN_EXT;
   343     TRACE_PRN_FN_EXT;
   335     }
   344     }
   336 
   345 
   337 // -----------------------------------------------------------------------------
   346 // -----------------------------------------------------------------------------
   338 // TMSAudioInbandTonePlayer::CalculateMediaServerVolume
   347 // TMSAudioInbandTonePlayer::CalculateMediaServerVolume
   358     gint volume( /*KPhoneInbandVolumeMin*/KPhoneInbandVolumeMax);
   367     gint volume( /*KPhoneInbandVolumeMin*/KPhoneInbandVolumeMax);
   359     SetVolume(volume);
   368     SetVolume(volume);
   360     TRACE_PRN_FN_EXT;
   369     TRACE_PRN_FN_EXT;
   361     }
   370     }
   362 
   371 
   363 // End of File