New Media Capabilities
Media codec access
Android 4.1 provides low-level access to platform hardware and software codecs. Apps can query the system to discover what low-level media codecs are available on the device and then and use them in the ways they need. For example, you can now create multiple instances of a media codec, queue input buffers, and receive output buffers in return. In addition, the media codec framework supports protected content. Apps can query for an available codec that is able to play protected content with a DRM solution available on the the device.
USB Audio
USB audio output support allows hardware vendors to build hardware such as audio docks that interface with Android devices. This functionality is also exposed with the Android Open Accessory Development Kit (ADK) to give all developers the chance to create their own hardware.
Audio record triggering
Android now lets you trigger audio recording based on the completion of an audio playback track. This is useful for situations such as playing back a tone to cue your users to begin speaking to record their voices. This feature helps you sync up recording so you dont record audio that is currently being played back and prevents recordings from beginning too late.
Multichannel audio
Android 4.1 supports multichannel audio on devices that have hardware multichannel audio out through the HDMI port. Multichannel audio lets you deliver rich media experiences to users for applications such as games, music apps, and video players. For devices that do not have the supported hardware, Android automatically downmixes the audio to the number of channels that are supported by the device (usually stereo).
Android 4.1 also adds built-in support for encoding/decoding AAC 5.1 audio.
Audio preprocessing
Developers can apply preprocessing effects to audio being recorded, such as to apply noise suppression for improving speech recording quality, echo cancellation for acoustic echo, and auto gain control for audio with inconsistent volume levels. Apps that require high quality and clean audio recording will benefit from these preprocessors.
Audio chaining
MediaPlayer supports chaining audio streams together to play audio files without pauses. This is useful for apps that require seamless transitions between audio files such as music players to play albums with continuous tracks or games.
Media Router
The new APIs MediaRouter, MediaRouteActionProvider, and MediaRouteButton provide standard mechanisms and UI for choosing where to play media. Support is built-in for wired headsets and a2dp bluetooth headsets and speakers, and you can add your own routing options within your own app.