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

int pa_cvolume_equal ( const pa_cvolume a,
const pa_cvolume b 
)

Return non-zero when *a == *b

Definition at line 37 of file volume.c.

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

                                                               {
    int i;
    pa_assert(a);
    pa_assert(b);

    pa_return_val_if_fail(pa_cvolume_valid(a), 0);

    if (PA_UNLIKELY(a == b))
        return 1;

    pa_return_val_if_fail(pa_cvolume_valid(b), 0);

    if (a->channels != b->channels)
        return 0;

    for (i = 0; i < a->channels; i++)
        if (a->values[i] != b->values[i])
            return 0;

    return 1;
}

Generated by  Doxygen 1.6.0   Back to index