Some changes occurred in the consumer preview release of Windows 8 regarding background audio; the steps required to get it working are outlined in this forum post
The steps are
- Create a MediaElement and set it’s AudioCategory property to ‘BackgroundCapableMedia’
- Update the app manifest to declare Background Tasks of types ‘Audio’ and ‘Control Channel’
- Implement event handlers for
The media transport event handlers which need to be implemented are detailed here http://msdn.microsoft.com/en-us/library/windows/hardware/hh833781.aspx
Here’s a working sample project.
UPDATE: I have updated this for the Release Preview (see http://babaandthepigman.wordpress.com/2012/08/12/metro-background-audio-c-release-preview/)