I am having a problem whereby calls to the WriteL function of the CMdaAudioOutputStream class are leaving with KErrInUse.
This is repeatedly happening in the following situation:
- start streaming a couple of buffers (8K in size) using WriteL
- call Stop to stop streaming
- start sending buffers again using WriteL
- almost immediately call Stop giving error codes -39 (KErrAbort)to MaoscBufferCopied and -3 (KErrCancel) to MaoscBufferComplete
- start sending buffers again using WriteL - and this call will then leave with -14 (KErrInUse)
There seems to be something about calling the Stop function so soon after sending just 1 buffer of data using WriteL
Once I get this leave I have tried closing the CMdaAudioOutputStream and re-opening it but I still get the same leave the next time I call WriteL.
Has anyone experienced any problems like this when using the CMdaAudioOutputStream class? Or is anyone able to offer any suggestions?