0

I have managed to get seamsless looping of wav files using the SharpDX library. But this does not seem to work while the app is minimised (in the background).

Using the metro players I do not get a seamless loop this is why I use XAudio2 in the SharpDX library.

Hope someone can help with this.

Rowland Shaw
  • 37,700
  • 14
  • 97
  • 166
reachify
  • 3,657
  • 2
  • 19
  • 22

1 Answers1

0

When your app is in the background it no longer has access to the CPU so your audio will stop playing.

The only way around this is with background agents running the audio component. The issue here is that the certification process will be hard on you if you are just playing looping audio. Playing audio in the background is intended for audio player apps (like the inbuilt "Music" app).

If I were a user of your app I would likely be unhappy that it clogs up the audio system when it isn't in the foreground (if, for example, I went to answer a Lync call). If the only way to stop your app playing audio is to go and turn it off manually or exit the app then my opinion is that the user experience isn't great.

Of course, you may have a different opinion, or your app might be doing something I haven't considered.

ZombieSheep
  • 29,603
  • 12
  • 67
  • 114
  • Well the app is a ambient app that produces sounds to help you sleep/relax. So it is valid for the app to play while windows 8 is locked or if the user wants to do other stuff (and not use the snap feature). As I have understood the problem with the audio component is that it can not loop multiple wav files without a gap on each loop :( and this is a showstopper for my app – reachify Jul 22 '12 at 11:42
  • Fade out, fade in. Surely that'd be an acceptable limitation. – rikkit Jul 25 '12 at 23:03