MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

Channel Maps

Overview

Channel maps provide a way to associate channels in a stream with a specific speaker position. This relieves applications of having to make sure their channel order is identical to the final output.

Initialisation

A channel map consists of an array of pa_channel_position values, one for each channel. This array is stored together with a channel count in a pa_channel_map structure.

Before filling the structure, the application must initialise it using pa_channel_map_init(). There are also a number of convenience functions for standard channel mappings:

  • pa_channel_map_init_mono() - Create a channel map with only mono audio.
  • pa_channel_map_init_stereo() - Create a standard stereo mapping.
  • pa_channel_map_init_auto() - Create a standard channel map for a specific number of channels
  • pa_channel_map_init_extend() - Similar to pa_channel_map_init_auto() but synthesize a channel map if no predefined one is known for the specified number of channels.

Convenience Functions

The library contains a number of convenience functions for dealing with channel maps:

  • pa_channel_map_valid() - Tests if a channel map is valid.
  • pa_channel_map_equal() - Tests if two channel maps are identical.
  • pa_channel_map_snprint() - Creates a textual description of a channel map.

Several copyright owners
GNU Lesser General Public License v2.1
MeeGo 1.2 Harmattan API