Logo Search packages:      
Sourcecode: pulseaudio version File versions

int pa_channel_map_valid ( const pa_channel_map map  ) 

Return non-zero if the specified channel map is considered valid

Definition at line 553 of file channelmap.c.

References pa_channel_map::channels, pa_channel_map::map, and PA_CHANNELS_MAX.

                                                    {
    unsigned c;

    pa_assert(map);

    if (map->channels <= 0 || map->channels > PA_CHANNELS_MAX)
        return 0;

    for (c = 0; c < map->channels; c++)
        if (map->map[c] < 0 || map->map[c] >= PA_CHANNEL_POSITION_MAX)
            return 0;

    return 1;
}


Generated by  Doxygen 1.6.0   Back to index