2010wk42_01 default tip
authorhgs
Wed, 13 Oct 2010 12:08:48 +0100
changeset 3 28bdc4aca325
parent 2 1c6fdad012dc
2010wk42_01
mmdevicefw/mdf/src/audio/mdasoundadapter/mdasoundadapterbody.cpp
--- a/mmdevicefw/mdf/src/audio/mdasoundadapter/mdasoundadapterbody.cpp	Fri Oct 08 19:45:45 2010 +0100
+++ b/mmdevicefw/mdf/src/audio/mdasoundadapter/mdasoundadapterbody.cpp	Wed Oct 13 12:08:48 2010 +0100
@@ -182,10 +182,18 @@
 		// work out mask so that x&iRequestMinMask is equiv to x/iRequestMinSize*iRequestMinSize
 		iRequestMinMask = ~(iRequestMinSize-1); // assume iRequestMinSize is power of 2
 		iSavedTrailingData.Close();
-		iSavedTrailingData.Create(iRequestMinSize);
+		
+		err = iSavedTrailingData.Create(iRequestMinSize);
 	
-	    iState = EStopped;
-		iBytesPlayed = 0;
+		if (err != KErrNone)
+		    {
+		    Close();
+		    }
+		else
+		    {
+	        iState = EStopped;
+		    iBytesPlayed = 0;
+		    }
 	    }
 
 	return err;