How to convert decibel(dB) number to audio source volume number 0to1?

Hi,
I m a new to unity.
I have a problem.That is I have user input decibel number.I have to convert that number to
audio sourece volume number between 0~1.
How to convert?
Anyone please…

I had a hard time tempering with the Mixer and Sliders, at least more than I expected.
I guess these cover the issue.

• Linear to decibel:

    private float LinearToDecibel(float linear)
	{
		float dB;
		
		if (linear != 0)
			dB = 20.0f * Mathf.Log10(linear);
		else
			dB = -144.0f;
		
		return dB;
	}

• Decibel to linear:

    private float DecibelToLinear(float dB)
	{
		float linear = Mathf.Pow(10.0f, dB/20.0f);

		return linear;
	}

I made an online calculator to convert linear float values in decibels and vice versa. It’s perfect for Unity and other game audio tools!

http://www.playdotsound.com/portfolio-item/decibel-db-to-float-value-calculator-making-sense-of-linear-values-in-audio-tools/

I just tested this, and Unity’s decibel scale is linear, meaning half volume (0.5) is 6dB lower than full volume (1.0). There will be no absolute corresponding dB value, as that completely depends on the rest of the setup, such as sound card settings and speakers. Instead, you would translate 1.0 volume as “0dB”, 0.5 volume as “-6dB”, 0.25 volume as “-12dB”, and so forth.