mmsharing/mmshengine/src/musengmcesession.cpp
branchRCL_3
changeset 11 ff8a573c0e2e
parent 0 f0cf47e981f9
child 19 95754dcd27ad
--- a/mmsharing/mmshengine/src/musengmcesession.cpp	Fri Mar 12 15:42:21 2010 +0200
+++ b/mmsharing/mmshengine/src/musengmcesession.cpp	Mon Mar 15 12:40:08 2010 +0200
@@ -321,6 +321,17 @@
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::EnableDisplay()")
     }
 
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CMusEngMceSession::IsDisplayEnabledL()
+    {
+    __ASSERT_ALWAYS( iSession, User::Leave( KErrNotReady ) );
+    CMceDisplaySink* display = MusEngMceUtils::GetDisplayL( *iSession );
+    return display->IsEnabled();
+    }
+
 
 // -----------------------------------------------------------------------------
 // Mutes playback of sended audio streams. Audio data is still streamed.
@@ -528,7 +539,7 @@
                 MusEngMceUtils::GetSpeaker( *( iSession->Streams()[i] ) );
 
             if ( speaker &&        
-                 aNewVolume >= 1 &&
+                 aNewVolume >= KMusEngMinVolume &&
                  aNewVolume <= KMusEngMaxVolume )
                 {
                 // MCE might have different scale for volume than MUS
@@ -1456,3 +1467,19 @@
         }    
     MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::DoCodecConfigurationBasedRemovalL()" )
     }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMusEngMceSession::VolumeChanged( TInt aVolume, TBool aAudioRouteChanged )
+    {
+    MUS_LOG1( "mus: [ENGINE]  -> CMusEngMceSession::VolumeChanged(): %d", aVolume )
+    if ( iSession )
+        {
+        CMusEngSession::VolumeChanged( aVolume, aAudioRouteChanged );
+        TRAP_IGNORE( SetSpeakerVolumeL( aVolume ) );
+        }
+
+    MUS_LOG( "mus: [ENGINE]  <- CMusEngMceSession::VolumeChanged()" )
+    }