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

pa_cvolume* pa_cvolume_dec ( pa_cvolume v,
pa_volume_t  dec 
)

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

Since:
0.9.16

Definition at line 906 of file volume.c.

References PA_VOLUME_INVALID, PA_VOLUME_MUTED, 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(dec != PA_VOLUME_INVALID, NULL);

    m = pa_cvolume_max(v);

    if (m <= PA_VOLUME_MUTED + dec)
        m = PA_VOLUME_MUTED;
    else
        m -= dec;

    return pa_cvolume_scale(v, m);
}

Generated by  Doxygen 1.6.0   Back to index