radioengine/engine/src/cradioengineimp.cpp
changeset 48 e14766a36cdc
parent 41 3a6b55c6390c
child 50 c44f9bb56771
equal deleted inserted replaced
41:3a6b55c6390c 48:e14766a36cdc
   831         if ( aDirection == RadioEngine::ERadioDecVolume )
   831         if ( aDirection == RadioEngine::ERadioDecVolume )
   832             {
   832             {
   833             TInt min = iSettings->EngineSettings().DefaultMinVolumeLevel();
   833             TInt min = iSettings->EngineSettings().DefaultMinVolumeLevel();
   834             if ( --volume < min )
   834             if ( --volume < min )
   835                 {
   835                 {
   836                 volume = min;
   836                 volume = 0;
   837                 }
   837                 }
   838             }
   838             }
   839         else if ( aDirection == RadioEngine::ERadioIncVolume )
   839         else if ( aDirection == RadioEngine::ERadioIncVolume )
   840             {
   840             {
   841             TInt max = MaxVolumeLevel();
   841             TInt max = MaxVolumeLevel();
   866         {
   866         {
   867         LOG( "Setting volume to player utility" );
   867         LOG( "Setting volume to player utility" );
   868 
   868 
   869         if ( aVolume == 0 )
   869         if ( aVolume == 0 )
   870             {
   870             {
       
   871             iSettings->RadioSetter().SetVolume( aVolume );
       
   872             NotifyRadioEvent( ERadioEventVolume, KErrNone );
   871             SetVolumeMuted( ETrue );
   873             SetVolumeMuted( ETrue );
   872             }
   874             }
   873         else
   875         else
   874             {
   876             {
   875             if ( iSettings->EngineSettings().IsVolMuted() )
   877             if ( iPlayerUtility->SetVolume( TunerVolumeForUiVolume( aVolume ) ) == KErrNone )
   876                 {
       
   877                 SetVolumeMuted( EFalse );
       
   878                 }
       
   879             else if ( iPlayerUtility->SetVolume( TunerVolumeForUiVolume( aVolume ) ) == KErrNone )
       
   880                 {
   878                 {
   881                 iSettings->RadioSetter().SetVolume( aVolume );
   879                 iSettings->RadioSetter().SetVolume( aVolume );
   882                 NotifyRadioEvent( ERadioEventVolume, KErrNone );
   880                 NotifyRadioEvent( ERadioEventVolume, KErrNone );
       
   881                 SetVolumeMuted( EFalse );
   883                 }
   882                 }
   884             }
   883             }
   885         }
   884         }
   886     }
   885     }
   887 
   886 
  1130             }
  1129             }
  1131             break;
  1130             break;
  1132 
  1131 
  1133         case ERadioCallDeactivated:
  1132         case ERadioCallDeactivated:
  1134             {
  1133             {
       
  1134             iPlayerUtility->Play();
  1135             SwitchPower( ETrue );
  1135             SwitchPower( ETrue );
  1136             }
  1136             }
  1137             break;
  1137             break;
  1138 
  1138 
  1139         case ERadioHeadsetConnected:
  1139         case ERadioHeadsetConnected: