An Apple patent (number 20120109349) for media management and routing within an electronic device has appeared at the U.S. Patent & Trademark Office.

The invention relates to routing audio within an electronic device using a variety of sources and outputs. The routing is responsive to a set of logical and physical policies which are stored in data tables which can be updated as needed.

Here’s Apple’s background on the invention: “The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.

“Computing devices can often handle playback of multiple types of media. The media that may be played back by computing devices often includes numerous forms/formats of video, and numerous forms/formats of audio. Within such computing devices, many applications may be competing to play back media. Examples of types of applications that may attempt to play back media within a handheld computing device include, for example, a telephone application, a web browser, an e-mail application, short message service (SMS), a music player, and video player.

“Within computing devices, the various software applications that play back the media can all contend for use of the various audio resources, and have different rules and protocols for doing so. Some of these rules and protocols may conflict from one application to another.

“To complicate things further, many computing devices also have multiple possible outputs for playback of the media. For example, a handheld computing device may have a line out port, a headphone port, a docking port, and multiple speakers, each of which may serve a different function and have different capabilities.

“One way to handle the contention among the applications for the playback resources of a computing device is to design each application with logic to check the state of settings of the device, and decide for itself where, when and how to play its media. Unfortunately, using this approach, each software application developer has to implement code for a behavior tree that attempts to take into account the variety of factors that can impact media playback on a device. The result may be less-than-optimal media handling decisions made by more-complex-than-necessary applications.”

The inventors are James D. Baton, Meriko L. Borogove, Gregory R. Chapman, Patrick L. Coffman, Anthony J. Guetta, Aram Lindahl and Andrew Rostaing.