Reputation: 107
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?
Upvotes: 3
Views: 203
Reputation: 39007
To release the audio file, you have to call the Close
method of the BackgroundAudioPlayer
.
Upvotes: 1