To stop streaming, you have two options. Either you can just stop
writing buffers back to the stream when they are returned to you Â in this
case, you get a callback to MaoscPlayComplete() with an error of
KErrUnderflow when all the data you have provided has been played
completely. This method ensures that all the data is played fully.
If you want to stop the streaming immediately, you should call Stop()
on the audio stream.
In this case, you should expect the following callbacks:
Â· MaoscBufferCopied() with an error of KErrAbort for each
buffer that you have written to the stream but which has not yet been
Â· MaoscPlayComplete() with an error of KErrCancel.
These callbacks happen synchronously from within the call to Stop().
By the time this call returns, you can be sure that streaming has terminated.