Page 1 of 1

Cannot stop StockAudioPlayer

PostPosted: November 27th, 2008, 3:35 pm
by JARS
When StockAudioPlayer is playing and I want to stop it within OnLevel event I get the error:
"Cannot perform this operation while media data is still playing. Reset the device, or wait until the data is finished playing."
I need to stop the audio when level is > 90 so not continue playing.
How can I do this?

Thanks

Re: Cannot stop StockAudioPlayer

PostPosted: November 27th, 2008, 4:49 pm
by Kambiz
You cannot stop the audio within one of the events. As a solution you can post a message to the form, and stop audio on the message handler.

Re: Cannot stop StockAudioPlayer

PostPosted: November 27th, 2008, 5:34 pm
by JARS
Thanks a lot Kambiz