image

With Windows 8 Microsoft have made some major changes to the way that app can playback audio to work more inline with the single app experience of Windows 8. In a blog post on MSDN Microsoft have some tips for developers working with audio in Windows 8.The post is aimed helping developers understand how to handle audio playback in Windows 8 apps with things like background audio playback and handling notification audio.

One interesting thing to note is that Windows 8 apps don’t show up in the audio mixer that desktop programs use and it users a Playback manager to handling the muting of audio from apps that are not in focus.  With Windows 7 I got used to balancing audio with audio mixer but going forward it looks like your not going to be able to do that.

The changes make sense but developers need to understand the concepts.

For Windows 8 apps, we addressed this problem with the introduction of the Playback Manager and Media Transport Controls. The Playback Manager uses audio categories, which assign behaviors to audio streams—and, by extension, audio apps. Incoming audio streams in the foreground are always allowed to play audio. But by tagging streams, Playback Manager can make intelligent decisions about how to handle multiple streams in the foreground and background.

For example, if a background capable app is playing music and is moved to the background, and then the user opens a new app in the foreground to play music, Playback Manager mutes the audio in the background app. This allows for a more fluid and intuitive user experience. Users hear what they want to hear, not what they don’t. Add in intelligent attenuation of background music for alerts (like alarms and ringtones), and easy to access to Media Transport Controls to stop, start, skip to next/previous tracks, and you have a system that is designed to keep you from panicking and frantically looking for apps that are making noise when you don’t want them to.

Why did we do what we did?

In previous versions of Windows, users could have multiple applications open and running simultaneously. On the audio front, they could minimize your media player, work on a document and surf the web at the same time on one big monitor. With two monitors, they could do much more multitasking. In Windows 8 in the new immersive environment, things have changed with respect to how many apps you can see on the screen at once. With only one app in the body and one snapped, finding the app that’s making sound becomes more of a problem if it’s on the back stack. This is the primary reason behind the evolution of Playback Manager and the Media Transport controls. With these features in place, it is now much easier to make music start and stop when you need it to. And because Playback Manager can mute apps that should not be making sound, it keeps users from having to swipe back through a stack of apps to make something be quiet.

There is no audio mixer in this environment as there is in the desktop. It still exists for desktop applications, but your app won’t show up here because we felt it was not a great experience to pop out into desktop to adjust relative app volumes. Instead, we are encouraging apps to not include volume controls. This way users are focused on the master volume control which helps simplify the entire volume experience as well – but that’s a different story.

Leave a Reply