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

double pa_sw_volume_to_dB ( pa_volume_t  v  ) 

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

Definition at line 239 of file volume.c.

References PA_DECIBEL_MININFTY, PA_VOLUME_INVALID, and PA_VOLUME_MUTED.

                                         {

    pa_return_val_if_fail(v != PA_VOLUME_INVALID, PA_DECIBEL_MININFTY);

    if (v <= PA_VOLUME_MUTED)
        return PA_DECIBEL_MININFTY;

    return linear_to_dB(pa_sw_volume_to_linear(v));
}


Generated by  Doxygen 1.6.0   Back to index