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. This is only valid for software volumes!

Since:
0.4

Definition at line 92 of file volume.c.

References PA_DECIBEL_MININFTY, PA_VOLUME_MUTED, and PA_VOLUME_NORM.

                                         {
    if (v == PA_VOLUME_MUTED)
        return PA_DECIBEL_MININFTY;

    return ((double) v/PA_VOLUME_NORM-1)*USER_DECIBEL_RANGE;
}


Generated by  Doxygen 1.6.0   Back to index