Revision: 201021
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 11 Jun 2010 13:57:07 +0300
changeset 13 04c79585b4c7
parent 11 1373546e05c6
child 23 29ecd5cb86b3
Revision: 201021 Kit: 2010123
gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.cpp
gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.h
--- a/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.cpp	Thu May 27 13:09:21 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.cpp	Fri Jun 11 13:57:07 2010 +0300
@@ -42,6 +42,7 @@
     iIlbcDecoderIntfc = NULL;
     iCallbackError = KErrNone;
     iAudioOutput = NULL;
+    iIsBufferToBeFilledDone = TRUE;
     }
 
 /*********************************************************/
@@ -78,6 +79,7 @@
         {
         User::RequestComplete(stat, KErrNone);
         iCallbackError = KErrNone;
+        iIsBufferToBeFilledDone = FALSE;
         }
     else
         {
@@ -613,15 +615,19 @@
 int playinit(DevSoundWrapper *handle)
     {
     TRACE_PRN_FN_ENT;
-
-    ((handle)->AL)->InitialiseActiveListener();
-    handle->eosReceived = false;
+    handle->iCallbackError = KErrNone;
+    if( handle->iIsBufferToBeFilledDone )
+    {
+        ((handle)->AL)->InitialiseActiveListener();
+        handle->eosReceived = false;
+    
+        TRAP(handle->iCallbackError,(handle->dev_sound)->PlayInitL());
+        if (handle->iCallbackError == KErrNone)
+            {
+            ((handle)->AL)->StartActiveScheduler();
+            }    
+    }
 
-    TRAP(handle->iCallbackError,(handle->dev_sound)->PlayInitL());
-    if (handle->iCallbackError == KErrNone)
-        {
-        ((handle)->AL)->StartActiveScheduler();
-        }
 
     TRACE_PRN_IF_ERR(handle->iCallbackError);
     TRACE_PRN_FN_EXT;
@@ -679,7 +685,7 @@
     (handle->dev_sound)->PlayData();
 
     ((handle)->AL)->StartActiveScheduler();
-
+    handle->iIsBufferToBeFilledDone = TRUE;
     TRACE_PRN_FN_EXT;
     return KErrNone;
     }
--- a/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.h	Thu May 27 13:09:21 2010 +0300
+++ b/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.h	Fri Jun 11 13:57:07 2010 +0300
@@ -105,7 +105,7 @@
     CG729DecoderIntfc*      iG729DecoderIntfc;
     CIlbcDecoderIntfc*      iIlbcDecoderIntfc;
     CAudioOutput*           iAudioOutput;
-
+    bool iIsBufferToBeFilledDone;
 
 public:
 	void InitializeComplete(TInt aError);