I am having a problem whereby calls to the WriteBufferL 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 WriteBufferL
- call Stop to stop streaming
- start sending buffers again using WriteBufferL
- almost immediately call Stop giving error codes -39 (KErrAbort)to MaoscBufferCopied and -3 (KErrCancel) to MaoscBufferComplete
- start sending buffers again using WriteBufferL - 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 WriteBufferL
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 WriteBufferL.
Has anyone experienced any problems like this when using the CMdaAudioOutputStream class? Or is anyone able to offer any suggestions?