Christian Jensen
Christian Jensen

Reputation: 55

Play background sound for a fixed custom interval?

I am developing a WP7 game which should notify the user with a sound once every minute as long as the game is running.

I would like this to happen even when the app is closed. I have tried some different schedulers (e.g. PeriodicTask) but they are all very restricted and do not allow such a small interval - the minimum is often 30 min.

I have tried the AudioPlayerAgent as well, which allows background audio playback, but I don't know how to run an AudioPlayerAgent which plays the sound once every minute?

Is it possible for me to have a background thread which keeps track of the game and plays a sound every minute?

Upvotes: 0

Views: 194

Answers (1)

Matt Lacey
Matt Lacey

Reputation: 65564

You could play a track via the background audio agent that has a minute (or so) of silence between each sound and then loop it.

Is seems a hacky way to go and I'm not 100% certain of your exact requirements or why you really would want to do this anyway.

Upvotes: 1

Related Questions