--- a/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.cpp Fri May 14 18:43:44 2010 -0500
+++ b/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.cpp Fri May 28 18:11:17 2010 -0500
@@ -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 Fri May 14 18:43:44 2010 -0500
+++ b/gst_plugins_symbian/gst/devsound/devsoundsinkwrapper.h Fri May 28 18:11:17 2010 -0500
@@ -105,7 +105,7 @@
CG729DecoderIntfc* iG729DecoderIntfc;
CIlbcDecoderIntfc* iIlbcDecoderIntfc;
CAudioOutput* iAudioOutput;
-
+ bool iIsBufferToBeFilledDone;
public:
void InitializeComplete(TInt aError);