This is a common misunderstanding among electrical engineering students when learning about power gain and voltage/current gain on a log scale, I'm surprised you've encountered it here.
In my field log scale graphs are used most often to represent the power gain of a system over a given frequency range. In this case a 10 db rise in power corresponds with a 10 fold increase in power. However the same isn't true for voltages and currents; if a signal's voltage or current increases 10 fold then the signal's increase in power will not be 10 fold, it will be sqrt(10) ~= 3.16. This is because power increases proportionally with the square of voltage and current.
Thus when we take the log of an equation for a signal's power over frequency we will find something like this; (for a resistor)
log(P(ω)) = log(V(ω)^2 / R) = 2log(V(ω)) - log(R)
Multiply both sides by 10 to convert Bels to Decibels;
10log(P(ω)) = 20log(V(ω)) - 10log(R)
The relationship between the amplitude and power of a sound wave is similar to the relationship between the amplitude and power of an electrical signal AFAIK. This is why a 20 db increase in amplitude corresponds to a 10 fold increase in amplitude and a 10 db increase in power corresponds to a 10 fold increase in power.
P.S. To answer your question you need to determine if the levels are a unit of power or a unit of amplitude. You know more about the units the function uses than I do as my experience with audio files is highly limited, but my instinct is that an audio file is a representation of amplitude, in which case you would be correct; the conversion factors would need to be 20, not 10.