Lines Matching defs:map
8275 * which contains the channel map. A channel map is represented by an
8276 * integer array, beginning with the channel map type, followed by the
8291 * \!brief Release the channel map array allocated via #snd_pcm_query_chmaps
8305 * \!brief Get the current channel map
8307 * \return the current channel map, or NULL if error
8319 * \!brief Configure the current channel map
8321 * \param map the channel map to write
8324 int snd_pcm_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map)
8330 nochange = (oldmap && chmap_equal(oldmap, map));
8337 return pcm->ops->set_chmap(pcm, map);
8351 * \!brief Get a name string for a channel map type as query results
8384 * \!brief Get a name string for a standard channel map position
8437 * \!brief Get a longer name string for a standard channel map position
8451 * \param map The channel map to print
8456 int snd_pcm_chmap_print(const snd_pcm_chmap_t *map, size_t maxlen, char *buf)
8460 for (i = 0; i < map->channels; i++) {
8461 unsigned int p = map->pos[i] & SND_CHMAP_POSITION_MASK;
8467 if (map->pos[i] & SND_CHMAP_DRIVER_SPEC)
8480 if (map->pos[i] & SND_CHMAP_PHASE_INVERSE) {
8540 * \!brief Convert from string to channel map
8542 * \return The channel map
8550 snd_pcm_chmap_t *map;
8580 map = malloc(sizeof(*map) + ch * sizeof(int));
8581 if (!map)
8583 map->channels = ch;
8585 map->pos[i] = tmp_map[i];
8586 return map;
8589 /* copy a single channel map with the fixed type to chmap_query pointer */
8597 memcpy(&(*dst)->map, src, (src->channels + 1) * sizeof(int));
8602 /* make a chmap_query array from a single channel map */
8621 snd_pcm_chmap_t *map;
8623 map = malloc((src->channels + 1) * sizeof(int));
8624 if (!map)
8626 memcpy(map, src, (src->channels + 1) * sizeof(int));
8627 return map;
8645 maps[i] = malloc((src[i]->map.channels + 2) * sizeof(int));
8650 memcpy(maps[i], src[i], (src[i]->map.channels + 2) * sizeof(int));
8655 /* select the channel map with the current PCM channels and make a copy */
8662 if ((*p)->map.channels == pcm->channels)
8663 return _snd_pcm_copy_chmap(&(*p)->map);