Question

I am using the BackgroundAudioPlayer to play audio files stored in the isolated storage.

The user may want to delete one of these files. If the file is playing, the file is locked by the BackgroundAudioPlayer. Only after the track has finished playing can the file be deleted.

Even if I call the Stop function on the BackgroundAudioPlayer, the file is still locked.

How to get the BackgroundAudioPlayer to remove its lock?

Was it helpful?

Solution

Try set Track property to null.

OTHER TIPS

To release the audio file, you have to call the Close method of the BackgroundAudioPlayer.

http://msdn.microsoft.com/en-us/library/microsoft.phone.backgroundaudio.backgroundaudioplayer.close(v=vs.92).aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top