mmsharing/mmshengine/src/musengmcesession.cpp
branchRCL_3
changeset 11 ff8a573c0e2e
parent 0 f0cf47e981f9
child 19 95754dcd27ad
equal deleted inserted replaced
10:04980be5c5fe 11:ff8a573c0e2e
   319       
   319       
   320         
   320         
   321     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::EnableDisplay()")
   321     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::EnableDisplay()")
   322     }
   322     }
   323 
   323 
       
   324 // -----------------------------------------------------------------------------
       
   325 // 
       
   326 // -----------------------------------------------------------------------------
       
   327 //
       
   328 EXPORT_C TBool CMusEngMceSession::IsDisplayEnabledL()
       
   329     {
       
   330     __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
       
   331     CMceDisplaySink* display = MusEngMceUtils::GetDisplayL( *iSession );
       
   332     return display->IsEnabled();
       
   333     }
       
   334 
   324 
   335 
   325 // -----------------------------------------------------------------------------
   336 // -----------------------------------------------------------------------------
   326 // Mutes playback of sended audio streams. Audio data is still streamed.
   337 // Mutes playback of sended audio streams. Audio data is still streamed.
   327 // -----------------------------------------------------------------------------
   338 // -----------------------------------------------------------------------------
   328 //
   339 //
   526             {
   537             {
   527             CMceSpeakerSink* speaker = 
   538             CMceSpeakerSink* speaker = 
   528                 MusEngMceUtils::GetSpeaker( *( iSession->Streams()[i] ) );
   539                 MusEngMceUtils::GetSpeaker( *( iSession->Streams()[i] ) );
   529 
   540 
   530             if ( speaker &&        
   541             if ( speaker &&        
   531                  aNewVolume >= 1 &&
   542                  aNewVolume >= KMusEngMinVolume &&
   532                  aNewVolume <= KMusEngMaxVolume )
   543                  aNewVolume <= KMusEngMaxVolume )
   533                 {
   544                 {
   534                 // MCE might have different scale for volume than MUS
   545                 // MCE might have different scale for volume than MUS
   535                 // so adjust MUS volume to MCE scale before setting.
   546                 // so adjust MUS volume to MCE scale before setting.
   536                 TInt maxVol = speaker->MaxVolumeL();
   547                 TInt maxVol = speaker->MaxVolumeL();
  1454                 }
  1465                 }
  1455             }
  1466             }
  1456         }    
  1467         }    
  1457     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::DoCodecConfigurationBasedRemovalL()" )
  1468     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::DoCodecConfigurationBasedRemovalL()" )
  1458     }
  1469     }
       
  1470 
       
  1471 // -----------------------------------------------------------------------------
       
  1472 // 
       
  1473 // -----------------------------------------------------------------------------
       
  1474 //
       
  1475 void CMusEngMceSession::VolumeChanged( TInt aVolume, TBool aAudioRouteChanged )
       
  1476     {
       
  1477     MUS_LOG1( "mus: [ENGINE]  -> CMusEngMceSession::VolumeChanged(): %d", aVolume )
       
  1478     if ( iSession )
       
  1479         {
       
  1480         CMusEngSession::VolumeChanged( aVolume, aAudioRouteChanged );
       
  1481         TRAP_IGNORE( SetSpeakerVolumeL( aVolume ) );
       
  1482         }
       
  1483 
       
  1484     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::VolumeChanged()" )
       
  1485     }