When utilizing XAudio2 directly for audio playback on WP8 it is noted in the MSDN API documentation that:
[quote:1fv72ezt]If your app uses the XAudio2 APIs, it can potentially drain the user’s battery when the user switches to another app and your app continues to run in the background. To ensure that your app does not continue to process audio in the background and drain the user’s battery, do the following:
– When your app is suspended, call IXAudio2::StopEngine.
– When your app is resumed, call IXAudio2::StartEngine.[/quote:1fv72ezt]
If this is not done the Audio engine will be active draining battery when app is in the background. Same audio engine activity can be seen when using FMOD Ex on WP8.
What is the recommended coding practise to release resources that are being reserved by FMOD Ex framework when app is being deactivated?
- ovirta asked 4 years ago
[quote="Nick FMOD":267cozjp]FMOD 4.44.14 has this added as a feature for Windows Phone. See the Getting Started Guide for more information.[/quote:267cozjp]
Thank you for the heads up.
Downloaded examples, modified play_stream.cpp to utilize [b:267cozjp]FMOD_WindowsPhone_PauseSystem[/b:267cozjp] instead of FMOD_Channel_SetPaused(..) .
After pausing the system, putting app to background and phone to standby the audio resources are not reserved any more. So new version of the FMOD seems to work ok.
Would be very helpful if you could include this functionality in one of your examples as well to instruct developers how to best utilize FMOD in Windows Phone environment.
- ovirta answered 4 years ago
Please login first to submit.