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

pa_volume_t pa_sw_volume_from_dB ( double  f )

Convert a decibel value to a volume (amplitude, not power). This is only valid for software volumes!

Definition at line 232 of file volume.c.

References PA_DECIBEL_MININFTY, and PA_VOLUME_MUTED.

                                            {
    if (isinf(dB) < 0 || dB <= PA_DECIBEL_MININFTY)
        return PA_VOLUME_MUTED;

    return pa_sw_volume_from_linear(dB_to_linear(dB));
}

Generated by  Doxygen 1.6.0   Back to index