Logo Search packages:      
Sourcecode: pulseaudio version File versions

pa_cvolume* pa_sw_cvolume_multiply ( 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!

Definition at line 154 of file volume.c.

References pa_cvolume::channels, PA_CHANNELS_MAX, PA_VOLUME_NORM, 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_multiply(
            i < a->channels ? a->values[i] : PA_VOLUME_NORM,
            i < b->channels ? b->values[i] : PA_VOLUME_NORM);
    }

    dest->channels = i;

    return dest;
}


Generated by  Doxygen 1.6.0   Back to index