Logo Search packages:      
Sourcecode: pulseaudio version File versions

pa_cvolume* pa_sw_cvolume_divide ( pa_cvolume dest,
const pa_cvolume a,
const pa_cvolume b 
)

Multiply to per-channel volumes and return the result in *dest. This is only valid for software volumes!

Since:
0.9.13

Definition at line 240 of file volume.c.

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

                                                                                             {
    unsigned i;

    pa_assert(dest);
    pa_assert(a);
    pa_assert(b);

    for (i = 0; i < a->channels && i < b->channels && i < PA_CHANNELS_MAX; i++)
        dest->values[i] = pa_sw_volume_divide(a->values[i], b->values[i]);

    dest->channels = (uint8_t) i;

    return dest;
}


Generated by  Doxygen 1.6.0   Back to index