Logo Search packages:      
Sourcecode: pulseaudio version File versions  Download package

pa_volume_t pa_cvolume_max ( const pa_cvolume a  ) 

Return the maximum volume of all channels.


Definition at line 128 of file volume.c.

References pa_cvolume::channels, PA_VOLUME_MUTED, pa_volume_t, and pa_cvolume::values.

    pa_volume_t m = PA_VOLUME_MUTED;
    unsigned c;

    pa_return_val_if_fail(pa_cvolume_valid(a), PA_VOLUME_MUTED);

    for (c = 0; c < a->channels; c++)
        if (a->values[c] > m)
            m = a->values[c];

    return m;

Generated by  Doxygen 1.6.0   Back to index