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

pa_cvolume* pa_cvolume_inc ( pa_cvolume v,
pa_volume_t  inc 
)

Increase the volume passed in by 'inc'. The proportions between the channels are kept.

Since:
0.9.16

Definition at line 888 of file volume.c.

References PA_VOLUME_INVALID, PA_VOLUME_MAX, and pa_volume_t.

                                                           {
    pa_volume_t m;

    pa_assert(v);

    pa_return_val_if_fail(pa_cvolume_valid(v), NULL);
    pa_return_val_if_fail(inc != PA_VOLUME_INVALID, NULL);

    m = pa_cvolume_max(v);

    if (m >= PA_VOLUME_MAX - inc)
        m = PA_VOLUME_MAX;
    else
        m += inc;

    return pa_cvolume_scale(v, m);
}

Generated by  Doxygen 1.6.0   Back to index